[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20070914100634.bee81fe6.kamezawa.hiroyu@jp.fujitsu.com>
Date: Fri, 14 Sep 2007 10:06:34 +0900
From: KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>
To: Richard Knutsson <ricknu-0@...dent.ltu.se>
Cc: LKML <linux-kernel@...r.kernel.org>,
Andrew Morton <akpm@...ux-foundation.org>,
"nickpiggin@...oo.com.au" <nickpiggin@...oo.com.au>,
"linux-mm@...ck.org" <linux-mm@...ck.org>
Subject: Re: [PATCH] add page->mapping handling interface [1/35] interface
definitions
On Thu, 13 Sep 2007 22:19:20 +0200
Richard Knutsson <ricknu-0@...dent.ltu.se> wrote:
> > +static inline int page_is_pagecache(struct page *page)
> >
> Why return it as an 'int' instead of 'bool'?
> > +{
> > + if (!page->mapping || (page->mapping & PAGE_MAPPING_ANON))
> > + return 0;
> > + return 1;
> > +}
Ah, I missed bool type just because I have no experience to use 'bool' in
Linux kernel. ok, will try in the next version. thank you.
> >
> Not easier with 'return page->mapping && (page->mapping &
> PAGE_MAPPING_ANON) == 0;'?
> > +
yours seems better.
>
> > static inline int PageAnon(struct page *page)
> >
> Change to bool? Then "you" can also remove the '!!' from:
> mm/memory.c:483: rss[!!PageAnon(page)]++;
Hmm, will try unless it makes diff big.
> > {
> > - return ((unsigned long)page->mapping & PAGE_MAPPING_ANON) != 0;
> > + return (page->mapping & PAGE_MAPPING_ANON) != 0;
> > +}
> > +
> >
> <snip>
>
> If you don't mind bool(eans) (for some reason), I can/will check out the
> rest.
>
Thank you. I'll try 'bool' type.
Regards,
-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