Re: [PATCH 1/2] [mmotm] Add notifiers for various swap events

Nitin Gupta
2009-12-28T10:21:34Z

On Mon, Dec 28, 2009 at 11:43 AM, Pekka Enberg <penberg@cs.helsinki.fi> wrote:
> On Mon, Dec 28, 2009 at 3:19 AM, Nitin Gupta <ngupta@vflare.org> wrote:
>> Events:
>>  - Swapon
>>  - Swapoff
>>  - When a swap slot is freed

<snip>

> This looks good to me. Hugh? Nitin, does this patch cause any
> performance hit for the !CONFIG_RAMZSWAP case?
>

I have not yet collected any data to check overhead in !RAMZSWAP
case but an empty notifier chain is essentially equivalent to:

rcu_read_lock()
nb = rcu_dereference(*nl);
rcu_read_unlock()

This should not cause any performance problem. Anyway, I will
try to come up with some numbers to confirm this.

Thanks for looking into this.
Nitin