lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Fri, 6 Nov 2020 12:56:47 -0800 From: Ralph Campbell <rcampbell@...dia.com> To: Christoph Hellwig <hch@....de> CC: <linux-mm@...ck.org>, <nouveau@...ts.freedesktop.org>, <linux-kselftest@...r.kernel.org>, <linux-kernel@...r.kernel.org>, "Jerome Glisse" <jglisse@...hat.com>, John Hubbard <jhubbard@...dia.com>, "Alistair Popple" <apopple@...dia.com>, Jason Gunthorpe <jgg@...dia.com>, Bharata B Rao <bharata@...ux.ibm.com>, Zi Yan <ziy@...dia.com>, "Kirill A . Shutemov" <kirill.shutemov@...ux.intel.com>, Yang Shi <yang.shi@...ux.alibaba.com>, Ben Skeggs <bskeggs@...hat.com>, Shuah Khan <shuah@...nel.org>, "Andrew Morton" <akpm@...ux-foundation.org> Subject: Re: [PATCH v3 1/6] mm/thp: add prep_transhuge_device_private_page() 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 removes extern for the other declarations in huge_mm.h? >> +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. The HMM test driver depends on TRANSPARENT_HUGEPAGE but the nouveau SVM option doesn't and SVM is still useful if TRANSPARENT_HUGEPAGE is not configured. The problem with defining prep_transhuge_device_private_page() in huge_mm.h as a static inline function is that prep_compound_page() and prep_transhuge_page() would have to be EXPORT_SYMBOL_GPL which are currently mm internal only. The intent is to make this helper callable by separate device driver modules using struct pages created with memremap_pages(). >> +void prep_transhuge_device_private_page(struct page *page) > > I think a kerneldoc comment explaining what this function is useful for > would be helpful. That is a good idea. I'll add it to v4.
Powered by blists - more mailing lists