vfs_acl_xattr and Linux memory fragmentation

Volker Lendecke Volker.Lendecke at SerNet.DE
Thu Apr 13 07:33:51 UTC 2017

On Wed, Apr 12, 2017 at 08:09:50PM +0300, Uri Simchoni wrote:
> About efficiency - what I've been able to discern, without going into
> too much detail, is that:
> a. There's no per-object overhead, you kmalloc 4K you use 4K.
> b. There should be an advantage to allocating 4K over 64, but not
> because it happens to be page size, but rather because it has a backing
> pool (see  kmalloc-4096 in /proc/slabinfo). If that pool needs to
> allocate more 4K buffers, it does so in 32K units, which is also prone
> to fragmentation issues, but more often than not, you have 4K objects in
> the pool. 64K allocations don't have such a pool so every time you
> either have contiguous 64K, or you don't (and once memory becomes
> fragmented, you normally don't).

My /proc/slabinfo also has kmalloc-2048 and kmalloc-8192. This starts
to turn into bike-shedding, but is there any value in also trying 2k
and 8k?


More information about the samba-technical mailing list