From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 98B66C432C0 for ; Wed, 27 Nov 2019 09:41:47 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 743AB2070B for ; Wed, 27 Nov 2019 09:41:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726383AbfK0Jlq (ORCPT ); Wed, 27 Nov 2019 04:41:46 -0500 Received: from 8bytes.org ([81.169.241.247]:53056 "EHLO theia.8bytes.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726133AbfK0Jlq (ORCPT ); Wed, 27 Nov 2019 04:41:46 -0500 Received: by theia.8bytes.org (Postfix, from userid 1000) id A5A1C379; Wed, 27 Nov 2019 10:41:44 +0100 (CET) Date: Wed, 27 Nov 2019 10:41:40 +0100 From: Joerg Roedel To: Sean Christopherson Cc: Paolo Bonzini , "Kirill A. Shutemov" , Vlastimil Babka , Andrea Arcangeli , Radim =?utf-8?B?S3LEjW3DocWZ?= , kvm@vger.kernel.org Subject: Re: THP refcounting in disallowed_hugepage_adjust()? Message-ID: <20191127094140.GA11039@8bytes.org> References: <20191126152109.GA23850@8bytes.org> <20191126174603.GB22233@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191126174603.GB22233@linux.intel.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org Hi Jean, On Tue, Nov 26, 2019 at 09:46:03AM -0800, Sean Christopherson wrote: > disallowed_hugepage_adjust() is called from __direct_map() and its > modification of the pfn is also contained to __direct_map(), i.e. the > updated @pfn doesn't get propagated back up to the fault handlers. Thus, > kvm_release_pfn_clean() is called on the original pfn and so there's no > need to transfer the page reference. Thanks for your explanation, makes a lot of sense to me now. Regards, Joerg