Messages in this thread | | | Subject | Re: [PATCH] x86: Add a list for custom page fault handlers. | From | Peter Zijlstra <> | Date | Sun, 27 Jan 2008 22:03:31 +0100 |
| |
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().
| |