On 24.07.2012 21:13, Steven Bosscher wrote:
AFAIR the qsort is just for getting a stable ordering over two pools to find
the leaked regsets afterwards, the type of ordering doesn't matter.

What matters is that the compare function gives a reliable result. You
can't subtract pointers like that for qsort.

After consulting the experts on IRC, I'm going with a fix along the
lines of "return (x == y ? 0 : (x < y ? -1 : 1));".

Yeah, I agree the code was dubious, so thanks for uncovering this. If you have already tested the patch, consider it preapproved, otherwise I can fix it on this week.


Anyways,
how come this is related to your patch?  We don't use statistics in
sel-sched...  Something got miscompiled?

No, just allocated slightly differently. A bitmap_head is one pointer
bigger than before. I'm unsure how that causes this problem, though. I
suspect you would have seen the same failure with GATHER_STATISTICS
enabled.

Still interesting to know why your first patch fixed the issue in the first place. I will try taking a look at the generated code in my spare time.

Yours,
Andrey


Ciao!
Steven


Reply via email to