Received: by 2002:ac0:aa62:0:0:0:0:0 with SMTP id w31-v6csp288177ima; Wed, 24 Oct 2018 00:59:16 -0700 (PDT) X-Google-Smtp-Source: AJdET5fNWXZDXp1PgBcWfg7i8QNhBb+E0B2IeyY2XsiiaWg0k3MJtHhTakfX9kjgoTMQ7Rn/TIDI X-Received: by 2002:a17:902:9b89:: with SMTP id y9-v6mr1535267plp.239.1540367956841; Wed, 24 Oct 2018 00:59:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540367956; cv=none; d=google.com; s=arc-20160816; b=KKQJy0gS21wXIZ2J+2RFzpNjj21hyWKkG6cottTicvVQ8W0NyxLVr6UagKVGANtURC UdV43clW3FocrZn3oEb/4MGWYuMULMy62ioOFGHJG1k/nxaztZ1iiyfhJuGqZTPBdPd+ jI6vdFtP809G4FEuGtJWe0B9SfCGM3g/WZC1LkgM1O5eic79TcVCvQNNssyRpLYfd8Nw 3zLnJkbU5lPumsxkEnjOuy1jB2uGrdp2iJ1nYwK6Q+noNRgwAzeKKTEobIvh0vWEbvnM khM3SsYcpnTKIs9QzfSdCY8cmgtERPgcw2AvVtr1SFyxXekvU5sr9lL7y3iQbfKMlZGW tCSA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:mail-followup-to :message-id:subject:cc:to:from:date; bh=TDy36dpHadcTevgExhGsQoDrc1yAE6FGmkj7pQXcvME=; b=vb4/gLMoEki0h/aMBKSeFS8YJxoOQMCJe/2Kp9NXtRK9AJnyFyvIh+5+1J+KhlDwje /uaFIoRKWGZCRb+pVOj8R7HsWZNnsFpqtiFX7tx+yDg2F48So8SCCZacwyAowOfNf3KP 65m4FcyjsKcJp7tcb2tPMaIo9oLZmo7wGAoWOV2H0fH0Lrw0PaMoz2C35hgi0ZhjASsv oTbf6UO2rdFY0q8RJ8kouJyJl514SluvihF+WusDYP+b0RfwZ2hAqu+E6D/4b1eNh3Zn EI7sSNiTdMDeikzyt1oLYmMQjJUfH4wEhWzwa66XIBFgIqirfyC0qATWFijFj8v3kUNZ MtpQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z16-v6si3808943pgu.525.2018.10.24.00.59.01; Wed, 24 Oct 2018 00:59:16 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727604AbeJXQTm (ORCPT + 99 others); Wed, 24 Oct 2018 12:19:42 -0400 Received: from mga17.intel.com ([192.55.52.151]:27491 "EHLO mga17.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726832AbeJXQTm (ORCPT ); Wed, 24 Oct 2018 12:19:42 -0400 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 24 Oct 2018 00:52:44 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,419,1534834800"; d="scan'208";a="84004560" Received: from linux.intel.com ([10.54.29.200]) by orsmga008.jf.intel.com with ESMTP; 24 Oct 2018 00:52:43 -0700 Received: from tiger-server (unknown [10.239.48.128]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by linux.intel.com (Postfix) with ESMTPS id 442BB580475; Wed, 24 Oct 2018 00:52:41 -0700 (PDT) Date: Wed, 24 Oct 2018 22:32:11 +0800 From: Yi Zhang To: kvm@vger.kernel.org, linux-kernel@vger.kernel.org, pbonzini@redhat.com, yu.c.zhang@intel.com, pagupta@redhat.com, david@redhat.com, jack@suse.cz, hch@lst.de Cc: linux-mm@kvack.org, rkrcmar@redhat.com, jglisse@redhat.com, yi.z.zhang@intel.com Subject: Re: [PATCH V5 1/4] kvm: remove redundant reserved page check Message-ID: <20181024143210.GA10874@tiger-server> Mail-Followup-To: kvm@vger.kernel.org, linux-kernel@vger.kernel.org, pbonzini@redhat.com, yu.c.zhang@intel.com, pagupta@redhat.com, david@redhat.com, jack@suse.cz, hch@lst.de, linux-mm@kvack.org, rkrcmar@redhat.com, jglisse@redhat.com, yi.z.zhang@intel.com References: <26f79872e78cc643937059003763b5cfc1333167.1536342881.git.yi.z.zhang@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <26f79872e78cc643937059003763b5cfc1333167.1536342881.git.yi.z.zhang@linux.intel.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2018-09-08 at 02:03:28 +0800, Zhang Yi wrote: > PageReserved() is already checked inside kvm_is_reserved_pfn(), > remove it from kvm_set_pfn_dirty(). > > Signed-off-by: Zhang Yi > Signed-off-by: Zhang Yu > Reviewed-by: David Hildenbrand > Acked-by: Pankaj Gupta > --- > virt/kvm/kvm_main.c | 8 ++------ > 1 file changed, 2 insertions(+), 6 deletions(-) > > diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c > index 8b47507f..c44c406 100644 > --- a/virt/kvm/kvm_main.c > +++ b/virt/kvm/kvm_main.c > @@ -1690,12 +1690,8 @@ EXPORT_SYMBOL_GPL(kvm_release_pfn_dirty); > > void kvm_set_pfn_dirty(kvm_pfn_t pfn) > { > - if (!kvm_is_reserved_pfn(pfn)) { > - struct page *page = pfn_to_page(pfn); > - > - if (!PageReserved(page)) > - SetPageDirty(page); > - } > + if (!kvm_is_reserved_pfn(pfn)) > + SetPageDirty(pfn_to_page(pfn)); > } > EXPORT_SYMBOL_GPL(kvm_set_pfn_dirty); > > -- > 2.7.4 > Hi Paolo, We will remove the reserved flag in dax pages, then patch 2[3,4]/4 is unnecessary, can we queue this 1/4 to next merge? Thank you very much. Yi