Re: [PATCH 1/8] Notifier chain update

From: Jes Sorensen
Date: Thu Jan 19 2006 - 04:59:58 EST


>>>>> "Benjamin" == Benjamin LaHaise <bcrl@xxxxxxxxx> writes:

Benjamin> On Wed, Jan 18, 2006 at 05:09:10PM -0500, Alan Stern wrote:
>> On Wed, 18 Jan 2006, Benjamin LaHaise wrote:
>>
>> > The notifier interface is supposed to be *light weight*.
>>
>> Again, where is that documented?

Benjamin> Read the kernel. Notifiers are called from all sorts of hot
Benjamin> paths, so they damned well better be light.

Ben,

There' plenty of cases where adding a new notifier chain will be
preferred to adding a long list of if (foo) call() items. One place is
the fork()/exit() path for more system accounting. Being able to sleep
in those places is needed. Fortunately one can do them lock free as
they are in task context, but you need to be able to kmalloc() there.

Cheers,
Jes
-
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/