From: Rik van Riel <riel@conectiva.com.br>
To: Andrea Arcangeli <andrea@suse.de>
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: Tue, 13 Jun 2000 21:58:39 -0300 (BRST) [thread overview]
Message-ID: <Pine.LNX.4.21.0006132146370.2954-100000@duckman.distro.conectiva> (raw)
In-Reply-To: <Pine.LNX.4.21.0006140157280.9129-100000@inspiron.random>
On Wed, 14 Jun 2000, Andrea Arcangeli wrote:
> On Tue, 13 Jun 2000, Rik van Riel wrote:
>
> >The infinite loop case is orthagonal to classzone. Please don't
> >try to confuse the issues.
>
> It isn't! classzone will loop forever only if you are really out
> of memory,
Which is a bug, just the same as this can happen to the zoned design
when we run out of memory in one zone. As I said, orthagonal.
> >No. Kswapd will never get woken up until *all* zones get below
> >zone->pages_low. I fixed this buglet in the -ac patches.
>
> All zones gone under pages_low. The zone normal gone under the
> watermark due oracle mlocked shm, the other other zone (dma)
> gone down the watermark due the cache that is been allocated
> during I/O.
The zone approach doesn't really use the watermarks in the 2.2
sense. If all zones dive below pages_low, kswapd will free some
memory until all zones get just above pages_low.
We achieve something like the watermarks because we'll free the
pages that are at the end of the LRU list, so if one zone has a
lot of unused pages, we'll have freed up to pages_high memory in
that zone before we get the other zone above pages_low...
> >we should fix it in kswapd, but I don't see how this has anything to
> >do with classzone vs. the zoned approach.
>
> You can't fix this from kswapd with yet another hack.
Above you wrote that classzone has the exact same problem. If one
(class)zone gets out of memory and contains no freeable memory,
kswapd will enter an infinite loop. In this case there's no
difference between freeing memory from a classzone or a normal zone.
In fact, the bugfix would be the exact *same* for both classzone and
the normal zoned VM.
> >You're right that the current kswapd loop won't terminate and
> >that this is a bug, but it doesn't have anything at all to do
> >with the classzone idea.
>
> 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.
> >Classzone may be a nice abstraction for the current generation
> >of PCs, but it's simply not general enough to cover all corner
> >cases. [..]
>
> Sorry but your argument is silly. You say that you are not
> covering the corner cases at runtime in a PC used by 90% of
> userbase because you want to support another very alien
> architecture without having to change one bit of code in
> page_alloc.c?
No. I'm saying that the classzone abstraction is not general enough
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...
> All the architecture that I know fits in the classzone design,
> but don't worry about that, if there is some future that won't
> fit I will extend the classzone design to support also non
> inclusive zones. I simply avoid to overdesign at this time.
I don't think I can add anything to this. Adding features to
an already complex design to avoid overengineering??
cheers,
Rik
--
The Internet is not a network of computers. It is a network
of people. That is its real strength.
Wanna talk about the kernel? irc.openprojects.net / #kernelnewbies
http://www.conectiva.com/ http://www.surriel.com/
--
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 0:58 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 [this message]
2000-06-14 1:18 ` Andrea Arcangeli
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.0006132146370.2954-100000@duckman.distro.conectiva \
--to=riel@conectiva.com.br \
--cc=alan@redhat.com \
--cc=andrea@suse.de \
--cc=linux-kernel@vger.rutgers.edu \
--cc=linux-mm@kvack.org \
--cc=quintela@fi.udc.es \
--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