lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Tue, 20 Oct 2009 20:11:19 +0200
From:	Corrado Zoccolo <>
To:	Jens Axboe <>
Cc:	Linux-Kernel <>,
	Jeff Moyer <>
Subject: Re: [RFC PATCH 1/5] cfq-iosched: adapt slice to number of processes 
	doing I/O

On Tue, Oct 20, 2009 at 3:17 PM, Jens Axboe <> wrote:
> I do, personally it doesn't read anywhere near as naturally as a simple
> 'if'. And when you start doing x = a ? b : c ? d : e; I almost reach for
> the nearest expletive :-)
In this case, formatting it on multiple lines could help:
 a ? b :
   c ? d :
> And adding a local scope with {} and having 3-4 broken lines of
> multiplications, divisions (etc) inside max()/min() calls doesn't add to
> the readability in any positive way...

Ok, but min and max hide a lot of complexity for the corner cases.
Espressing those with plain ifs would be really a tough task.

>> To me, it seems a good way to achieve a different readability goal,
>> i.e. define the value of a variable in a single place, instead of
>> scattering it around on multiple lines.
> I prefer putting it elsewhere instead. So instead of doing:
>        foo_type bar = x(y) == BAZ ? a : b;
> you have
> get_foo_type(y)
> {
>        if (x(y) == BAZ)
>                return a;
>        return b;
> }
>        foo_type bar = get_foo_type(y);
> which is a lot more readable to me. Especially since you have to do the
> get_foo_type() operation in a lot of places.

Sounds good. I'll do in this way in next version.

>> It's not important for the patches per se, but I found odd (and it
>> caused me some headache while debugging) that in cfq_add_rq_rb the
>> fifo was still empty.
>> In the new form, the rq will be complete when added, while in the
>> previous, it still had some empty fields.
> Then keep it like it is, or do it as a separate patch. When you include
> it in a functionally changing patch like this, I'm assuming there must
> be a reason for that. And when it seems like there isn't, you wonder
> what is up.

I'm moving it in the preparation patch, that is not changing
functionality. There,. it makes more sense.

I'm going to send the revised series soon.

> --
> Jens Axboe


dott. Corrado Zoccolo                
PhD - Department of Computer Science - University of Pisa, Italy
The self-confidence of a warrior is not the self-confidence of the average
man. The average man seeks certainty in the eyes of the onlooker and calls
that self-confidence. The warrior seeks impeccability in his own eyes and
calls that humbleness.
                               Tales of Power - C. Castaneda
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

Powered by blists - more mailing lists