From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751514AbdFGOKg (ORCPT ); Wed, 7 Jun 2017 10:10:36 -0400 Received: from mail-ot0-f195.google.com ([74.125.82.195]:33188 "EHLO mail-ot0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751383AbdFGOKe (ORCPT ); Wed, 7 Jun 2017 10:10:34 -0400 MIME-Version: 1.0 In-Reply-To: <1733800e-2547-39dc-f3c8-9002ea42539e@redhat.com> References: <1496837040-8200-1-git-send-email-wanpeng.li@hotmail.com> <1733800e-2547-39dc-f3c8-9002ea42539e@redhat.com> From: Wanpeng Li Date: Wed, 7 Jun 2017 22:10:33 +0800 Message-ID: Subject: Re: [PATCH] KVM: async_pf: Fix rcu_irq_enter/exit() usage To: Paolo Bonzini Cc: "linux-kernel@vger.kernel.org" , kvm , =?UTF-8?B?UmFkaW0gS3LEjW3DocWZ?= , Wanpeng Li Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 2017-06-07 21:05 GMT+08:00 Paolo Bonzini : > > > On 07/06/2017 14:04, Wanpeng Li wrote: >> From: Wanpeng Li >> >> Commit 9b132fbe5419 (Add rcu user eqs exception hooks for async page fault) >> adds rcu_irq_enter/exit() to kvm_async_pf_task_wait() to exit cpu idle eqs >> when needed, to protect the code that needs use rcu. There is no need to call >> this pairs if async page fault is not triggered from idle task. >> >> This patch fixes it by rcu irq exit if it is not triggered from idle task to >> avoid rcu hang after schedule() in the for loop. > > How does the bug manifest? Just by codes review. Regards, Wanpeng Li