From: Andrew Morton <akpm@linux-foundation.org>
To: Martin Bligh <mbligh@mbligh.org>
Cc: Andrea Arcangeli <andrea@suse.de>,
linux-mm@kvack.org, Nick Piggin <npiggin@suse.de>
Subject: Re: make swappiness safer to use
Date: Tue, 31 Jul 2007 16:49:38 -0700 [thread overview]
Message-ID: <20070731164938.aad531b5.akpm@linux-foundation.org> (raw)
In-Reply-To: <46AFC676.4030907@mbligh.org>
On Tue, 31 Jul 2007 16:32:06 -0700
Martin Bligh <mbligh@mbligh.org> wrote:
> > Anyway, we can say more if we see the patch (or, more accurately, the
> > analysis which comes with that patch).
>
> I must say, I don't see what's wrong with killing it and having it
> local. We're rotating the list all the time, IIRC ... so if we start
> off with only 1/2^12th of the list ... does it matter? we'll just
> crank it up higher fairly quickly. Not sure why we want to start
> with the same chunk size we did last time.
This scenario:
- a thread goes into shrink_active_list(), does scan, scan, scan, finding
only mapped pages.
- eventually, we reach a sufficiently high priority to flip into
reclaim-mapped mode.
- now, we quickly move SWAP_CLUSTER_MAX pages onto the inactive list, and
we're done.
So we scanned a few thousand pages, then moved 32-odd down to the inactive
list.
Now, someone else comes in and does some reclaim. It would be bad to scan
another few thousand pages and to then move 32-odd pages down to the
inactive list. Think what that pattern looks like: lumps of 32-pages with a
few thousand pages between them getting deactivated.
To fix this, we attempt to start scanning out in the state which it was
originally in: ie, the state which this caller to shrink_active_list()
would have discovered for himself _anyway_. After enough pages have been
pointlessly recirculated.
Can the current implemetnation make mistakes? Sure. But I'd suggest that
it will make far less than (thousands/32) mistakes.
--
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/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
prev parent reply other threads:[~2007-07-31 23:49 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-31 21:52 Andrea Arcangeli
2007-07-31 22:12 ` Andrew Morton
2007-07-31 22:40 ` Andrea Arcangeli
2007-07-31 22:51 ` Andrew Morton
2007-07-31 23:02 ` Andrea Arcangeli
[not found] ` <20070801011925.GB20109@mail.ustc.edu.cn>
2007-08-01 1:19 ` Fengguang Wu
[not found] ` <20070801012222.GA20565@mail.ustc.edu.cn>
2007-08-01 1:22 ` Fengguang Wu
[not found] ` <20070801013208.GA20085@mail.ustc.edu.cn>
2007-08-01 1:32 ` Fengguang Wu
2007-08-01 2:33 ` Andrea Arcangeli
2007-08-06 18:21 ` Andrew Morton
[not found] ` <20070807050032.GA16179@mail.ustc.edu.cn>
2007-08-07 5:00 ` Fengguang Wu
2007-11-12 2:07 ` YAMAMOTO Takashi
2007-08-01 2:30 ` Andrea Arcangeli
2007-07-31 23:09 ` Andrew Morton
2007-07-31 23:23 ` Andrea Arcangeli
2007-07-31 23:32 ` Martin Bligh
2007-07-31 23:49 ` Andrew Morton [this message]
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=20070731164938.aad531b5.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=andrea@suse.de \
--cc=linux-mm@kvack.org \
--cc=mbligh@mbligh.org \
--cc=npiggin@suse.de \
/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