From: Linus Torvalds <torvalds@linux-foundation.org>
To: Nitin Gupta <ngupta@vflare.org>
Cc: Greg KH <greg@kroah.com>, Minchan Kim <minchan.kim@gmail.com>,
Pekka Enberg <penberg@cs.helsinki.fi>,
Hugh Dickins <hugh.dickins@tiscali.co.uk>, Cyp <cyp561@gmail.com>,
driverdev <devel@driverdev.osuosl.org>,
linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 0/3] ramzswap: Eliminate stale data in compressed memory
Date: Wed, 5 May 2010 09:22:50 -0700 (PDT) [thread overview]
Message-ID: <alpine.LFD.2.00.1005050912310.5478@i5.linux-foundation.org> (raw)
In-Reply-To: <4BE1973D.5040206@vflare.org>
On Wed, 5 May 2010, Nitin Gupta wrote:
>
> I think such 'swap_operations' structure will be have to be part of
> block_device_operations, so we may access it from swap_entry_free()
> where a swap slot is freed. This will also get rid of all this notifier
> stuff.
Yes, I think adding it to block_device_operations would be fine. That
sounds like a sane layering, and would make it easy for a block device
driver to say "I want to know about swap events".
In fact, for regular block devices, a swap block free might well translate
into a TRIM command some day (where "some day" means when the SSD's
actually get their stuff together and there is real upside and not just
"most cases will be very slow and the upside is debatable").
> The patch you nacked did something similar: it add 'swap_slot_free_callback'
> directly to block_device_operations. Without such change, I could not think
> of any way to do away with notifiers.
Umm. No. IIRC, the patch I NAK'ed aded it to the 'swap_info_struct', which
I said was the wrong level. The block device driver level would seem to be
the _right_ level, since that's what ramzswap is. No?
Also, the patch I NAK'ed also used those nasty notifier chains, making it
even uglier.
Linus
next prev parent reply other threads:[~2010-05-05 16:25 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-05 13:45 [PATCH 0/3] ramzswap: Eliminate stale data in compressed memory Nitin Gupta
2010-05-05 13:45 ` [PATCH 1/3] Add notifiers for swapon and swapoff events Nitin Gupta
2010-05-05 13:45 ` [PATCH 2/3] Send callback when a swap slot is freed Nitin Gupta
2010-05-05 13:45 ` [PATCH 3/3] ramzswap: Register for swap event notifiers and callback Nitin Gupta
2010-05-05 15:14 ` [PATCH 0/3] ramzswap: Eliminate stale data in compressed memory Linus Torvalds
2010-05-05 16:05 ` Nitin Gupta
2010-05-05 16:22 ` Linus Torvalds [this message]
2010-05-05 16:55 ` Nitin Gupta
2010-05-05 17:50 ` Linus Torvalds
-- strict thread matches above, loose matches on Subject: below --
2010-03-05 10:22 Nitin Gupta
2010-03-09 19:07 ` Nitin Gupta
2010-03-11 7:22 ` Hugh Dickins
2010-03-11 11:36 ` 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=alpine.LFD.2.00.1005050912310.5478@i5.linux-foundation.org \
--to=torvalds@linux-foundation.org \
--cc=cyp561@gmail.com \
--cc=devel@driverdev.osuosl.org \
--cc=greg@kroah.com \
--cc=hugh.dickins@tiscali.co.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=minchan.kim@gmail.com \
--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