All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Chris Mason <clm@fb.com>, Boris Burkov <boris@bur.io>
Cc: Sean Christopherson <seanjc@google.com>,
	"kvm@vger.kernel.org" <kvm@vger.kernel.org>,
	Kernel Team <Kernel-team@fb.com>
Subject: Re: [PATCH] KVM: use set_page_dirty rather than SetPageDirty
Date: Thu, 27 Jan 2022 13:20:23 +0100	[thread overview]
Message-ID: <3f4efc3d-f351-0fcb-e231-b422ea262f66@redhat.com> (raw)
In-Reply-To: <3876CE62-6E66-4CCE-ADED-69010EA72394@fb.com>

On 1/27/22 01:02, Chris Mason wrote:
> From the btrfs side, bare calls to set_page_dirty() are suboptimal,
> since it doesn’t go through the ->page_mkwrite() dance that we use to
> properly COW things.  It’s still much better than SetPageDirty(), but
> I’d love to understand why kvm needs to dirty the page so we can
> figure out how to go through the normal mmap file io paths.
Shouldn't ->page_mkwrite() occur at the point of get_user_pages, such as 
via handle_mm_fault->handle_pte_fault->do_fault->do_shared_fault?  That 
always happens before SetPageDirty(), or set_page_dirty() after Boris's 
patch.

Thanks,

Paolo


  parent reply	other threads:[~2022-01-27 12:20 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-26 19:54 [PATCH] KVM: use set_page_dirty rather than SetPageDirty Boris Burkov
2022-01-26 21:59 ` Sean Christopherson
2022-01-26 23:11   ` Boris Burkov
2022-01-27  0:02     ` Chris Mason
2022-01-27  1:36       ` Sean Christopherson
2022-01-27 15:00         ` Chris Mason
2022-01-27 12:20       ` Paolo Bonzini [this message]
2022-01-27 14:52         ` Chris Mason

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=3f4efc3d-f351-0fcb-e231-b422ea262f66@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=Kernel-team@fb.com \
    --cc=boris@bur.io \
    --cc=clm@fb.com \
    --cc=kvm@vger.kernel.org \
    --cc=seanjc@google.com \
    /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.