[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20120308143034.f3521b1e.kamezawa.hiroyu@jp.fujitsu.com>
Date: Thu, 8 Mar 2012 14:30:34 +0900
From: KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>
To: Hugh Dickins <hughd@...gle.com>
Cc: Konstantin Khlebnikov <khlebnikov@...nvz.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Johannes Weiner <jweiner@...hat.com>, linux-mm@...ck.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 3/7 v2] mm: rework __isolate_lru_page() file/anon filter
On Tue, 6 Mar 2012 19:22:21 -0800 (PST)
Hugh Dickins <hughd@...gle.com> wrote:
> On Sat, 3 Mar 2012, Konstantin Khlebnikov wrote:
>
> > This patch adds file/anon filter bits into isolate_mode_t,
> > this allows to simplify checks in __isolate_lru_page().
> >
> > v2:
> > * use switch () instead of if ()
> > * fixed lumpy-reclaim isolation mode
> >
> > Signed-off-by: Konstantin Khlebnikov <khlebnikov@...nvz.org>
>
> I'm sorry to be messing you around on this one, Konstantin, but...
>
> (a) if you do go with the switch statements,
> in kernel we align the "case"s underneath the "switch"
>
> but
>
> (b) I seem to be at odds with Kamezawa-san, I much preferred your
> original, which did in 2 lines what the switches do in 10 lines.
> And I'd say there's more opportunity for error in 10 lines than 2.
>
> What does the compiler say (4.5.1 here, OPTIMIZE_FOR_SIZE off)?
> text data bss dec hex filename
> 17723 113 17 17853 45bd vmscan.o.0
> 17671 113 17 17801 4589 vmscan.o.1
> 17803 113 17 17933 460d vmscan.o.2
>
> That suggests that your v2 is the worst and your v1 the best.
> Kame, can I persuade you to let the compiler decide on this?
>
Hmm. How about Costa' proposal ? as
int tmp_var = PageActive(page) ? ISOLATE_ACTIVE : ISOLATE_INACTIVE
if (!(mode & tmp_var))
ret;
Thanks,
-Kame
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists