From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gleb Natapov Subject: Re: [RFC PATCH] Fix abnormal rcu dynticks_nesting values related to async page fault Date: Tue, 27 Nov 2012 18:39:10 +0200 Message-ID: <20121127163910.GL12969@redhat.com> References: <1353993325.14050.49.camel@ThinkPad-T5421.cn.ibm.com> <20121127154455.GK12969@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mx1.redhat.com ([209.132.183.28]:58755 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755861Ab2K0Qj3 (ORCPT ); Tue, 27 Nov 2012 11:39:29 -0500 Content-Disposition: inline In-Reply-To: Sender: linux-next-owner@vger.kernel.org List-ID: To: Frederic Weisbecker Cc: Li Zhong , linux-next list , LKML , paulmck@linux.vnet.ibm.com, sasha.levin@oracle.com, avi@redhat.com On Tue, Nov 27, 2012 at 04:56:30PM +0100, Frederic Weisbecker wrote: > 2012/11/27 Gleb Natapov : > > For KVM_PV_REASON_PAGE_NOT_PRESENT it behaves like an exception. > > Ok. > There seem to be a bug in kvm_async_pf_task_wait(). Using > idle_cpu(cpu) to find out if the current task is the idle task may not > work if there is pending wake up. Me may schedule another task but > when that other task sleeps later we can't schedule back to idle until > the fault is completed. > > The right way is to use is_idle_task(current) But if there is pending wake up then scheduling to the waked up task is exactly what we want. -- Gleb.