lists.openwall.net   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  linux-cve-announce  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:	Mon, 04 Apr 2011 00:10:41 +0200
From:	Jens Axboe <axboe@...nel.dk>
To:	Konstantin Khlebnikov <khlebnikov@...nvz.org>
CC:	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] block: fix request sorting at unplug

On 2011-04-02 17:37, Konstantin Khlebnikov wrote:
> Comparison function for list_sort() must be anticommutative,
> otherwise it is not sorting in ordinary meaning.
> 
> But fortunately list_sort() always check ((*cmp)(priv, a, b) <= 0)
> it not distinguish negative and zero, so comparison function can
> implement only less-or-equal instead of full three-way comparison.

Thanks, good catch! It's an optimization, so no breakage. But if you end
up often having > 1 queue plugged, it's a good optimization.

-- 
Jens Axboe

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ