From mboxrd@z Thu Jan 1 00:00:00 1970 From: Al Viro Subject: Re: [Bug 106241] New: shutdown(3)/close(3) behaviour is incorrect for sockets in accept(3) Date: Sat, 31 Oct 2015 00:09:43 +0000 Message-ID: <20151031000943.GL22011@ZenIV.linux.org.uk> References: <20151029001532.GE22011@ZenIV.linux.org.uk> <1446089381.7476.114.camel@edumazet-glaptop2.roam.corp.google.com> <20151029041611.GF22011@ZenIV.linux.org.uk> <1446122119.7476.138.camel@edumazet-glaptop2.roam.corp.google.com> <20151030210215.GI22011@ZenIV.linux.org.uk> <20151030223317.GK22011@ZenIV.linux.org.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Eric Dumazet , David Miller , Stephen Hemminger , Network Development , David Howells , linux-fsdevel To: Linus Torvalds Return-path: Content-Disposition: inline In-Reply-To: Sender: linux-fsdevel-owner@vger.kernel.org List-Id: netdev.vger.kernel.org On Fri, Oct 30, 2015 at 04:52:41PM -0700, Linus Torvalds wrote: > I really suspect this patch is "good enough" in reality, and I would > *much* rather do something like this than add a new non-POSIX flag > that people have to update their binaries for. I agree with Eric that > *some* people will do so, but it's still the wrong thing to do. Let's > just make performance with the normal semantics be good enough that we > don't need to play odd special games. > > Eric? IIRC, at least a part of what Eric used to complain about was that on seriously multithreaded processes doing a lot of e.g. socket(2) we end up a lot of bouncing the cacheline containing the first free bits in the bitmap. But looking at the whole thing, I really wonder if the tons of threads asking for random bytes won't get at least as bad cacheline bouncing while getting said bytes, so I'm not sure if that rationale has survived. PS: this problem obviously exists in Linus' variant as well as in mine; the question is whether Eric's approach manages to avoid it in the first place.