From: Andi Kleen <andi@firstfloor.org>
To: Nitin Gupta <ngupta@vflare.org>
Cc: Hugh Dickins <hugh.dickins@tiscali.co.uk>,
Pekka Enberg <penberg@cs.helsinki.fi>,
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] Add notifiers for various swap events
Date: Mon, 28 Dec 2009 16:02:10 +0100 [thread overview]
Message-ID: <87eimf87m5.fsf@basil.nowhere.org> (raw)
In-Reply-To: <1261963200-7136-1-git-send-email-ngupta@vflare.org> (Nitin Gupta's message of "Mon, 28 Dec 2009 06:49:59 +0530")
Nitin Gupta <ngupta@vflare.org> writes:
> 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.
The first question to ask is if compressed swap is worth
it. Do you have benchmark numbers showing it to be an improvement?
Are there cases where it is slower than uncompressed swap?
> 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.
If there's only a single user I think it's preferable to call
directly. That makes the code much easier to read and understand.
In the end notifiers are a form of code obfuscation.
The main use for notifiers would be if something is a optional
module, but that's not the case here.
-Andi
--
ak@linux.intel.com -- Speaking for myself only.
next prev parent reply other threads:[~2009-12-28 15:02 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-28 1:19 [PATCH 1/2] [mmotm] Add notifiers for various swap events Nitin Gupta
2009-12-28 1:20 ` [PATCH 2/2] [mmotm] ramzswap: add handlers " Nitin Gupta
2009-12-28 16:26 ` Yin Kangkai
2009-12-29 2:42 ` Nitin Gupta
2009-12-28 6:13 ` [PATCH 1/2] [mmotm] Add notifiers " Pekka Enberg
2009-12-28 10:21 ` Nitin Gupta
2009-12-28 15:02 ` Andi Kleen [this message]
2009-12-28 15:37 ` Nitin Gupta
2009-12-28 17:29 ` Andi Kleen
2009-12-28 18:43 ` Pekka Enberg
2009-12-28 19:23 ` Andi Kleen
2009-12-29 2:41 ` 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=87eimf87m5.fsf@basil.nowhere.org \
--to=andi@firstfloor.org \
--cc=akpm@linux-foundation.org \
--cc=hugh.dickins@tiscali.co.uk \
--cc=kamezawa.hiroyu@jp.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=ngupta@vflare.org \
--cc=penberg@cs.helsinki.fi \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox