From: kanoj@google.engr.sgi.com (Kanoj Sarcar)
To: Andrea Arcangeli <andrea@suse.de>
Cc: Linus Torvalds <torvalds@transmeta.com>,
Alan Cox <alan@lxorguk.ukuu.org.uk>,
linux-mm@kvack.org, linux-kernel@vger.rutgers.edu
Subject: Re: [RFC] 2.3.39 zone balancing
Date: Thu, 13 Jan 2000 10:30:00 -0800 (PST) [thread overview]
Message-ID: <200001131830.KAA72001@google.engr.sgi.com> (raw)
In-Reply-To: <Pine.LNX.4.21.0001131806190.1648-100000@alpha.random> from "Andrea Arcangeli" at Jan 13, 2000 06:12:45 PM
>
> On Wed, 12 Jan 2000, Kanoj Sarcar wrote:
>
> >+There are two reasons to be requesting non __GFP_WAIT allocations:
> >+the caller can not sleep (typically intr context), or does not want
> >+to incur cost overheads of page stealing and possible swap io.
>
> You may be in a place where you can sleep but you can't do I/O to avoid
> deadlocking and so you shouldn't use __GFP_IO and nothing more (it has
> nothing to do with __GFP_WAIT).
You are right: the documentation should read:
+Memory balancing is _only_ needed for non __GFP_WAIT and non __GFP_IO allocations.
+
+There are two reasons to be requesting non __GFP_WAIT allocations:
+the caller can not sleep (typically intr context), or does not want
+to incur cost overheads of page stealing and possible swap io.
+
+Non __GFP_IO allocations are requested to prevent filesystem deadlocks.
But I would not say __GFP_WAIT and __GFP_IO have no relationship. __GFP_IO
does not make sense if __GFP_WAIT is not set.
>
> But if it can sleep and there aren't deadlock conditons going on and it
> doesn't use __GFP_WAIT, it means it's buggy and has to be fixed.
>
Well, I thought about that while coding the patch: you can not try to
outsmart the programmer who writes that code. For example, I was
looking at replace_with_highmem() which makes __GFP_HIGHMEM|__GFP_HIGH
requests, although I _think_ it can do __GFP_WAIT|__GFP_IO without
any problems. I just assumed that whoever coded it (you/Mingo?) had
some logic, like not wanting to waste time scanning for stealable pages
or incur disk swap to implement this performance optimization (that
would defeat the optimization).
Kanoj
> I have not read the rest and the patch yet (I'll continue ASAP).
>
> Andrea
>
> --
> 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.nl.linux.org/Linux-MM/
>
--
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.nl.linux.org/Linux-MM/
next prev parent reply other threads:[~2000-01-13 18:30 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-01-12 21:11 Kanoj Sarcar
2000-01-13 13:40 ` Rik van Riel
2000-01-13 17:06 ` Andrea Arcangeli
2000-01-13 17:18 ` Alan Cox
2000-01-13 18:37 ` Rik van Riel
2000-01-13 20:13 ` Andrea Arcangeli
2000-01-13 21:12 ` Rik van Riel
2000-01-13 21:40 ` Kanoj Sarcar
2000-01-14 12:25 ` Jamie Lokier
2000-01-14 13:43 ` Andrea Arcangeli
2000-01-13 18:52 ` Kanoj Sarcar
2000-01-13 19:59 ` Andrea Arcangeli
2000-01-13 21:02 ` Kanoj Sarcar
2000-01-13 21:34 ` Benjamin C.R. LaHaise
2000-01-13 21:48 ` Kanoj Sarcar
2000-01-13 21:42 ` Alan Cox
2000-01-13 21:50 ` Kanoj Sarcar
2000-01-13 21:53 ` Alan Cox
2000-01-13 22:01 ` Linus Torvalds
2000-01-13 22:13 ` Kanoj Sarcar
2000-01-13 22:28 ` Rik van Riel
2000-01-13 22:30 ` Linus Torvalds
2000-01-13 23:53 ` Ingo Molnar
2000-01-13 23:29 ` Linus Torvalds
2000-01-14 0:33 ` Andrea Arcangeli
2000-01-14 0:52 ` Linus Torvalds
2000-01-14 1:08 ` Rik van Riel
2000-01-14 2:13 ` Ingo Molnar
2000-01-14 1:17 ` Kanoj Sarcar
2000-01-14 2:36 ` Ingo Molnar
2000-01-14 20:33 ` Peter Rival
2000-01-14 1:13 ` Kanoj Sarcar
2000-01-14 2:27 ` Ingo Molnar
2000-01-14 2:46 ` Ingo Molnar
2000-01-14 6:22 ` Kanoj Sarcar
2000-01-15 2:03 ` Reworked 2.3.39 zone balancing - v1 Kanoj Sarcar
2000-01-14 0:28 ` [RFC] 2.3.39 zone balancing Andrea Arcangeli
2000-01-13 17:12 ` Andrea Arcangeli
2000-01-13 18:30 ` Kanoj Sarcar [this message]
2000-01-13 19:22 ` Andrea Arcangeli
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=200001131830.KAA72001@google.engr.sgi.com \
--to=kanoj@google.engr.sgi.com \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=andrea@suse.de \
--cc=linux-kernel@vger.rutgers.edu \
--cc=linux-mm@kvack.org \
--cc=torvalds@transmeta.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