From: "Mike Kravetz" <kravetz@xxxxxxxxxx>
...
> While looking at the kernprof code, I noticed the global
> variable 'total_mcount' (in drivers/char/profile.c) is
> incremented each time mcount is called: OUCH!!! Since mcount
> is called upon entry to each function, it is hard to imagine
> a more contested cache line.
...
Thanks for the suggestion. Yes, you're right, I haven't spent much time
making kernprof more efficient. I've made some changes in this area to
move total_mcount and some other per-cpu counters into isolated
cachelines. I'll test them and release the new drivers/char/kernprof.c
this week.
John Hawkes
|