[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.02.1406121446070.12437@chino.kir.corp.google.com>
Date: Thu, 12 Jun 2014 14:48:41 -0700 (PDT)
From: David Rientjes <rientjes@...gle.com>
To: Vlastimil Babka <vbabka@...e.cz>
cc: linux-mm@...ck.org, linux-kernel@...r.kernel.org,
Andrew Morton <akpm@...ux-foundation.org>,
Greg Thelen <gthelen@...gle.com>,
Minchan Kim <minchan@...nel.org>, Mel Gorman <mgorman@...e.de>,
Joonsoo Kim <iamjoonsoo.kim@....com>,
Michal Nazarewicz <mina86@...a86.com>,
Naoya Horiguchi <n-horiguchi@...jp.nec.com>,
Christoph Lameter <cl@...ux.com>,
Rik van Riel <riel@...hat.com>
Subject: Re: [RFC PATCH 4/6] mm, compaction: skip buddy pages by their order
in the migrate scanner
On Thu, 12 Jun 2014, Vlastimil Babka wrote:
> > Ok, and I won't continue to push the point.
>
> I'd rather know I'm correct and not just persistent enough :) If you confirm
> that your compiler behaves differently, then maybe making page_order_unsafe a
> #define instead of inline function would prevent this issue?
>
The reason I was hesitatnt is because there's no way I can prove under all
possible circumstances in which page_order_unsafe() could be used that gcc
won't make the decision to reaccess. I personally didn't think that doing
if (PageBuddy(page)) {
/*
* Racy check since we know PageBuddy() is true and we do
* some sanity checking on this scan to ensure it is an
* appropriate order.
*/
unsigned long order = ACCESS_ONCE(page_private(page));
...
}
was too much of a problem and actually put the ACCESS_ONCE() in the
context in which it matters rather than hiding behind an inline function.
> > I think the lockless
> > suitable_migration_target() call that looks at page_order() is fine in the
> > free scanner since we use it as a racy check, but it might benefit from
> > either a comment describing the behavior or a sanity check for
> > page_order(page) <= MAX_ORDER as you've done before.
>
> OK, I'll add that.
>
Thanks!
--
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