Re: cmsg newgroup alt.sex.fetish.bool (was Re: [PATCH] arch: all: include: asm: bitops: Use bool instead of int for all bit test functions)
From: Vineet Gupta
Date: Fri Sep 02 2016 - 20:08:47 EST
On 09/02/2016 04:33 PM, Chen Gang wrote:
> On 9/2/16 04:43, Al Viro wrote:
>> > On Tue, Aug 30, 2016 at 05:49:05AM +0800, Chen Gang wrote:
>> >
>>> >> Could you provide the related proof?
>>> >>
>>> >> Or shall I try to analyze about it and get proof?
>> >
>> > Can you show a proof that it actually improves anything? He who proposes
>> > a patch gets to defend it, not the other way round...
>> >
>> > Al, bloody annoyed
>> >
> OK, what you said sounds reasonable to me.
>
> It makes the code more readable since they are really pure Boolean
> functions, and let the functions are precisely same in all archs. But
> really, I shall try to prove that it has no negative effect.
>
> e.g. for arc arch. now, I have built the arc raw compiler to build arc
> kernel, but excuse me, I plan to finish proof next week, because during
> these days, I have to work, buy house, and focus on my father's health.
Since you seem to be have so much stuff to do I decided to help. I did a quick
compile of kernel with and w/o your changes
bloat-o-meter vmlinux-v4.8rc4-baseline vmlinux-v4.8rc4-bool-in-atomics
add/remove: 0/0 grow/shrink: 1/0 up/down: 6/0 (6)
function old new delta
vermagic 49 55 +6
Total: Before=5967447, After=5967453, chg 0.000000%
I'm mildly surprised that there is no difference so yeah this change is fine as
far as I'm concerned.
-Vineet