From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751519AbdFGOY6 (ORCPT ); Wed, 7 Jun 2017 10:24:58 -0400 Received: from mx1.redhat.com ([209.132.183.28]:34154 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750810AbdFGOY4 (ORCPT ); Wed, 7 Jun 2017 10:24:56 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com B1A251766A4 Authentication-Results: ext-mx10.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx10.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=pbonzini@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com B1A251766A4 Subject: Re: [PATCH] KVM: async_pf: Fix rcu_irq_enter/exit() usage To: Wanpeng Li Cc: "linux-kernel@vger.kernel.org" , kvm , =?UTF-8?B?UmFkaW0gS3LEjW3DocWZ?= , Wanpeng Li References: <1496837040-8200-1-git-send-email-wanpeng.li@hotmail.com> <1733800e-2547-39dc-f3c8-9002ea42539e@redhat.com> From: Paolo Bonzini Message-ID: <287ecd79-dbc0-5618-9e69-830c50d30cab@redhat.com> Date: Wed, 7 Jun 2017 16:24:51 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Wed, 07 Jun 2017 14:24:55 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 07/06/2017 16:10, Wanpeng Li wrote: > 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. So it's just code cleanup? Paolo