From: Pekka Enberg <penberg@cs.helsinki.fi>
To: Nitin Gupta <ngupta@vflare.org>
Cc: Andi Kleen <andi@firstfloor.org>,
Hugh Dickins <hugh.dickins@tiscali.co.uk>,
KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>,
Andrew Morton <akpm@linux-foundation.org>,
linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/2] [mmotm v2] Add notifiers for various swap events
Date: Thu, 31 Dec 2009 11:03:51 +0200 [thread overview]
Message-ID: <4B3C68F7.60100@cs.helsinki.fi> (raw)
In-Reply-To: <1262232518-2841-1-git-send-email-ngupta@vflare.org>
Nitin Gupta wrote:
> Events:
> - Swapon
> - Swapoff
> - When a swap slot is freed
>
> This is required for ramzswap module which implements RAM based block
> devices to be used as swap disks. These devices require a notification
> on these events to function properly.
>
> Currently, I'm not sure if any of these event notifiers have any other
> users. However, adding ramzswap specific hooks instead of this generic
> approach resulted in a bad/hacky code with too many 'ifdef CONFIG_RAMZSWAP'
> spread all over the core kernel code.
>
> For SWAP_EVENT_SLOT_FREE, callbacks are made under swap_lock. Currently, this
> is not a problem since ramzswap is the only user and the callback it registers
> can be safely made under this lock. However, if this event finds more users,
> we might have to work on reducing contention on this lock (per-swap lock?).
>
> v2: added comment before swap slot free notifier call to clarify that
> ramzswap is currently the only user of this notifier.
>
> Signed-off-by: Nitin Gupta <ngupta@vflare.org>
Andi didn't seem to like this one and we're still waiting for Hugh to
comment on the issue. But, FWIW,
Acked-by: Pekka Enberg <penberg@cs.helsinki.fi>
Pekka
next prev parent reply other threads:[~2009-12-31 9:04 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-31 4:08 [PATCH 1/2] [mmotm v2] Add notifiers for various swap events Nitin Gupta
2009-12-31 4:08 ` [PATCH 2/2] [mmotm v2] ramzswap: add handlers " Nitin Gupta
2009-12-31 9:05 ` Pekka Enberg
2009-12-31 9:03 ` Pekka Enberg [this message]
2010-01-01 5:08 ` [PATCH 2/2 repost] [mmotm v2] Add notifiers " Nitin Gupta
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4B3C68F7.60100@cs.helsinki.fi \
--to=penberg@cs.helsinki.fi \
--cc=akpm@linux-foundation.org \
--cc=andi@firstfloor.org \
--cc=hugh.dickins@tiscali.co.uk \
--cc=kamezawa.hiroyu@jp.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=ngupta@vflare.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.