Re: [mmotm] BUG: Bad page state in process khugepaged ?

From: Andrea Arcangeli
Date: Fri Feb 11 2011 - 15:24:53 EST


On Fri, Feb 11, 2011 at 11:58:58AM -0800, Hugh Dickins wrote:
> Oh, I hadn't realized Fedora use it. I wonder if that's wise, I thought
> Nick introduced it partly for the more expensive checks, and there might
> be one or two of those around - those bad_range()s in page_alloc.c?

I doubt the more expensive checks are very measurable.. benchmarks
usually run on enterprise distro. I'm sure when they enabled, they
were aware of having to run more expensive runtime checks.

> But the patch actually says -1024*1024: either would do.

I actually increased it to -1024*1024 after writing the email ;) sorry
the for the confusion.

> Yes, that's fine, 0xfff00000 looks unlikely enough (and my
> imagination for "deadbeef"-like magic is too drowsy today).

I used a negative power of two even if I doubt the compiler can make
much use of it.

> Okay I suppose: it seems rather laboured to me, I think I'd have just
> moved the VM_BUG_ON into rmv_page_order() if I'd done the patch; but
> since I was too lazy to do it, I'd better be grateful for yours!

Ok the reason I didn't move the VM_BUG_ON is to be stricter in case
there are more usages of __ClearPageBuddy in the future. I guess it's
not so important, but when I initially implemented it, it wasn't
entirely obvious it would work safe with memory hotplug, compaction
and all other bits using PageBuddy, so...
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/