On Thu, 2005-08-25 at 10:45 +0200, Eric Dumazet wrote:
This patch removes filp_count_lock spinlock, used to protect files_stat.nr_files.
Just use atomic_t type and atomic_inc()/atomic_dec() operations.
This patch assumes that atomic_read() is a plain {return v->counter;} on all architectures. (keywords : sysctl, /proc/sys/fs/file-nr, proc_dointvec)
this patch adds atomic ops where there were none before
for those architectures that need atomics for read (parisc? arm?)
however.. wouldn't it be better to make this a per cpu variable for
write, and for read iterate or do something smart otherwise?