Re: [PATCH v3 1/6] mm/thp: add prep_transhuge_device_private_page()

2020-11-06 Thread Ralph Campbell
On 11/5/20 11:55 PM, Christoph Hellwig wrote: 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. Right, I was just copying the style. Would you like to see a preparatory patch that remo

Re: [PATCH v3 1/6] mm/thp: add prep_transhuge_device_private_page()

2020-11-06 Thread Ralph Campbell
On 11/6/20 4:14 AM, Matthew Wilcox wrote: On Thu, Nov 05, 2020 at 04:51:42PM -0800, Ralph Campbell wrote: Add a helper function to allow device drivers to create device private transparent huge pages. This is intended to help support device private THP migrations. I think you'd be better off

Re: [PATCH v3 1/6] mm/thp: add prep_transhuge_device_private_page()

2020-11-06 Thread Matthew Wilcox
On Thu, Nov 05, 2020 at 04:51:42PM -0800, Ralph Campbell wrote: > Add a helper function to allow device drivers to create device private > transparent huge pages. This is intended to help support device private > THP migrations. I think you'd be better off with these calling conventions: -void pr

Re: [PATCH v3 1/6] mm/thp: add prep_transhuge_device_private_page()

2020-11-05 Thread Christoph Hellwig
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 suppo

[PATCH v3 1/6] mm/thp: add prep_transhuge_device_private_page()

2020-11-05 Thread Ralph Campbell
Add a helper function to allow device drivers to create device private transparent huge pages. This is intended to help support device private THP migrations. Signed-off-by: Ralph Campbell --- include/linux/huge_mm.h | 5 + mm/huge_memory.c| 9 + 2 files changed, 14 insertion