From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753806AbcAMWh1 (ORCPT ); Wed, 13 Jan 2016 17:37:27 -0500 Received: from mail113-249.mail.alibaba.com ([205.204.113.249]:50406 "EHLO us-alimail-mta2.hst.scl.en.alidc.net" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752325AbcAMWh0 (ORCPT ); Wed, 13 Jan 2016 17:37:26 -0500 X-Alimail-AntiSpam: AC=CONTINUE;BC=0.08102068|-1;FP=0|0|0|0|0|-1|-1|-1;HT=e01l10450;MF=chengang@emindsoft.com.cn;NM=1;PH=DS;RN=7;RT=6;SR=0;TI=SMTPD_----4S5S2NZ_1452724594; Message-ID: <5696D239.2000605@emindsoft.com.cn> Date: Thu, 14 Jan 2016 06:39:53 +0800 From: Chen Gang User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Al Viro 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 References: <1452547845-12039-1-git-send-email-chengang@emindsoft.com.cn> <20160111225104.GO17997@ZenIV.linux.org.uk> <5695733C.1010201@emindsoft.com.cn> <20160112222105.GT17997@ZenIV.linux.org.uk> In-Reply-To: <20160112222105.GT17997@ZenIV.linux.org.uk> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 1/13/16 06:21, Al Viro wrote: > 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. > I guess you misunderstand my meaning, in our case, it should not happen, so I say "for check_mount() individually". For 32 bits store instruction, we need consider about the byte alignment. > 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. > Could you provide the related proof? Thanks. -- Chen Gang (陈刚) Open, share, and attitude like air, water, and life which God blessed