From: Con Kolivas <kernel@kolivas.org>
To: Hans Kristian Rosbach <hk@isphuset.no>
Cc: linux kernel mailing list <linux-kernel@vger.kernel.org>,
Thomas Schlichter <thomas.schlichter@web.de>,
ck list <ck@vds.kolivas.org>
Subject: Re: [PATCH][RFC] vm: swap prefetch
Date: Fri, 2 Sep 2005 00:18:32 +1000 [thread overview]
Message-ID: <200509020018.32993.kernel@kolivas.org> (raw)
In-Reply-To: <1125584303.25400.3.camel@linux>
On Fri, 2 Sep 2005 00:18, Hans Kristian Rosbach wrote:
> On Thu, 2005-09-01 at 23:46 +1000, Con Kolivas wrote:
> > Here is a working swap prefetching patch for 2.6.13. I have resuscitated
> > and rewritten some early prefetch code Thomas Schlichter did in late 2.5
> > to create a configurable kernel thread that reads in swap from ram in
> > reverse order it was written out. It does this once kswapd has been idle
> > for a minute (implying no current vm stress). This patch attached below
> > is a rollup of two patches the current versions of which are here:
> >
> > http://ck.kolivas.org/patches/swap-prefetch/
> >
> > These add an exclusive_timer function, and the patch that does the swap
> > prefetching. I'm posting this rollup to lkml to see what the interest is
> > in this feature, and for people to test it if they desire. I'm planning
> > on including it in the next -ck but wanted to gauge general user opinion
> > for mainline. Note that swapped in pages are kept on backing store
> > (swap), meaning no further I/O is required if the page needs to swap back
> > out.
>
> I would definitely use this if available.
Great.
> That said, I have often thought it might be good to have something like
> pre-writing swap, ie reverse what your patch does.
>
> In other words it'd keep as much of swappable data on disk as possible,
> but without removing it from memory. So when it comes time to free up
> some memory, the data is already on disk so no performance penalty from
> writing it out.
>
> Hopefully something worth thinking about.
Actually to some degree this patch does that, albeit only on things that are
swapped out "naturally". Anything that is swapped out and is unnaturally
swapped back in using prefetching is kept on swap, and you often find much
more swap sitting around ready for freeing up ram whenever there is memory
pressure again.
Cheers,
Con
next prev parent reply other threads:[~2005-09-01 14:18 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-09-01 13:46 [PATCH][RFC] vm: swap prefetch Con Kolivas
2005-09-01 14:18 ` Hans Kristian Rosbach
2005-09-01 14:18 ` Con Kolivas [this message]
2005-09-02 15:01 ` [ck] " Pedro Venda
2005-09-02 14:10 ` Con Kolivas
2005-09-02 15:36 ` Pedro Venda
2005-09-01 15:15 ` Thomas Schlichter
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=200509020018.32993.kernel@kolivas.org \
--to=kernel@kolivas.org \
--cc=ck@vds.kolivas.org \
--cc=hk@isphuset.no \
--cc=linux-kernel@vger.kernel.org \
--cc=thomas.schlichter@web.de \
/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