On Tue, Oct 22, 2024 at 11:34:14AM +0800, Baolin Wang wrote: > IIUC, most file systems use method similar to iomap buffered IO (see > iomap_get_folio()) to allocate huge pages. What I mean is that, it would be > better to have a real use case to add a hint for allocating THP (other than > tmpfs). I would be nice to hear from folks who works with production what the actual needs are. But I find asymmetry between MADV_ hints and FADV_ hints wrt huge pages not justified. I think it would be easy to find use-cases for FADV_HUGEPAGE/FADV_NOHUGEPAGE. Furthermore I think it would be useful to have some kind of mechanism to make these hints persistent: any open of a file would have these hints set by default based on inode metadata on backing storage. Although, I am not sure what the right way to archive that. xattrs? -- Kiryl Shutsemau / Kirill A. Shutemov