linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: David Rientjes <rientjes@google.com>
Cc: Bob Liu <lliubbo@gmail.com>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	linux-fsdevel@vger.kernel.org, viro@zeniv.linux.org.uk,
	mgorman@suse.de, hannes@cmpxchg.org, riel@redhat.com,
	minchan@kernel.org, Bob Liu <bob.liu@oracle.com>
Subject: Re: [PATCH] mm: pagevec: cleanup: drop pvec->cold argument in all places
Date: Thu, 3 Oct 2013 14:10:08 -0700	[thread overview]
Message-ID: <20131003141008.0bf310445041a0919fe84fb9@linux-foundation.org> (raw)
In-Reply-To: <alpine.DEB.2.02.1310012243220.5682@chino.kir.corp.google.com>

On Tue, 1 Oct 2013 22:47:36 -0700 (PDT) David Rientjes <rientjes@google.com> wrote:

> On Mon, 30 Sep 2013, Andrew Morton wrote:
> 
> > > Nobody uses the pvec->cold argument of pagevec and it's also unreasonable for
> > > pages in pagevec released as cold page, so drop the cold argument from pagevec.
> > 
> > Is it unreasonable?  I'd say it's unreasonable to assume that all pages
> > in all cases are likely to be cache-hot.  Example: what if the pages
> > are being truncated and were found to be on the inactive LRU,
> > unreferenced?
> > 
> > A useful exercise would be to go through all those pagevec_init() sites
> > and convince ourselves that the decision at each place was the correct
> > one.
> > 
> 
> Agreed, and the "cold" argument to release_pages() becomes a no-op if this 
> patch is merged meaning that anything released through it will 
> automatically go to the start of the pcp lists.  If the pages aren't hot 
> then this is exactly the opposite of what we wanted to do; the fact that 
> the pvec length doesn't take into account the size of cpu cache can almost 
> guarantee that everything isn't cache hot.

The hot/cold pages code was very marginal when we first merged it and I
suspect it has rotted since.

It would be a useful exercise for someone to disable it then run some
benchmarks with a view to removing it all.  But the problem I have with
this approach is perhaps the code *could* become effective if some
careful maintenance work was done on it - we should at least get the
hot/cold decisions optimised before making a decision about the overall
desirability of keeping it.



--
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>

      reply	other threads:[~2013-10-03 21:10 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-28  8:33 [PATCH] mm: pagevec: cleanup: drop pvec->cold argument in all places Bob Liu
2013-09-30 22:02 ` Andrew Morton
2013-10-02  5:47   ` David Rientjes
2013-10-03 21:10     ` 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=20131003141008.0bf310445041a0919fe84fb9@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=bob.liu@oracle.com \
    --cc=hannes@cmpxchg.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=lliubbo@gmail.com \
    --cc=mgorman@suse.de \
    --cc=minchan@kernel.org \
    --cc=riel@redhat.com \
    --cc=rientjes@google.com \
    --cc=viro@zeniv.linux.org.uk \
    /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;
as well as URLs for NNTP newsgroup(s).