From: Johannes Weiner <hannes@cmpxchg.org>
To: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: David Howells <dhowells@redhat.com>,
Andrew Morton <akpm@linux-foundation.org>,
linux-kernel@vger.kernel.org, linux-mm@kvack.org,
Nick Piggin <npiggin@suse.de>, Rik van Riel <riel@redhat.com>,
Peter Zijlstra <peterz@infradead.org>,
MinChan Kim <minchan.kim@gmail.com>,
Lee Schermerhorn <Lee.Schermerhorn@hp.com>
Subject: Re: [patch 3/3] mm: keep pages from unevictable mappings off the LRU lists
Date: Thu, 26 Mar 2009 11:36:31 +0100 [thread overview]
Message-ID: <20090326103631.GA1775@cmpxchg.org> (raw)
In-Reply-To: <20090326175314.68F7.A69D9226@jp.fujitsu.com>
On Thu, Mar 26, 2009 at 05:56:52PM +0900, KOSAKI Motohiro wrote:
> > On Mon, Mar 23, 2009 at 10:53:27AM +0000, David Howells wrote:
> > > Johannes Weiner <hannes@cmpxchg.org> wrote:
> > >
> > > > - if (page_is_file_cache(page))
> > > > + if (mapping_unevictable(mapping))
> > > > + add_page_to_unevictable_list(page);
> > > > + else if (page_is_file_cache(page))
> > >
> > > It would be nice to avoid adding an extra test and branch in here. This
> > > function is used a lot, and quite often we know the answer to the first test
> > > before we even get here.
> >
> > Yes, I thought about that too. So I mounted a tmpfs and dd'd
> > /dev/zero to a file on it until it ran out of space (around 900M,
> > without swapping), deleted the file again. I did this in a tight loop
> > and profiled it.
> >
> > I couldn't think of a way that would excercise add_to_page_cache_lru()
> > more, I hope I didn't overlook anything, please correct if I am wrong.
> >
> > If I was not, than the extra checking for unevictable mappings doesn't
> > make a measurable difference. The function on the vanilla kernel had
> > a share of 0.2033%, on the patched kernel 0.1953%.
>
> May I ask the number of the cpu of your test box.
> In general, lock contention possibility depend on #ofCPUs.
Yes, sure. In this test I tried to find out how much this extra
branch makes a difference for the common path (untaken), though.
I have not tried to instrument the lock contention. But this will be
done with a quadcore system.
> So, I and lee mainly talked about large box.
Yeah, I don't have such a thing ;)
Hannes
--
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>
next prev parent reply other threads:[~2009-03-26 9:45 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20090311153034.9389.19938.stgit@warthog.procyon.org.uk>
2009-03-11 22:03 ` [PATCH] NOMMU: Pages allocated to a ramfs inode's pagecache may get wrongly discarded Andrew Morton
2009-03-11 22:36 ` Johannes Weiner
2009-03-12 0:02 ` Andrew Morton
2009-03-12 0:35 ` Minchan Kim
2009-03-12 1:04 ` KOSAKI Motohiro
2009-03-12 1:52 ` Minchan Kim
2009-03-12 1:56 ` Minchan Kim
2009-03-12 2:00 ` KOSAKI Motohiro
2009-03-12 2:11 ` Minchan Kim
2009-03-12 12:19 ` Robin Getz
2009-03-12 17:55 ` [uClinux-dev] " Jamie Lokier
2009-03-13 17:33 ` [PATCH 0/2] Make the Unevictable LRU available on NOMMU David Howells
2009-03-13 17:33 ` [PATCH 1/2] NOMMU: There is no mlock() for NOMMU, so don't provide the bits David Howells
2009-03-14 11:17 ` KOSAKI Motohiro
2009-03-13 17:33 ` [PATCH 2/2] NOMMU: Make CONFIG_UNEVICTABLE_LRU available when CONFIG_MMU=n David Howells
2009-03-14 11:17 ` KOSAKI Motohiro
2009-03-14 0:27 ` [PATCH 0/2] Make the Unevictable LRU available on NOMMU Minchan Kim
2009-03-20 16:08 ` Lee Schermerhorn
2009-03-20 16:24 ` David Howells
2009-03-20 18:30 ` Lee Schermerhorn
2009-03-21 10:20 ` Johannes Weiner
2009-03-22 20:13 ` [patch 1/3] mm: decouple unevictable lru from mmu Johannes Weiner
2009-03-22 23:46 ` KOSAKI Motohiro
2009-03-23 0:14 ` Johannes Weiner
2009-03-23 10:48 ` David Howells
2009-03-22 20:13 ` [patch 2/3] ramfs-nommu: use generic lru cache Johannes Weiner
2009-03-23 2:22 ` KOSAKI Motohiro
2009-03-22 20:13 ` [patch 3/3] mm: keep pages from unevictable mappings off the LRU lists Johannes Weiner
2009-03-23 0:44 ` Minchan Kim
2009-03-23 2:21 ` KOSAKI Motohiro
2009-03-23 8:42 ` Johannes Weiner
2009-03-23 9:01 ` KOSAKI Motohiro
2009-03-23 9:23 ` KOSAKI Motohiro
2009-03-26 0:48 ` Johannes Weiner
2009-03-23 10:40 ` [patch 2/3] ramfs-nommu: use generic lru cache David Howells
2009-03-23 10:53 ` [patch 3/3] mm: keep pages from unevictable mappings off the LRU lists David Howells
2009-03-26 0:01 ` Johannes Weiner
2009-03-26 8:56 ` KOSAKI Motohiro
2009-03-26 10:36 ` Johannes Weiner [this message]
2009-03-23 20:07 ` [PATCH 0/2] Make the Unevictable LRU available on NOMMU Lee Schermerhorn
2009-03-13 11:53 ` [PATCH] NOMMU: Pages allocated to a ramfs inode's pagecache may get wrongly discarded David Howells
2009-03-13 22:49 ` Johannes Weiner
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=20090326103631.GA1775@cmpxchg.org \
--to=hannes@cmpxchg.org \
--cc=Lee.Schermerhorn@hp.com \
--cc=akpm@linux-foundation.org \
--cc=dhowells@redhat.com \
--cc=kosaki.motohiro@jp.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=minchan.kim@gmail.com \
--cc=npiggin@suse.de \
--cc=peterz@infradead.org \
--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;
as well as URLs for NNTP newsgroup(s).