From: Andrea Arcangeli <andrea@suse.de>
To: Rik van Riel <riel@conectiva.com.br>
Cc: "Juan J. Quintela" <quintela@fi.udc.es>,
"Stephen C. Tweedie" <sct@redhat.com>,
Zlatko Calusic <zlatko@iskon.hr>,
alan@redhat.com, Linux MM List <linux-mm@kvack.org>,
Linux Kernel List <linux-kernel@vger.rutgers.edu>,
Linus Torvalds <torvalds@transmeta.com>
Subject: Re: [patch] improve streaming I/O [bug in shrink_mmap()]
Date: Wed, 14 Jun 2000 03:18:41 +0200 (CEST) [thread overview]
Message-ID: <Pine.LNX.4.21.0006140306110.12042-100000@inspiron.random> (raw)
In-Reply-To: <Pine.LNX.4.21.0006132146370.2954-100000@duckman.distro.conectiva>
On Tue, 13 Jun 2000, Rik van Riel wrote:
>> It have to do with the classzone idea, because you shouldn't
>> even try to repeat the loop because you should notice that the
>> ZONE_NORMAL _classzone_ is not under the watermark because you
>> succeeded freeing the cache from the ZONE_DMA.
>
>You're playing with words here. If the cache was allocated before
>the mlock()ed memory, classzone would loop forever on trying to
>free memory from the DMA zone. There is no fundamental difference
>in the manifestation of the bug on either classzone or the normal
>VM.
There's a _lot_ of difference: in your scenario the dma zone is in empty
and the next allocation GFP_DMA will fail. So it's right and necessary to
loop in kswapd because we are really low on memory on such zone (the dma
zone)!
In the scenario that I raised previously where the stock kernel loops
forever (so first mlocked in normal zone and then cache in dma zone) the
recycling will _succeed_ and there's no reason to keep looping in kswapd
trying to free the normal zone because the next allocation will succeed
without any problem. Do you see the difference?
>and we can support all corner cases of usage well without it. In
>fact, as I demonstrated above, even your own contorted example will
>hang classzone if I only switch the order in which the allocations
>happen...
It won't hang, but kswapd will eat CPU and that's right in your case. The
difference that you can't see is that in the second scenario where the
classzone would spend CPU in kswapd the CPU is spent for a purpose that
have a sense. In the first scenario where classzone wouldn't any spend
CPU, the CPU in kswapd would infact be _wasted_.
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.linux.eu.org/Linux-MM/
next prev parent reply other threads:[~2000-06-14 1:18 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-06-12 21:46 Zlatko Calusic
2000-06-12 22:29 ` Stephen C. Tweedie
2000-06-12 23:04 ` Rik van Riel
2000-06-13 15:08 ` Andrea Arcangeli
2000-06-13 17:08 ` Juan J. Quintela
2000-06-13 19:09 ` Andrea Arcangeli
2000-06-13 19:32 ` Rik van Riel
2000-06-13 23:07 ` Andrea Arcangeli
2000-06-13 23:34 ` Rik van Riel
2000-06-14 0:12 ` Andrea Arcangeli
2000-06-14 0:58 ` Rik van Riel
2000-06-14 1:18 ` Andrea Arcangeli [this message]
2000-06-14 1:33 ` Rik van Riel
2000-06-14 2:10 ` Andrea Arcangeli
2000-06-14 2:46 ` Rik van Riel
2000-06-14 13:01 ` Andrea Arcangeli
2000-06-14 13:44 ` Rik van Riel
2000-06-14 13:57 ` Andrea Arcangeli
2000-06-14 16:48 ` Rik van Riel
2000-06-14 17:14 ` Andrea Arcangeli
2000-06-14 17:33 ` Rik van Riel
2000-06-14 18:37 ` Andrea Arcangeli
2000-06-13 23:41 ` Juan J. Quintela
2000-06-14 0:21 ` Andrea Arcangeli
2000-06-13 19:20 ` Rik van Riel
2000-06-13 21:49 ` Andrea Arcangeli
2000-06-13 8:10 Roger Larsson
[not found] <8i3qe8$lltbv$1@fido.engr.sgi.com>
2000-06-14 6:17 ` Rajagopal Ananthanarayanan
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.0006140306110.12042-100000@inspiron.random \
--to=andrea@suse.de \
--cc=alan@redhat.com \
--cc=linux-kernel@vger.rutgers.edu \
--cc=linux-mm@kvack.org \
--cc=quintela@fi.udc.es \
--cc=riel@conectiva.com.br \
--cc=sct@redhat.com \
--cc=torvalds@transmeta.com \
--cc=zlatko@iskon.hr \
/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