Messages in this thread | | | From | Jesse Barnes <> | Subject | Re: contention on profile_lock | Date | Thu, 4 Nov 2004 12:49:21 -0800 |
| |
On Thursday, November 4, 2004 12:12 pm, William Lee Irwin III wrote: > On Thu, Nov 04, 2004 at 11:56:23AM -0800, Jesse Barnes wrote: > > ..but since I haven't heard from Dipankar, here's a patch that removes > > the profile_hook notifier list altogether in favor of a simple flag that > > controls whether or not to call the oprofile timer routine directly. > > Does it look ok? > > This looks reasonable to me.
John pointed out that this breaks modules. Would registering and unregistering a function pointer thus be module safe? Dipankar, hopefully you have something better?
static int timer_start(void) { /* Setup the callback pointer */ oprofile_timer_notify = oprofile_timer; return 0; }
static void timer_stop(void) { /* Tear down the callback pointer after sync_kernel */ synchronize_kernel(); oprofile_timer_notify = NULL; }
Thanks, Jesse - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |