public inbox for linuxppc-dev@ozlabs.org 
 help / color / mirror / Atom feed
From: Al Viro <viro@zeniv•linux.org.uk>
To: David Howells <dhowells@redhat•com>
Cc: linux-ia64@vger•kernel.org, linux-sh@vger•kernel.org,
	oleg@redhat•com, linux-kselftest@vger•kernel.org,
	sparclinux@vger•kernel.org, shuah@kernel•org,
	linux-arch@vger•kernel.org, linux-s390@vger•kernel.org,
	miklos@szeredi•hu, x86@kernel•org, torvalds@linux-foundation•org,
	Christian Brauner <christian@brauner•io>,
	linux-mips@vger•kernel.org, linux-xtensa@linux-xtensa•org,
	tkjos@android•com, arnd@arndb•de, jannh@google•com,
	linux-m68k@lists•linux-m68k.org, tglx@linutronix•de,
	ldv@altlinux•org, linux-arm-kernel@lists•infradead.org,
	fweimer@redhat•com, linux-parisc@vger•kernel.org,
	linux-api@vger•kernel.org, linux-kernel@vger•kernel.org,
	linux-alpha@vger•kernel.org, linux-fsdevel@vger•kernel.org,
	linuxppc-dev@lists•ozlabs.org
Subject: Re: [PATCH 1/2] open: add close_range()
Date: Tue, 21 May 2019 20:20:09 +0100	[thread overview]
Message-ID: <20190521192009.GK17978@ZenIV.linux.org.uk> (raw)
In-Reply-To: <28114.1558456227@warthog.procyon.org.uk>

On Tue, May 21, 2019 at 05:30:27PM +0100, David Howells wrote:

> If we can live with close_from(int first) rather than close_range(), then this
> can perhaps be done a lot more efficiently by:
> 
> 	new = alloc_fdtable(first);
> 	spin_lock(&files->file_lock);
> 	old = files_fdtable(files);
> 	copy_fds(new, old, 0, first - 1);
> 	rcu_assign_pointer(files->fdt, new);
> 	spin_unlock(&files->file_lock);
> 	clear_fds(old, 0, first - 1);
> 	close_fdt_from(old, first);
> 	kfree_rcu(old);

I really hate to think how that would interact with POSIX locks...

  parent reply	other threads:[~2019-05-21 19:22 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-21 11:34 [PATCH 1/2] open: add close_range() Christian Brauner
2019-05-21 11:34 ` [PATCH 2/2] tests: add close_range() tests Christian Brauner
2019-05-21 12:09 ` [PATCH 1/2] open: add close_range() Florian Weimer
2019-05-21 13:04   ` Christian Brauner
2019-05-21 13:10     ` Florian Weimer
2019-05-21 13:18       ` Christian Brauner
2019-05-21 13:23       ` Christian Brauner
2019-05-21 15:00 ` Al Viro
2019-05-21 16:30   ` David Howells
2019-05-21 16:41     ` Christian Brauner
2019-05-21 20:23       ` Linus Torvalds
2019-05-22  8:12         ` Christian Brauner
2019-05-21 19:20     ` Al Viro [this message]
2019-05-21 19:59       ` Matthew Wilcox
2019-05-21 16:53   ` Christian Brauner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190521192009.GK17978@ZenIV.linux.org.uk \
    --to=viro@zeniv$(echo .)linux.org.uk \
    --cc=arnd@arndb$(echo .)de \
    --cc=christian@brauner$(echo .)io \
    --cc=dhowells@redhat$(echo .)com \
    --cc=fweimer@redhat$(echo .)com \
    --cc=jannh@google$(echo .)com \
    --cc=ldv@altlinux$(echo .)org \
    --cc=linux-alpha@vger$(echo .)kernel.org \
    --cc=linux-api@vger$(echo .)kernel.org \
    --cc=linux-arch@vger$(echo .)kernel.org \
    --cc=linux-arm-kernel@lists$(echo .)infradead.org \
    --cc=linux-fsdevel@vger$(echo .)kernel.org \
    --cc=linux-ia64@vger$(echo .)kernel.org \
    --cc=linux-kernel@vger$(echo .)kernel.org \
    --cc=linux-kselftest@vger$(echo .)kernel.org \
    --cc=linux-m68k@lists$(echo .)linux-m68k.org \
    --cc=linux-mips@vger$(echo .)kernel.org \
    --cc=linux-parisc@vger$(echo .)kernel.org \
    --cc=linux-s390@vger$(echo .)kernel.org \
    --cc=linux-sh@vger$(echo .)kernel.org \
    --cc=linux-xtensa@linux-xtensa$(echo .)org \
    --cc=linuxppc-dev@lists$(echo .)ozlabs.org \
    --cc=miklos@szeredi$(echo .)hu \
    --cc=oleg@redhat$(echo .)com \
    --cc=shuah@kernel$(echo .)org \
    --cc=sparclinux@vger$(echo .)kernel.org \
    --cc=tglx@linutronix$(echo .)de \
    --cc=tkjos@android$(echo .)com \
    --cc=torvalds@linux-foundation$(echo .)org \
    --cc=x86@kernel$(echo .)org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox