Re: [RFC PATCH 4/6] mm, compaction: skip buddy pages by their order in the migrate scanner

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]