vfs_acl_xattr and Linux memory fragmentation

Volker Lendecke vl at samba.org
Fri Apr 7 09:07:10 UTC 2017


On Fri, Apr 07, 2017 at 11:18:20AM +0300, Uri Simchoni via samba-technical wrote:
> 6. Since the initial kmalloc is done with GFP_KERNEL, I think there's a
> middle case where the kernel would try to evict pages, and that might
> cause a performance hit, all for memory that's not really required by
> any in-tree file system (only ZFS supports 64K on Linux AFAIK).
> 
> Bottom line - Samba works well with recent Linux kernels, but we might
> be taking a performance hit by asking for memory we probably don't need.
> We might want to do the initial getxattr with 4K, or have a 4K step
> between the 1K and the 64K.
> 
> Thoughts?

Start with one page worth of space and double on every failure? The
question here is -- if we ask for 4k, does this really map to one page
in kernel or will there be overhead that makes our user-space 4k
request allocate 2 pages?

Volker



More information about the samba-technical mailing list