Re: [PATCH] sched: fix erroneous sysct_sched_nr_migrate logic

From: Peter Zijlstra
Date: Tue May 10 2011 - 05:07:46 EST


On Fri, 2011-05-06 at 14:02 +0400, Vladimir Davydov wrote:
>
> But looking through the code, I found the definition:
>
> /* * Number of tasks to iterate in a single balance run. * Limited
> because this is done with IRQs disabled. */ const_debug unsigned int
> sysctl_sched_nr_migrate = 32;
>
> However, AFAIS from the code, the number of tasks to iterate is
> virtually unlimited. So I conclude either the comment is confusing, or
> the logic is wrong.
>

Right, so I mostly agree with your (haven't actually read your patch
yet), the one worry I have is that we'll get stuck endlessly trying to
balance the first cgroup and when there's enough tasks in there but not
enough weight, we'll get stuck not making much progress.

This is one of the many things with the whole cgroup mess that needs
proper sorting out.

So yes, I agree with your interpretation of the sysctl, but I don't
think a straight fwd accounting 'fix' will actually result in a better
kernel.



--
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/