Re: [PATCH] fs: Make file-nr output the total allocated file handles

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Apr 11, 2025 at 04:16:08PM +0200, Christian Brauner wrote:
> On Thu, Apr 10, 2025 at 07:21:17PM +0800, lirongqing wrote:
> > From: Li RongQing <lirongqing@xxxxxxxxx>
> > 
> > Make file-nr output the total allocated file handles, not per-cpu
> > cache number, it's more precise, and not in hot path
> > 
> > Signed-off-by: Li RongQing <lirongqing@xxxxxxxxx>
> > ---
> 
> That means grabbing a lock suddenly. Is there an actual use-case
> behind this?
> 

The centralized value can be really grossly inaccurate as CPU count increases.

There is some talks about fixing that, see:
https://lore.kernel.org/linux-mm/20250410175149.1206995-1-mathieu.desnoyers@xxxxxxxxxxxx/

In the meantime, given that this is only accessed when reading the /proc
file, this should be fine?

Note it still wont delay bumps/decs as long as they fit the batch (which
is the common case).




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux