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

From: Nitin Gupta
Date: Thu Sep 24 2009 - 01:03:18 EST


On Thu, Sep 24, 2009 at 9:20 AM, KAMEZAWA Hiroyuki
<kamezawa.hiroyu@xxxxxxxxxxxxxx> wrote:

>> >
>> > In general, notifier chain codes allowed to return NOTIFY_BAD.
>> > But this patch just assumes all chains should return NOTIFY_OK or
>> > just ignore return code.
>> >
>> > That's not good as generic interface, I think.
>>
>>
>> What action we can take here if the notifier_call_chain() returns an error (apart
>> from maybe printing an error)? Perhaps we can add a warning in case of swapon/off
>> events but not in case of swap slot free event which is called under swap_lock.
>>
> If return code is ignored, please add commentary at least.
>

okay.

> I wonder I may able to move memcg's swap_cgroup code for swapon/swapoff onto this
> notifier. (swap_cgroup_swapon/swap_cgroup_swapoff) But it seems not.
> sorry for bothering you.
>

Thanks for your comments!

Nitin
--
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/