On Tue, 28 Apr 2015 10:53:23 +0100 Mel Gorman <[email protected]> wrote:

> > > +#ifdef CONFIG_DEFERRED_STRUCT_PAGE_INIT
> > > +#define __defermem_init __meminit
> > > +#define __defer_init    __meminit
> > > +#else
> > > +#define __defermem_init
> > > +#define __defer_init __init
> > > +#endif
> > 
> > Could we get some comments describing these?  What they do, when and
> > where they should be used.  I have a suspicion that the naming isn't
> > good, but I didn't spend a lot of time reverse-engineering the
> > intent...
> > 
> 
> Of course. The next version will have
> 
> +/*
> + * Deferred struct page initialisation requires some early init functions 
> that
> + * are removed before kswapd is up and running. The feature depends on memory
> + * hotplug so put the data and code required by deferred initialisation into 
> + * the __meminit section where they are preserved.
> + */

I'm still not getting it even a little bit :(  You say "data and code",
so I'd expect to see

#define __defer_meminitdata __meminitdata
#define __defer_meminit __meminit

But the patch doesn't mention the data segment at all.

The patch uses both __defermem_init and __defer_init to tag functions
(ie: text) and I can't work out why.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to