RE: [PATCH] Prevent immediate process rescheduling

From: Langsdorf, Mark
Date: Sun Sep 20 2009 - 17:03:49 EST


> > Really hate this change though,. doesn't seem right to not
> pick the same
> > task again if its runnable. Bad for cache footprint.
>
> I agree, yielding should be explicitly requested.
>
> Also, on a heavily overcommitted box an undirected yield might take
> quite a long time to find the thread that's holding the lock.
> I think a
> yield_to() will be a lot better:
>
> - we can pick one of the vcpus belonging to the same guest to improve
> the probability that the lock actually get released

Is there a way to find the other vcpus belonging to the
same guest? I poked around at that, but couldn't find
one.

> - we avoid an issue when the other vcpus are on different
> runqueues (in which case the current patch does nothing)
> - we can fix the accounting by donating vruntime from current to the
> yielded-to vcpu

I may need someone to walk me through the vruntime donation
but that's secondary to finding the other vcpus.

-Mark Langsdorf
Operating System Research Center
AMD
--
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/