From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753247AbcALWVP (ORCPT ); Tue, 12 Jan 2016 17:21:15 -0500 Received: from zeniv.linux.org.uk ([195.92.253.2]:43683 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751577AbcALWVO (ORCPT ); Tue, 12 Jan 2016 17:21:14 -0500 Date: Tue, 12 Jan 2016 22:21:05 +0000 From: Al Viro To: Chen Gang Cc: dhowells@redhat.com, akpm@linux-foundation.org, nicolas.iooss_linux@m4x.org, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org Subject: Re: [PATCH] fs: dcache: Use bool return value instead of int Message-ID: <20160112222105.GT17997@ZenIV.linux.org.uk> References: <1452547845-12039-1-git-send-email-chengang@emindsoft.com.cn> <20160111225104.GO17997@ZenIV.linux.org.uk> <5695733C.1010201@emindsoft.com.cn> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5695733C.1010201@emindsoft.com.cn> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jan 13, 2016 at 05:42:20AM +0800, Chen Gang wrote: > For me, it really generates a little better code: > > - Both 1-word store and 1-byte store are 1 instruction, normally, they > have the same execution speed (although it is not quite precise). > > - But 1-byte store instruction has short length under CISC archs, which > can generate a little better code globally. > > - For most of archs, 1-word store can process bytes nonalignment cases, > for check_mount() individually, the parameter data may be not word > alignment, which may cause the 1-word store slower than 1-byte store. What the hell do you mean, unaligned? It's given an address of local variable of type int; it _will_ be aligned, or the compiler is FUBAR. As for the inlines... frankly, if gcc generates a different code from having replaced int with bool in those, it's time to do something very nasty to gcc developers.