Re: [PATCH] fs: dcache: Use bool return value instead of int

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux