Re: [PATCH] x86: Add a list for custom page fault handlers.

From: Peter Zijlstra
Date: Sun Jan 27 2008 - 16:04:08 EST



On Sun, 2008-01-27 at 18:52 +0200, Pekka Paalanen wrote:

> +void unregister_page_fault_handler(struct pf_handler *old_pfh)
> +{
> + might_sleep();
> + spin_lock(&pf_handlers_writer);
> + hlist_del_rcu(&old_pfh->hlist);
> + spin_unlock(&pf_handlers_writer);
> + synchronize_rcu();
> +}
> +EXPORT_SYMBOL_GPL(unregister_page_fault_handler);

Could you remove that sync_rcu() call and put in the comments that the
calling function is to take care of proper freeing.

sync_rcu() is a _very_ expensive call, and oft time it is not needed in
favour of call_rcu().


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/