Re: [PATCH v2 0/2] close_range()

2019-05-24 Thread Al Viro
On Sat, May 25, 2019 at 12:27:40AM +0300, Alexey Dobriyan wrote: > What about orthogonality of interfaces? > > fdmap() > bulk_close() > > Now fdmap() can be reused for lsof/criu and it is only 2 system calls > for close-everything usecase which is OK because readdir is 4(!) minimum:

Re: [PATCH v2 0/2] close_range()

2019-05-24 Thread Alexey Dobriyan
On Fri, May 24, 2019 at 11:55:44AM -0700, Linus Torvalds wrote: > On Fri, May 24, 2019 at 11:39 AM Alexey Dobriyan wrote: > > > > > Would there ever be any other reason to traverse unknown open files > > > than to close them? > > > > This is what lsof(1) does: > > I repeat: Would there ever be an

Re: [PATCH v2 0/2] close_range()

2019-05-24 Thread Linus Torvalds
On Fri, May 24, 2019 at 11:39 AM Alexey Dobriyan wrote: > > > Would there ever be any other reason to traverse unknown open files > > than to close them? > > This is what lsof(1) does: I repeat: Would there ever be any other reason to traverse unknown open files than to close them? lsof is not A

Re: [PATCH v2 0/2] close_range()

2019-05-24 Thread Alexey Dobriyan
On Thu, May 23, 2019 at 02:34:31PM -0700, Linus Torvalds wrote: > On Thu, May 23, 2019 at 11:22 AM Alexey Dobriyan wrote: > > > > > This is v2 of this patchset. > > > > We've sent fdmap(2) back in the day: > > Well, if the main point of the exercise is performance, then fdmap() > is clearly infer

Re: [PATCH v2 0/2] close_range()

2019-05-24 Thread Christian Brauner
On Thu, May 23, 2019 at 02:34:31PM -0700, Linus Torvalds wrote: > On Thu, May 23, 2019 at 11:22 AM Alexey Dobriyan wrote: > > > > > This is v2 of this patchset. > > > > We've sent fdmap(2) back in the day: > > Well, if the main point of the exercise is performance, then fdmap() > is clearly infer

Re: [PATCH v2 0/2] close_range()

2019-05-23 Thread Linus Torvalds
On Thu, May 23, 2019 at 11:22 AM Alexey Dobriyan wrote: > > > This is v2 of this patchset. > > We've sent fdmap(2) back in the day: Well, if the main point of the exercise is performance, then fdmap() is clearly inferior. Sadly, with all the HW security mitigation, system calls are no longer che

Re: [PATCH v2 0/2] close_range()

2019-05-23 Thread Alexey Dobriyan
> This is v2 of this patchset. We've sent fdmap(2) back in the day: https://marc.info/?l=linux-kernel&m=150628359803324&w=4 It can do everything close_range() does and potentially more. If people ask for it I can rebase it and resend. P.S.: you are 2 steps behind :-) https://lwn.net/Articles/49