[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <4D98F061.5030003@kernel.dk>
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