Message ID | 1386685284-3862-1-git-send-email-aneesh.kumar@linux.vnet.ibm.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On 10.12.2013, at 15:21, Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> wrote: > From: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com> > > We already checked need_resched. So we can call schedule directly > > Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> The real fix for the issue you're seeing is https://lkml.org/lkml/2013/11/28/241 Alex -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Alexander Graf <agraf@suse.de> writes: > On 10.12.2013, at 15:21, Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> wrote: > >> From: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com> >> >> We already checked need_resched. So we can call schedule directly >> >> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@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() ? -aneesh -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On 10.12.2013, at 17:08, Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> wrote: > Alexander Graf <agraf@suse.de> writes: > >> On 10.12.2013, at 15:21, Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> wrote: >> >>> From: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com> >>> >>> We already checked need_resched. So we can call schedule directly >>> >>> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@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 -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Tue, 2013-12-10 at 15:40 +0100, Alexander Graf wrote: > On 10.12.2013, at 15:21, Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> wrote: > > > From: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com> > > > > We already checked need_resched. So we can call schedule directly > > > > Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> > > The real fix for the issue you're seeing is > > https://lkml.org/lkml/2013/11/28/241 > And is still not upstream.... Peter ? Cheers, Ben. -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Wed, Dec 11, 2013 at 07:52:51AM +1100, Benjamin Herrenschmidt wrote: > On Tue, 2013-12-10 at 15:40 +0100, Alexander Graf wrote: > > On 10.12.2013, at 15:21, Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> wrote: > > > > > From: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com> > > > > > > We already checked need_resched. So we can call schedule directly > > > > > > Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> > > > > The real fix for the issue you're seeing is > > > > https://lkml.org/lkml/2013/11/28/241 > > > > And is still not upstream.... Peter ? Yeah, I went on holidays and the patch just sat there. I'll prod Ingo into merging it. -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Tue, 2013-12-10 at 23:48 +0100, Peter Zijlstra wrote: > > Yeah, I went on holidays and the patch just sat there. I'll prod Ingo > into merging it. Thanks ! Cheers, Ben. -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/arch/powerpc/kvm/powerpc.c b/arch/powerpc/kvm/powerpc.c index e4d511c8b38b..6a49b23a3276 100644 --- a/arch/powerpc/kvm/powerpc.c +++ b/arch/powerpc/kvm/powerpc.c @@ -74,7 +74,7 @@ int kvmppc_prepare_to_enter(struct kvm_vcpu *vcpu) while (true) { if (need_resched()) { local_irq_enable(); - cond_resched(); + schedule(); local_irq_disable(); continue; }