linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
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 19:14:40 +0200 (CEST)	[thread overview]
Message-ID: <Pine.LNX.4.21.0006141858500.15011-100000@inspiron.random> (raw)
In-Reply-To: <Pine.LNX.4.21.0006141235460.6887-100000@duckman.distro.conectiva>

On Wed, 14 Jun 2000, Rik van Riel wrote:

>On Wed, 14 Jun 2000, Andrea Arcangeli wrote:
>> On Wed, 14 Jun 2000, Rik van Riel wrote:
>> 
>> >So if the ZONE_DMA is filled by mlock()ed memory, classzone
>> >will *not* try to balance it? Will classzone *only* try to
>> 
>> It will try but it won't succeed.
>> 
>> >balance the big classzone containing zone_dma, and not the
>> >dma zone itself?  (since the dma zone doesn't contain any
>> 
>> No, I definitely try to balance the DMA zone itself. But in such
>> case (all DMA zone mlocked) kswapd will just spend CPU trying to
>> balance the zone but it _can't_ succeed because mlocked just
>> means we can't even attempt to move such memory elsewhere in the
>> physical space or we'll break userspace critical latency needs.
>
>I fully agree with this, this is the obviously right thing to

Ok. [1]

>do. Would you be surprised to know that the code in the last
>2.4.0-ac kernels does exactly this?

I'm not surprised. I know what the current code does and infact I didn't
took that case as the testcase. That was _your_ testcase that you invented
changing the text of the problem in something that is handled correctly by
the current code and I'm not interested about it (as far as the kernel
continues to handle it correctly as now ;).

_My_ testcase (first mlocked and then cache) is instead handled wrong by
the latest kernels and that's the only thing I'm interested about at this
moment.

>(with the exception of the two implementation bugs which can
>cause kswapd and shrink_mmap to loop)

Indeed, I don't mind about that issue at the moment.

>> >A few mails back you wrote that the classzone patch would
>> >do just about the same if a _classzone_ fills up. (except
>> 
>> What you mean with "just about the same"? You mean spending CPU
>> in kswapd trying to release some memory? If so yes. When a
>> classzone fills up kswapd will spend cpu trying to free some
>> memory so that the next GFP_DMA/GFP_KERNEL/GFP_HIGHUSER
>> allocation (depending on the classzone that is low on memory)
>> will succeed.
>
>So classzone and the normal zoned VM behave in the same way here
>except that classzone doesn't show the bad effects when the
>allocations happen in a certain lucky order.
>
>I think the differences between classzone and the zoned vm are
>pretty small at this moment, with most of classzone's benefits
>being theoretical ones that rely on memory zones being inclusive
>rather than numa-like...

You got it. Exactly.

However don't mix numa with the internal of a node. We have the pgdat and
each one is a node in a NUMA system. All the zones internal to a pgdat
have to belong to the some node or it will become impossible to shrink
cache only from one zone and to do smart decisions in NUMA systems.

>> >that the different shrink_mmap() causes it to go to sleep
>> >before being woken up again at the next allocation)
>> 
>> In classzone shrink_mmap doesn't control in any way how kswapd
>> will react to low memory conditions. Only the level of memory of
>> the classzones are controlling kswapd. If classzone is low on
>> memory kswapd will keep to try to shrink it.
>
>Owww, so classzone kswapd will get into an infinite loop with
>the disaster scenario too?

Yes. If I understood well from the first line of your email you agree
that's the right behaviour (see [1]). Since in the disaster scenario the
ZONE_DMA classzone is low on memory kswapd will continue to spend CPU to
try to free some page there.

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/

  reply	other threads:[~2000-06-14 17:14 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
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 [this message]
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.0006141858500.15011-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