linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@linux-foundation.org>
To: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>,
	linux-fsdevel <linux-fsdevel@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [RFC] vfs: don't bother clearing close_on_exec bit for unused fds
Date: Tue, 3 Nov 2015 14:45:01 -0800	[thread overview]
Message-ID: <CA+55aFxGD0aftAb49X1G-f79WCD8znkeQX0bSfDVDjBiUCQ2fQ@mail.gmail.com> (raw)
In-Reply-To: <1446543679-28849-1-git-send-email-linux@rasmusvillemoes.dk>

On Tue, Nov 3, 2015 at 1:41 AM, Rasmus Villemoes
<linux@rasmusvillemoes.dk> wrote:
>
> I'm sure I've missed something, hence the RFC. But if not, there's
> probably also a few memsets which become redundant. And the
> __set_close_on_exec part should probably be its own patch...

The patch looks fine to me. I'm not sure the __set_close_on_exec part
even makes sense, because if you set that bit, it usually really *is*
clear before, so testing it beforehand is just pointless.  And if
somebody really keeps setting the bit, they are doing something stupid
anyway..

So I have nothing against the patch, but I do wonder how much it
matters. If there isn't a noticeable performance win, I'd almost
rather just keep the close-on-exec bitmap up-to-date. Hmm?

               Linus

  reply	other threads:[~2015-11-03 22:45 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-03  9:41 [RFC] vfs: don't bother clearing close_on_exec bit for unused fds Rasmus Villemoes
2015-11-03 22:45 ` Linus Torvalds [this message]
2015-11-03 23:13   ` Rasmus Villemoes
2015-11-04  1:31 ` Eric Dumazet
2015-11-04 10:59   ` Rasmus Villemoes
2015-11-04 12:33     ` Eric Dumazet

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=CA+55aFxGD0aftAb49X1G-f79WCD8znkeQX0bSfDVDjBiUCQ2fQ@mail.gmail.com \
    --to=torvalds@linux-foundation.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@rasmusvillemoes.dk \
    --cc=viro@zeniv.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
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;
as well as URLs for NNTP newsgroup(s).