From mboxrd@z Thu Jan 1 00:00:00 1970 From: ebiederm@xmission.com (Eric W. Biederman) Subject: Re: [PATCH 03/11] vfs: Don't allow overwriting mounts in the current mount namespace Date: Mon, 24 Feb 2014 15:43:34 -0800 Message-ID: <87ios4gjq1.fsf@xmission.com> References: <87a9kkax0j.fsf@xmission.com> <8761v7h2pt.fsf@tw-ebiederman.twitter.com> <87li281wx6.fsf_-_@xmission.com> <87ob28kqks.fsf_-_@xmission.com> <8761ogkqhl.fsf_-_@xmission.com> <20140218171252.GC4026@tucsk.piliscsaba.szeredi.hu> <87ha7wrtyz.fsf@xmission.com> <20140219132319.79bc3b26bad00a513880d207@canb.auug.org.au> Mime-Version: 1.0 Content-Type: text/plain Cc: Linus Torvalds , Miklos Szeredi , Al Viro , "Serge E. Hallyn" , Linux-Fsdevel , Kernel Mailing List , Andy Lutomirski , Rob Landley , Christoph Hellwig , Karel Zak , "J. Bruce Fields" To: Stephen Rothwell Return-path: In-Reply-To: <20140219132319.79bc3b26bad00a513880d207@canb.auug.org.au> (Stephen Rothwell's message of "Wed, 19 Feb 2014 13:23:19 +1100") Sender: linux-kernel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org Stephen Rothwell writes: > On Tue, 18 Feb 2014 14:20:29 -0800 Linus Torvalds wrote: >> >> For this kind of function return value it actually tends to work very >> well, and in fact often generates slightly better code than "int". So >> I don't _hate_ bool, and we've certainly had a lot more use creep in >> lately, but I also don't really see "bool" as much of an upside. > > And in function declarations, it makes it very obvious that the function > is not one of our "return 0 or -ERROR" ones. So I played with this instance in particular. The only difference winds up being by the bool version uses byte instructions on %al and %bl instead of their 32 bit interger equivalents on %eax and %ebx. I also benchmarked the difference and on the most sensitive test I could find. will-it-scale/unlink2 (aka create,close,unlink each process in a separate directory). There were no measurable performance differences. So for purposes of better documentation I have changed the function, and I will repost my patches shortly. Eric