public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@osdl.org>
To: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: pavel@suse.cz, linux-kernel@vger.kernel.org
Subject: Re: [RFC][PATCH -mm 2/2] mm: make shrink_all_memory try harder
Date: Tue, 28 Feb 2006 10:46:38 -0800	[thread overview]
Message-ID: <20060228104638.2251d469.akpm@osdl.org> (raw)
In-Reply-To: <200602281825.55355.rjw@sisk.pl>

"Rafael J. Wysocki" <rjw@sisk.pl> wrote:
>
> On Tuesday 28 February 2006 04:25, Andrew Morton wrote:
> > "Rafael J. Wysocki" <rjw@sisk.pl> wrote:
> > >
> > > Make shrink_all_memory() repeat the attempts to free more memory if there
> > > seems to be no pages to free.
> > > 
> > 
> > This description doesn't describe what the problem is, not how the patch
> > fixes it.  So I'm kinda left guessing.
> 
> I have described it in the 0/0 message, but I should have repeated that in the
> changelog, sorry.

Actually these [patch 0/n] emails are a nuisance - some poor schmuck just
has to copy-n-paste that text into the fist patch's changelog anwyay.

> > swsusp should call drop_pagecache() and then drop_slab() before trying to
> > use shrink_all_memory(), btw.
> 
> Well, sometimes we don't need to free a lot of memory.

OK.  But if clean pagecache and reclaimable slabs are left in memory,
they'll have to be written to swap, won't they?

It could well be more efficent to restore them from swap.  Slower suspend,
faster resume.

> > +	if (retry-- && ret < nr_pages) {
> > +		blk_congestion_wait(WRITE, HZ/5);
> > +		goto repeat;
> > +	}
> 
> I'd like to do this only if ret is 0.

Well I figured that this was a more general approach: we were _asked_ to
free that many pages.  If we haven't done that yet, keep trying.  Can you
test that code please?


  reply	other threads:[~2006-02-28 18:48 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-27 18:26 [RFC][PATCH -mm 0/2] mm: shrink_all_memory improvements Rafael J. Wysocki
2006-02-27 18:28 ` [RFC][PATCH -mm 1/2] mm: make shrink_all_memory overflow-resistant Rafael J. Wysocki
2006-02-27 18:53   ` Jesper Juhl
2006-02-27 19:02     ` Pavel Machek
2006-02-27 19:06       ` Jesper Juhl
2006-02-27 23:15     ` Rafael J. Wysocki
2006-02-28  3:16   ` Andrew Morton
2006-02-28 17:28     ` Rafael J. Wysocki
2006-02-27 18:30 ` [RFC][PATCH -mm 2/2] mm: make shrink_all_memory try harder Rafael J. Wysocki
2006-02-28  3:25   ` Andrew Morton
2006-02-28 17:25     ` Rafael J. Wysocki
2006-02-28 18:46       ` Andrew Morton [this message]
2006-02-28 23:04         ` Rafael J. Wysocki
2006-02-27 18:33 ` [RFC][PATCH -mm 0/2] mm: shrink_all_memory improvements Pavel Machek

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