linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: hannes@cmpxchg.org
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Rik van Riel <riel@redhat.com>,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org
Subject: Re: [PATCH 0/3] swsusp: shrink file cache first
Date: Sat, 7 Feb 2009 00:39:53 +0100	[thread overview]
Message-ID: <200902070039.54402.rjw@sisk.pl> (raw)
In-Reply-To: <E1LVFiv-00032p-HX@cmpxchg.org>

> Hello!

Hi Hannes,
 
> here are three patches that adjust the memory shrinking code used for
> suspend-to-disk.
> 
> The first two patches are cleanups only and can probably go in
> regardless of the third one.
> 
> The third patch changes the shrink_all_memory() logic to drop the file
> cache first before touching any mapped files and only then goes for
> anon pages.
> 
> The reason is that everything not shrunk before suspension has to go
> into the image and will be 'prefaulted' before the processes can
> resume and the system is usable again, so the image should be small
> and contain only pages that are likely to be used right after resume
> again.  And this in turn means that the inactive file cache is the
> best point to start decimating used memory.
> 
> Also, right now, subsequent faults of contiguously mapped files are
> likely to perform better than swapin (see
> http://kernelnewbies.org/KernelProjects/SwapoutClustering), so not
> only file cache is preferred over other pages, but file pages over
> anon pages in general.
> 
> Testing up to this point shows that the patch does what is intended,
> shrinking file cache in favor of anon pages.  But whether the idea is
> correct to begin with is a bit hard to quantify and I am still working
> on it, so RFC only.

Thanks a lot for the patches, I'll review them as soon as I can.

I've got them with broken headers, but that's not a big deal.

Best,
Rafael

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

           reply	other threads:[~2009-02-06 23:40 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <E1LVFiv-00032p-HX@cmpxchg.org>]

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=200902070039.54402.rjw@sisk.pl \
    --to=rjw@sisk.pl \
    --cc=akpm@linux-foundation.org \
    --cc=hannes@cmpxchg.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=riel@redhat.com \
    /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