Re: [PATCH] [11/16] HWPOISON: check and isolate corrupted free pages v2

Wu Fengguang
2009-06-09T15:28:30Z

On Tue, Jun 09, 2009 at 09:55:14PM +0800, Nick Piggin wrote:
> On Tue, Jun 09, 2009 at 09:49:03PM +0800, Wu Fengguang wrote:
> > On Tue, Jun 09, 2009 at 09:28:47PM +0800, Nick Piggin wrote:
> > > And I don't think removing a free page from the page allocator is
> > > too much more complex than removing a live page from the pagecache ;)
> >
> > There are usable functions for doing pagecache isolations, but no one
> > to isolate one specific page from the buddy system.
>
> But it shouldn't be too hard. Anyway you wanted to reinvent your
> own functions for pagecache isolations ;)

Heh.

> > Plus, if we did present such a function, you'll then ask for it being
> > included in page_alloc.c, injecting a big chunk of dead code into the
> > really hot code blocks and possibly polluting the L2 cache. Will it be
>
> But you would say no because you like it better in your memory
> isolation file ;)

I would like to align with your principle on this one :)

> > better than just inserting several lines? Hardly. Smaller text itself
> > yields faster speed.
>
> Oh speed I'm definitely thinking about, don't worry about that.
>
> Moving hot and cold functions together could become an issue
> indeed. Mostly it probably matters a little less than code
> within a single function due to their size. But I think gcc
> already has options to annotate this kind of thing which we
> could be using.

Can we tell gcc "I bet this _function_ is rarely used"?

> So it's not such a good argument against moving things out of
> hotpaths, or guiding in which files to place functions.

Yes.

> Anyway, in this case it is not a "nack" from me. Just that I
> would like to see the non-fastpath code too or at least if
> it can be thought about.

I think Andi would be pleased to present you with his buddy page
isolation code :)

Thanks,
Fengguang