From: Marcelo Tosatti <marcelo@conectiva.com.br>
To: Jonathan Morton <chromi@cyberspace.org>
Cc: linux-mm@kvack.org
Subject: Re: [PATCH] VM tuning patch, take 2
Date: Thu, 7 Jun 2001 21:42:22 -0300 (BRT) [thread overview]
Message-ID: <Pine.LNX.4.21.0106072138030.1156-100000@freak.distro.conectiva> (raw)
In-Reply-To: <l03130326b745e267d7e8@[192.168.239.105]>
On Fri, 8 Jun 2001, Jonathan Morton wrote:
> At 1:19 am +0100 8/6/2001, Marcelo Tosatti wrote:
> >+ if ((gfp_mask & (__GFP_WAIT | __GFP_IO)) == (__GFP_WAIT |
> >__GFP_IO)) {
> >+ int progress = try_to_free_pages(gfp_mask);
> >+ if(!progress) {
> >+ wakeup_kswapd(1);
> >+ goto try_again;
> >+ }
> >
> >You're going to allow GFP_BUFFER allocations to eat from the reserved
> >queues. Eek.
>
> Hang on, I did optimise that part - let me check it against your
> original... but hey, it's the same behaviour!
>
> if (gfp_mask & __GFP_WAIT) {
> int progress;
> if (gfp_mask & __GFP_IO) {
> progress = try_to_free_pages(gfp_mask);
> if (!progress) {
> /*
> * Not able to make progress freeing
> * pages: wait for kswapd to free
> * pages if possible.
> */
> if (gfp_mask & __GFP_IO) {
> wakeup_kswapd(1);
> goto try_again;
> }
> }
> }
> }
>
> Can you point out why the behaviour of your code is *any* different from
> mine?
It is not.
> Or have you just found a bug in your own code? :)
Yes, my code is also broken.
It should be:
progress = try_to_free_pages(gfp_mask);
if (!progress) {
if (gfp_mask & __GFP_IO) {
wakeup_kswapd(1);
goto try_again;
} else
return NULL;
} else
goto try_again;
Also note that my code makes non-zero order allocations loop like mad
here. You may want to fix that, too.
--
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/
next prev parent reply other threads:[~2001-06-08 0:42 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <l0313031fb74590aea499@[192.168.239.105]>
[not found] ` <3B1FED7C.4E483BCD@mandrakesoft.com>
2001-06-07 22:59 ` Jonathan Morton
2001-06-07 23:44 ` Marcelo Tosatti
2001-06-08 1:35 ` Jonathan Morton
2001-06-08 0:19 ` Marcelo Tosatti
2001-06-08 2:08 ` Jonathan Morton
2001-06-08 0:42 ` Marcelo Tosatti [this message]
2001-06-08 2:35 ` Jonathan Morton
2001-06-08 1:59 ` Ed Tomlinson
2001-06-09 3:30 ` Rik van Riel
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=Pine.LNX.4.21.0106072138030.1156-100000@freak.distro.conectiva \
--to=marcelo@conectiva.com.br \
--cc=chromi@cyberspace.org \
--cc=linux-mm@kvack.org \
/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