[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20090817141143.50091cd1.kamezawa.hiroyu@jp.fujitsu.com>
Date: Mon, 17 Aug 2009 14:11:43 +0900
From: KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>
To: ngupta@...are.org
Cc: mingo@...e.hu, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] swap: send callback when swap slot is freed
On Mon, 17 Aug 2009 10:38:28 +0530
Nitin Gupta <ngupta@...are.org> wrote:
> On 08/17/2009 08:25 AM, KAMEZAWA Hiroyuki wrote:
> > On Wed, 12 Aug 2009 20:07:43 +0530
> > Nitin Gupta<ngupta@...are.org> wrote:
> >
> >> Currently, we have "swap discard" mechanism which sends a discard bio request
> >> when we find a free cluster during scan_swap_map(). This callback can come a
> >> long time after swap slots are actually freed.
> >>
> >> This delay in callback is a great problem when (compressed) RAM [1] is used
> >> as a swap device. So, this change adds a callback which is called as
> >> soon as a swap slot becomes free. For above mentioned case of swapping
> >> over compressed RAM device, this is very useful since we can immediately
> >> free memory allocated for this swap page.
> >>
> >> This callback does not replace swap discard support. It is called with
> >> swap_lock held, so it is meant to trigger action that finishes quickly.
> >> However, swap discard is an I/O request and can be used for taking longer
> >> actions.
> >>
> >> Links:
> >> [1] http://code.google.com/p/compcache/
> >>
> >
> > Hmm, do you really need notify at *every* swap free ?
> > No batching is necessary ?
> >
>
> We need notify for every swap free and no batching is desired, at least for
> compcache case.
>
Okay..I'll read discussions in linux-mm.
Thanks you,
-Kame
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists