[PATCH] KVM: PPC: Use schedule instead of cond_resched

Alexander Graf agraf at suse.de
Wed Dec 11 04:00:00 EST 2013


On 10.12.2013, at 17:08, Aneesh Kumar K.V <aneesh.kumar at linux.vnet.ibm.com> wrote:

> Alexander Graf <agraf at suse.de> writes:
> 
>> On 10.12.2013, at 15:21, Aneesh Kumar K.V <aneesh.kumar at linux.vnet.ibm.com> wrote:
>> 
>>> From: "Aneesh Kumar K.V" <aneesh.kumar at linux.vnet.ibm.com>
>>> 
>>> We already checked need_resched. So we can call schedule directly
>>> 
>>> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar at linux.vnet.ibm.com>
>> 
>> The real fix for the issue you're seeing is
>> 
>>  https://lkml.org/lkml/2013/11/28/241
> 
> True, I mentioned that in the thread
> 
> https://lkml.org/lkml/2013/12/9/64
> 
> But do we need to do cond_resched after we checked for need_resched() ?

This is really just copying the logic from kvm_resched() from virt/kvm/kvm_main.c. And I'd prefer not to diverge from that. I do agree that there's a good chance we don't need it, as it seems to predate preempt notifiers:

  https://git.kernel.org/cgit/virt/kvm/kvm.git/commit/?id=3fca03653010b8c5fa63b99fc94c78cbfb433d00

But this is a discussion that should occur on the non-ppc specific code first :).


Alex



More information about the Linuxppc-dev mailing list