From: Peter Zijlstra <peterz@infradead.org>
To: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
linux-mm <linux-mm@kvack.org>,
Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH 4/5] Use add_page_to_lru_list() helper function
Date: Mon, 20 Jul 2009 09:28:31 +0200 [thread overview]
Message-ID: <1248074911.15751.8023.camel@twins> (raw)
In-Reply-To: <20090720143352.747E.A69D9226@jp.fujitsu.com>
On Mon, 2009-07-20 at 14:37 +0900, KOSAKI Motohiro wrote:
> > > @@ -1241,7 +1241,6 @@ static void move_active_pages_to_lru(str
> > > spin_lock_irq(&zone->lru_lock);
> > > }
> > > }
> > > - __mod_zone_page_state(zone, NR_LRU_BASE + lru, pgmoved);
> > > if (!is_active_lru(lru))
> > > __count_vm_events(PGDEACTIVATE, pgmoved);
> > > }
> >
> > This is a net loss, you introduce pgmoved calls to __inc_zone_state,
> > instead of the one __mod_zone_page_state() call.
>
> max pgmoved is 32. 32 times __inc_zone_state() make 0 or 1 time
> atomic operation (not much than two).
> I don't think it reduce performance.
its not just atomics, count calls and branches too. It simply adds a ton
of code for no particular reason.
--
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-07-20 7:27 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-16 8:37 [PATCH 1/5] move ClearPageActive from move_active_pages() to shrink_active_list() KOSAKI Motohiro
2009-07-16 8:38 ` [PATCH 2/5] Kill unnecessary page flag test KOSAKI Motohiro
2009-07-16 8:39 ` [PATCH 3/5] Kill unnecessary prefetch KOSAKI Motohiro
2009-07-16 8:40 ` [PATCH 4/5] Use add_page_to_lru_list() helper function KOSAKI Motohiro
2009-07-17 12:18 ` Peter Zijlstra
2009-07-20 5:37 ` KOSAKI Motohiro
2009-07-20 7:28 ` Peter Zijlstra [this message]
2009-07-20 14:30 ` KOSAKI Motohiro
2009-07-16 8:40 ` [PATCH 5/5] move PGDEACTIVATE modification to shrink_active_list() KOSAKI Motohiro
2009-07-16 17:14 ` [PATCH 1/5] move ClearPageActive from move_active_pages() " 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=1248074911.15751.8023.camel@twins \
--to=peterz@infradead.org \
--cc=akpm@linux-foundation.org \
--cc=kosaki.motohiro@jp.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
/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