[lkml]   [2004]   [Jun]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [profile]: [0/23] mmap() support for /proc/profile
    On Wed, Jun 23, 2004 at 09:16:46AM +1000, Anton Blanchard wrote:
    > Interesting stuff. FYI we did some analysis of the hottest addresses in
    > the kernel and profile_lock featured very high up:
    > void profile_hook(struct pt_regs * regs)
    > {
    > read_lock(&profile_lock);
    > notifier_call_chain(&profile_listeners, 0, regs);
    > read_unlock(&profile_lock);
    > }
    > Thats 2 atomic operations to the same cacheline per timer interrupt per
    > cpu. Considering how rarely timer based profiling is used, perhaps RCU
    > or even just a profiling_enabled sysctl flag would help here. Id prefer
    > not to compile it out in distro kernels if possible, its a very useful
    > feature when required.
    > In the mean time, how about this quick fix?

    Well, this is a little different. I was more concerned about the
    "Heisenberg effect" that the in-kernel copies to fetch profiling data
    had upon the data fetched. i.e. instead of idle time and the stuff I
    was looking for, I saw copy_to_user() and all kinds of vfs and /proc/
    crap instead, which blew what I was looking for completely out of the
    top 20. The profiling I did was on UP, which was done in part to
    eliminate lock contention as the cause of the phenomena I had observed.

    Also, Randy said I should mention that my kerneltop-like thingie is
    about 5 times faster (well, uses about 20% of the cpu time) as the
    read()-based kerneltop. Which is all well and good, but the reason I
    actually needed this was to get rid of the Heisenberg problem.

    -- wli
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at

     \ /
      Last update: 2005-03-22 14:04    [W:0.031 / U:67.116 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site