Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1738563
| From | Andy Lutomirski <luto@amacapital.net> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 1/2 v2] fdmap(2) |
| Date | 2017-09-24 23:40 +0200 |
| Message-ID | <utmN4-5vy-11@gated-at.bofh.it> (permalink) |
| References | <utlnX-4Gy-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Sun, Sep 24, 2017 at 1:06 PM, Alexey Dobriyan <adobriyan@gmail.com> wrote: > From: Aliaksandr Patseyenak <Aliaksandr_Patseyenak1@epam.com> > > Implement system call for bulk retrieveing of opened descriptors > in binary form. > > Some daemons could use it to reliably close file descriptors > before starting. Currently they close everything upto some number > which formally is not reliable. Other natural users are lsof(1) and CRIU > (although lsof does so much in /proc that the effect is thoroughly buried). > > /proc, the only way to learn anything about file descriptors may not be > available. There is unavoidable overhead associated with instantiating > 3 dentries and 3 inodes and converting integers to strings and back. > > Benchmark: > > N=1<<22 times > 4 opened descriptors (0, 1, 2, 3) > opendir+readdir+closedir /proc/self/fd vs fdmap > > /proc 8.31 ą 0.37% > fdmap 0.32 ą 0.72% This doesn't have the semantic problem that pidmap does, but I still wonder why this can't be accomplished by adding a new file in /proc.
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 1/2 v2] fdmap(2) Alexey Dobriyan <adobriyan@gmail.com> - 2017-09-24 22:10 +0200
[PATCH v2 2/2] pidmap(2) Alexey Dobriyan <adobriyan@gmail.com> - 2017-09-24 22:10 +0200
Re: [PATCH v2 2/2] pidmap(2) Andy Lutomirski <luto@amacapital.net> - 2017-09-24 23:30 +0200
Re: [PATCH v2 2/2] pidmap(2) "Michael Kerrisk (man-pages)" <mtk.manpages@gmail.com> - 2017-09-25 09:50 +0200
Re: [PATCH v2 2/2] pidmap(2) Djalal Harouni <tixxdz@gmail.com> - 2017-09-25 12:50 +0200
Re: [PATCH v2 2/2] pidmap(2) kbuild test robot <lkp@intel.com> - 2017-09-26 07:50 +0200
Re: [PATCH 1/2 v2] fdmap(2) Andy Lutomirski <luto@amacapital.net> - 2017-09-24 23:40 +0200
Re: [PATCH 1/2 v2] fdmap(2) "Michael Kerrisk (man-pages)" <mtk.manpages@gmail.com> - 2017-09-25 09:50 +0200
Re: [PATCH 1/2 v2] fdmap(2) kbuild test robot <lkp@intel.com> - 2017-09-26 06:30 +0200
csiph-web