Re: [PATCH 1/2] lib: more scalable list_sort()
From: Don Mullis
Date: Sun Jan 24 2010 - 17:38:49 EST
Artem Bityutskiy <dedekind1@xxxxxxxxx> 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
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/