linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* Tmpfs size accounting misses memory allocations
@ 2020-04-25 12:33 Topi Miettinen
  2020-04-28  1:34 ` Hugh Dickins
  0 siblings, 1 reply; 7+ messages in thread
From: Topi Miettinen @ 2020-04-25 12:33 UTC (permalink / raw)
  To: hughd, linux-mm

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


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2020-05-03 19:58 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-04-25 12:33 Tmpfs size accounting misses memory allocations Topi Miettinen
2020-04-28  1:34 ` Hugh Dickins
2020-04-28 10:51   ` Topi Miettinen
2020-05-01  3:14     ` Hugh Dickins
2020-05-01  7:29       ` Topi Miettinen
2020-05-01 19:05       ` Topi Miettinen
2020-05-03 19:58       ` Topi Miettinen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).