From: "Nate Diller" <nate.diller@gmail.com>
To: "Christoph Lameter" <clameter@sgi.com>
Cc: "Arjan van de Ven" <arjan@infradead.org>,
"Andrew Morton" <akpm@linux-foundation.org>,
linux-kernel@vger.kernel.org,
"Nick Piggin" <nickpiggin@yahoo.com.au>,
"KAMEZAWA Hiroyuki" <kamezawa.hiroyu@jp.fujitsu.com>,
"Rik van Riel" <riel@redhat.com>
Subject: Re: [RFC] Tracking mlocked pages and moving them off the LRU
Date: Wed, 7 Feb 2007 10:39:04 -0800 [thread overview]
Message-ID: <5c49b0ed0702071039uf20d0e7h8604b0e914f950f1@mail.gmail.com> (raw)
In-Reply-To: <Pine.LNX.4.64.0702062356130.2188@schroedinger.engr.sgi.com>
On 2/7/07, Christoph Lameter <clameter@sgi.com> wrote:
> On Tue, 6 Feb 2007, Nate Diller wrote:
>
> > > The dirty ratio with the ZVCS would be
> > >
> > > NR_DIRTY + NR_UNSTABLE_NFS
> > > /
> > > NR_FREE_PAGES + NR_INACTIVE + NR_ACTIVE + NR_MLOCK
> >
> > I don't understand why you want to account mlocked pages in
> > dirty_ratio. of course mlocked pages *can* be dirty, but they have no
> > relevance in the write throttling code. the point of dirty ratio is
>
> mlocked pages can be counted as dirty pages. So if we do not include
> NR_MLOCK in the number of total pages that could be dirty then we may in
> some cases have >100% dirty pages.
unless we exclude mlocked dirty pages from NR_DIRTY accounting, which
is what i suggest should be done as part of this patch
> > to guarantee that there are some number of non-dirty, non-pinned,
> > non-mlocked pages on the LRU, to (try to) avoid deadlocks where the
> > writeback path needs to allocate pages, which many filesystems like to
> > do. if an mlocked page is clean, there's still no way to free it up,
> > so it should not be treated as being on the LRU at all, for write
> > throttling. the ideal (IMO) dirty ratio would be
>
> Hmmm... I think write throttling is different from reclaim. In write
> throttling the major objective is to decouple the applications from
> the physical I/O. So the dirty ratio specifies how much "buffer" space
> can be used for I/O. There is an issue that too many dirty pages will
> cause difficulty for reclaim because pages can only be reclaimed after
> writeback is complete.
NR_DIRTY is only used for write throttling, right? well, and
reporting to user-space, but again, i suggest that user space should
get to see NR_MLOCKED as well. would people flip out if NR_DIRTY
stopped showing pages that are mlocked, as long as a seperate
NR_MLOCKED variable was present?
> And yes this is not true for mlocked pages.
>
> >
> > NR_DIRTY - NR_DIRTY_MLOCKED + NR_UNSTABLE_NFS
> > /
> > NR_FREE_PAGES + NR_INACTIVE + NR_ACTIVE
> >
> > obviously it's kinda useless to keep an NR_DIRTY_MLOCKED counter, any
> > of these mlock accounting schemes could easily be modified to update
> > the NR_DIRTY counter so that it only reflects dirty unpinned pages,
> > and not mlocked ones.
>
> So you would be okay with dirty_ratio possibly be >100% of mlocked pages
> are dirty?
>
> > is that the only place you wanted to have an accurate mocked page count?
>
> Rik had some other ideas on what to do with it. I also think we may end up
> checking for excessive high mlock counts in various tight VM situations.
i'd be wary of a VM algorithm that treated mlocked pages any
differently than, say, unreclaimable slab pages. but there are no
concrete suggestions yet, so i won't comment further.
all this is not to say that i dislike the idea of keeping mlocked
pages off the LRU, quite the opposite i've been looking for this for a
while and was hoping that Stone Wang's wired list patch
(http://lkml.org/lkml/2006/3/20/128) would get further than it did.
but i don't see the need to keep strict accounting if it hurts
performance in the common case.
NATE
next prev parent reply other threads:[~2007-02-07 18:39 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-02-03 6:20 Christoph Lameter
2007-02-03 8:53 ` Andrew Morton
2007-02-03 17:56 ` Christoph Lameter
2007-02-03 18:04 ` Arjan van de Ven
2007-02-03 18:09 ` Christoph Lameter
2007-02-03 18:55 ` Christoph Lameter
2007-02-03 19:03 ` Christoph Lameter
2007-02-04 1:22 ` Andrew Morton
2007-02-04 1:49 ` Christoph Lameter
2007-02-04 8:16 ` Arjan van de Ven
2007-02-05 6:45 ` Christoph Lameter
2007-02-06 22:05 ` Nate Diller
2007-02-07 8:02 ` Christoph Lameter
2007-02-07 18:39 ` Nate Diller [this message]
2007-02-05 7:57 ` Christoph Lameter
2007-02-05 8:39 ` Arjan van de Ven
2007-02-05 16:38 ` Matt Mackall
2007-02-05 17:34 ` Christoph Lameter
2007-02-05 19:04 ` Christoph Lameter
2007-02-05 17:33 ` Christoph Lameter
2007-02-03 22:58 ` Nigel Cunningham
2007-02-03 10:16 ` Christoph Hellwig
2007-02-03 15:35 ` Martin J. Bligh
2007-02-03 17:59 ` Christoph Lameter
2007-02-03 17:33 ` Christoph Lameter
2007-02-03 22:56 ` Nigel Cunningham
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=5c49b0ed0702071039uf20d0e7h8604b0e914f950f1@mail.gmail.com \
--to=nate.diller@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=arjan@infradead.org \
--cc=clameter@sgi.com \
--cc=kamezawa.hiroyu@jp.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=nickpiggin@yahoo.com.au \
--cc=riel@redhat.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
all inboxes | Powered by JetHome®