LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Jason Wang <jasowang@redhat.com>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: kvm@vger.kernel.org, virtualization@lists.linux-foundation.org,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
Christoph Hellwig <hch@infradead.org>,
James Bottomley <James.Bottomley@hansenpartnership.com>,
Andrea Arcangeli <aarcange@redhat.com>,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>,
Peter Zijlstra <peterz@infradead.org>,
Darren Hart <dvhart@infradead.org>
Subject: Re: [RFC PATCH V2] vhost: don't use kmap() to log dirty pages
Date: Fri, 10 May 2019 12:48:12 +0800 [thread overview]
Message-ID: <fa6444aa-9c46-22f0-204a-c7592dc5bd51@redhat.com> (raw)
In-Reply-To: <d6d69a36-9a3a-2a21-924e-97fdcc6e6733@redhat.com>
On 2019/5/10 上午10:59, Jason Wang wrote:
>>>
>>> r = get_user_pages_fast(log, 1, 1, &page);
>> OK so the trick is that page is pinned so you don't expect
>> arch_futex_atomic_op_inuser below to fail. get_user_pages_fast
>> guarantees page is not going away but does it guarantee PTE won't be
>> invaidated or write protected?
>
>
> Good point, then I think we probably need to do manual fixup through
> fixup_user_fault() if arch_futex_atomic_op_in_user() fail.
This looks like a overkill, we don't need to atomic environment here
actually. Instead, just keep pagefault enabled should work. So just
introduce arch_futex_atomic_op_inuser_inatomic() variant with pagefault
disabled there just for futex should be sufficient.
Thanks
next prev parent reply other threads:[~2019-05-10 4:48 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-09 12:58 Jason Wang
2019-05-09 13:18 ` Michael S. Tsirkin
2019-05-10 2:59 ` Jason Wang
2019-05-10 4:48 ` Jason Wang [this message]
2019-05-13 5:22 ` Jason Wang
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=fa6444aa-9c46-22f0-204a-c7592dc5bd51@redhat.com \
--to=jasowang@redhat.com \
--cc=James.Bottomley@hansenpartnership.com \
--cc=aarcange@redhat.com \
--cc=dvhart@infradead.org \
--cc=hch@infradead.org \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=mst@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
--cc=virtualization@lists.linux-foundation.org \
--subject='Re: [RFC PATCH V2] vhost: don'\''t use kmap() to log dirty pages' \
/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
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).