All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joerg Roedel <joro@8bytes.org>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: "Kirill A. Shutemov" <kirill@shutemov.name>,
	"Vlastimil Babka" <vbabka@suse.cz>,
	"Andrea Arcangeli" <aarcange@redhat.com>,
	"Radim Krčmář" <rkrcmar@redhat.com>,
	kvm@vger.kernel.org
Subject: THP refcounting in disallowed_hugepage_adjust()?
Date: Tue, 26 Nov 2019 16:21:09 +0100	[thread overview]
Message-ID: <20191126152109.GA23850@8bytes.org> (raw)

Hi Paolo et al,

while looking again at the recently added IFU patches I noticed a
dicrepancy between the two _hugepage_adjust() functions which doesn't
make sense to me yet:

	* transparent_hugepage_adjust(), when changing the value of pfn,
	  does a kvm_release_pfn_clean() on the old value and a
	  kvm_get_pfn() on the new value to make sure the code holds the
	  reference to the correct pfn.

	* disallowed_hugepage_adjust() also changes the value of the pfn
	  to map, kinda reverses what transparent_hugepage_adjust() did
	  before. But that function does not care about the pfn
	  refcounting.

I was wondering what the reason for that might be, is it just not
necessary in disallowed_hugepage_adjust() or is that an oversight?


Regards,

	Joerg
	  

             reply	other threads:[~2019-11-26 15:21 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-26 15:21 Joerg Roedel [this message]
2019-11-26 17:46 ` THP refcounting in disallowed_hugepage_adjust()? Sean Christopherson
2019-11-27  9:41   ` Joerg Roedel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191126152109.GA23850@8bytes.org \
    --to=joro@8bytes.org \
    --cc=aarcange@redhat.com \
    --cc=kirill@shutemov.name \
    --cc=kvm@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=rkrcmar@redhat.com \
    --cc=vbabka@suse.cz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.