Re: [PATCH] shmem: avoid huge pages for small files
From: Andi Kleen
Date: Thu Oct 20 2016 - 22:01:23 EST
> Ugh, no, please don't use mount options for file specific behaviours
> in filesystems like ext4 and XFS. This is exactly the sort of
> behaviour that should either just work automatically (i.e. be
> completely controlled by the filesystem) or only be applied to files
Can you explain what you mean? How would the file system control it?
> specifically configured with persistent hints to reliably allocate
> extents in a way that can be easily mapped to huge pages.
> e.g. on XFS you will need to apply extent size hints to get large
> page sized/aligned extent allocation to occur, and so this
It sounds like you're confusing alignment in memory with alignment
on disk here? I don't see why on disk alignment would be needed
at all, unless we're talking about DAX here (which is out of
scope currently) Kirill's changes are all about making the memory
access for cached data more efficient, it's not about disk layout
optimizations.
> persistent extent size hint should trigger the filesystem to use
> large pages if supported, the hint is correctly sized and aligned,
> and there are large pages available for allocation.
That would be ioctls and similar?
That would imply that every application wanting to use large pages
would need to be especially enabled. That would seem awfully limiting
to me and needlessly deny benefits to most existing code.
-Andi