Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1444157
| From | Topi Miettinen <toiwoton@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 08/14] resource limits: track highwater mark of number of files |
| Date | 2016-07-15 12:40 +0200 |
| Message-ID | <rV8Hf-5Li-9@gated-at.bofh.it> (permalink) |
| References | <rV8Hf-5Li-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Track maximum number of files for the process, to be able to configure RLIMIT_NOFILE resource limits. The information is available with taskstats and cgroupstats netlink socket. Signed-off-by: Topi Miettinen <toiwoton@gmail.com> --- fs/file.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/fs/file.c b/fs/file.c index 6b1acdf..9de37c9 100644 --- a/fs/file.c +++ b/fs/file.c @@ -547,6 +547,8 @@ repeat: } #endif + update_resource_highwatermark(RLIMIT_NOFILE, fd); + out: spin_unlock(&files->file_lock); return error; @@ -857,6 +859,8 @@ __releases(&files->file_lock) if (tofree) filp_close(tofree, files); + update_resource_highwatermark(RLIMIT_NOFILE, fd); + return fd; Ebusy: -- 2.8.1
Back to linux.kernel | Previous | Next | Find similar | Unroll thread
[PATCH 08/14] resource limits: track highwater mark of number of files Topi Miettinen <toiwoton@gmail.com> - 2016-07-15 12:40 +0200
csiph-web