Tmpfs size accounting misses memory allocations
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- To: hughd@xxxxxxxxxx, linux-mm@xxxxxxxxx
- Subject: Tmpfs size accounting misses memory allocations
- From: Topi Miettinen <toiwoton@xxxxxxxxx>
- Date: Sat, 25 Apr 2020 15:33:54 +0300
- User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0
Hi,
It seems that tmpfs does not count memory which is allocated for short
symlinks or xattrs towards size= limit. I guess the fix would be to
change shmem_sb_info->{used_blocks,max_blocks} to use bytes as units
(instead of blocks) and then add accounting and checks to
shmem_symlink() and shmem_initxattrs(). Would a patch for that be
acceptable?
Another issue is that inodes aren't counted towards size= limit either,
but perhaps that's intentional because there's nr_inodes= mount option
for exactly that.
If these are not bugs but intentional features, I think the manual page
tmpfs(5) should be clearer in this respect.
-Topi
[Index of Archives]
[Linux ARM Kernel]
[Linux ARM]
[Linux Omap]
[Fedora ARM]
[IETF Annouce]
[Bugtraq]
[Linux OMAP]
[Linux MIPS]
[eCos]
[Asterisk Internet PBX]
[Linux API]