public inbox for linux-fsdevel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/6] Maintain the relative size of fs.file-max and fs.nr_open
@ 2024-11-23 18:08 Jinliang Zheng
  2024-11-23 18:11 ` [PATCH 1/6] fs: fix proc_handler for sysctl_nr_open Jinliang Zheng
                   ` (6 more replies)
  0 siblings, 7 replies; 12+ messages in thread
From: Jinliang Zheng @ 2024-11-23 18:08 UTC (permalink / raw)
  To: viro, brauner, jack, mcgrof, kees, joel.granados, adobriyan
  Cc: linux-fsdevel, linux-kernel, flyingpeng, Jinliang Zheng

According to Documentation/admin-guide/sysctl/fs.rst, fs.nr_open and
fs.file-max represent the number of file-handles that can be opened
by each process and the entire system, respectively.

Therefore, it's necessary to maintain a relative size between them,
meaning we should ensure that files_stat.max_files is not less than
sysctl_nr_open.

However, this point is overlooked in the current kernel code, and
this patchset aims to rectify this. Additionally, patch 0001 fixes
the type issue with the sysctl_nr_open handler.

Jinliang Zheng (6):
  fs: fix proc_handler for sysctl_nr_open
  fs: make files_stat globally visible
  sysctl: refactor __do_proc_doulongvec_minmax()
  sysctl: ensure files_stat.max_files is not less than sysctl_nr_open
  sysctl: ensure sysctl_nr_open is not greater than files_stat.max_files
  fs: synchronize the access of fs.file-max and fs.nr_open

 fs/file_table.c        | 15 ++++++++---
 include/linux/fs.h     |  2 ++
 include/linux/sysctl.h |  4 +++
 kernel/sysctl.c        | 59 ++++++++++++++++++++++++++++++++++++++----
 4 files changed, 71 insertions(+), 9 deletions(-)

-- 
2.41.1


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

end of thread, other threads:[~2024-11-24 16:01 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-23 18:08 [PATCH 0/6] Maintain the relative size of fs.file-max and fs.nr_open Jinliang Zheng
2024-11-23 18:11 ` [PATCH 1/6] fs: fix proc_handler for sysctl_nr_open Jinliang Zheng
2024-11-23 18:11 ` [PATCH 2/6] fs: make files_stat globally visible Jinliang Zheng
2024-11-23 18:12 ` [PATCH 3/6] sysctl: refactor __do_proc_doulongvec_minmax() Jinliang Zheng
2024-11-23 18:12 ` [PATCH 4/6] sysctl: ensure files_stat.max_files is not less than sysctl_nr_open Jinliang Zheng
2024-11-23 18:13 ` [PATCH 5/6] sysctl: ensure sysctl_nr_open is not greater than files_stat.max_files Jinliang Zheng
2024-11-23 18:13 ` [PATCH 6/6] fs: synchronize the access of fs.file-max and fs.nr_open Jinliang Zheng
2024-11-23 18:27 ` [PATCH 0/6] Maintain the relative size " Al Viro
2024-11-23 19:32   ` Al Viro
2024-11-24  2:30     ` Theodore Ts'o
2024-11-24  9:48     ` Jinliang Zheng
2024-11-24 15:59       ` Theodore Ts'o

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox