[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87ljfn9lig.fsf@gmail.com>
Date: Sun, 24 Jan 2010 14:38:15 -0800
From: Don Mullis <don.mullis@...il.com>
To: dedekind@...radead.org
Cc: Andi Kleen <andi@...stfloor.org>,
Dave Chinner <david@...morbit.com>,
linux-kernel@...r.kernel.org, airlied@...hat.com
Subject: Re: [PATCH 1/2] lib: more scalable list_sort()
Artem Bityutskiy <dedekind1@...il.com> writes:
> Don made IMO a good proposal for the caller to add cond_reshed() in its
> 'cmp()' callback, if needed. Shouldn't that work fine?
In the list_sort() implementation I posted, there was an O(n) loop that
contained no calls back to cmp(). The V2 implementation I'm testing
right now fixes that -- all inner loops will call back to cmp(). It's
also a bit faster, though ~100 bytes bigger.
If there's any other objection to pushing responsibility for calling
cond_resched() back to the client, via the cmp() routine, please, let's
hear it.
--
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