[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20090428183601.GC18893@csn.ul.ie>
Date: Tue, 28 Apr 2009 19:36:01 +0100
From: Mel Gorman <mel@....ul.ie>
To: Hugh Dickins <hugh@...itas.com>
Cc: Christoph Lameter <cl@...ux.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Linux Memory Management List <linux-mm@...ck.org>,
KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>,
Nick Piggin <npiggin@...e.de>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Lin Ming <ming.m.lin@...el.com>,
Peter Zijlstra <peterz@...radead.org>,
Pekka Enberg <penberg@...helsinki.fi>,
"Zhang, Yanmin" <yanmin_zhang@...ux.intel.com>
Subject: Re: [PATCH] Properly account for freed pages in free_pages_bulk()
and when allocating high-order pages in buffered_rmqueue()
On Tue, Apr 28, 2009 at 06:15:30PM +0100, Hugh Dickins wrote:
> On Tue, 28 Apr 2009, Mel Gorman wrote:
> > On Tue, Apr 28, 2009 at 12:37:22PM -0400, Christoph Lameter wrote:
> > > On Tue, 28 Apr 2009, Mel Gorman wrote:
> > >
> > > > @@ -1151,6 +1151,7 @@ again:
> > > > } else {
> > > > spin_lock_irqsave(&zone->lock, flags);
> > > > page = __rmqueue(zone, order, migratetype);
> > > > + __mod_zone_page_state(zone, NR_FREE_PAGES, -(1UL << order));
> > > > spin_unlock(&zone->lock);
> > > > if (!page)
> > > > goto failed;
> > >
> > > __mod_zone_page_state takes an signed integer argument. Not sure what is
> > > won by the UL suffix here.
> > >
> >
> > Matches other call sites such as in __offline_isolated_pages(), habit when
> > using shifts like this and matches other locations, paranoia, doesn't hurt.
>
> Well, not a big deal, but I'd say that it does hurt: by wasting people's
> time (mine!), wondering what that "UL" is for - I'd have had to ask, if
> Christoph hadn't cleared this up first (thank you). And elsewhere,
> you're using an int << order to update NR_FREE_PAGES, so I don't see
> the consistency argument.
>
Ok, I'll concede things are not super-consistent. In this case, I felt it
"didn't hurt" but I didn't take into account that it needs to be worked out
each time and I posted a second revision that should be clearer.
As an aside, in other places order changes from being signed in some places
to being unsigned in others. There is probably a pass in there just for
dealing with this sort of inconsistency.
Thanks
--
Mel Gorman
Part-time Phd Student Linux Technology Center
University of Limerick IBM Dublin Software Lab
--
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