From mboxrd@z Thu Jan 1 00:00:00 1970 From: Linus Torvalds Subject: Re: [RFC] vfs: don't bother clearing close_on_exec bit for unused fds Date: Tue, 3 Nov 2015 14:45:01 -0800 Message-ID: References: <1446543679-28849-1-git-send-email-linux@rasmusvillemoes.dk> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Cc: Alexander Viro , linux-fsdevel , Linux Kernel Mailing List To: Rasmus Villemoes Return-path: Received: from mail-io0-f173.google.com ([209.85.223.173]:34719 "EHLO mail-io0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752441AbbKCWpD (ORCPT ); Tue, 3 Nov 2015 17:45:03 -0500 In-Reply-To: <1446543679-28849-1-git-send-email-linux@rasmusvillemoes.dk> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Tue, Nov 3, 2015 at 1:41 AM, Rasmus Villemoes 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