On Thu, Nov 05, 2020 at 04:51:42PM -0800, Ralph Campbell wrote: > +extern void prep_transhuge_device_private_page(struct page *page); No need for the extern. > +static inline void prep_transhuge_device_private_page(struct page *page) > +{ > +} Is the code to call this even reachable if THP support is configured out? If not just declaring it unconditionally and letting dead code elimination do its job might be a tad cleaner. > +void prep_transhuge_device_private_page(struct page *page) I think a kerneldoc comment explaining what this function is useful for would be helpful.