mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: Andrew Morton <akpm@osdl.org>
Cc: linux-kernel@vger.kernel.org, pavel@suse.cz, kernel@kolivas.org
Subject: Re: [PATCH -mm] swsusp: rework memory shrinker
Date: Tue, 18 Apr 2006 13:47:54 +0200	[thread overview]
Message-ID: <200604181347.55259.rjw@sisk.pl> (raw)
In-Reply-To: <20060418031355.7370b1e6.akpm@osdl.org>

On Tuesday 18 April 2006 12:13, Andrew Morton wrote:
> "Rafael J. Wysocki" <rjw@sisk.pl> wrote:
> >
> > Rework the swsusp's memory shrinker in the following way:
> 
> And what was the observed effect of all this?

Measurable effects:
1) It tends to free only as much memory as required, eg. if the image_size
is set to 450 MB, the actual image sizes are almost always well above
400 MB and they tended to be below that number without the patch
(~5-10% of a difference, but still :-)).
2) If image_size = 0, it frees everything that can be freed without any
workarounds (we had to add the additional loop checking for
ret >= nr_pages with the additional blk_congestion_wait() to the
"original" shrinker to achieve this).

A non-measurable effect is that with the patch applied  the system seems to
be more responsive after resume, but of course this may be an illusion.

> 
> > +		/* Force reclaiming mapped pages in the passes #3 and #4 */
> > +		if (pass > 2) {
> > +			sc.may_swap = 1;
> > +			vm_swappiness = 100;
> > +		}
> 
> That's a bit klunky.   Maybe we should move swappiness into scan_control.

Alternatively we can temporarily set zone->prev_priority to 100 in
shrink_all_zones() if pass > 2?

  reply	other threads:[~2006-04-18 11:49 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-04-18 10:01 Rafael J. Wysocki
2006-04-18 10:13 ` Andrew Morton
2006-04-18 11:47   ` Rafael J. Wysocki [this message]
2006-04-18 11:55     ` Rafael J. Wysocki
2006-04-18 20:48       ` [PATCH -mm] swsusp: rework memory shrinker (rev. 2) Rafael J. Wysocki

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=200604181347.55259.rjw@sisk.pl \
    --to=rjw@sisk.pl \
    --cc=akpm@osdl.org \
    --cc=kernel@kolivas.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pavel@suse.cz \
    /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

all inboxes | Powered by JetHome®