From: Jeremy Fitzhardinge <jeremy@goop.org>
To: Jan Beulich <JBeulich@novell.com>
Cc: Xiaowei Yang <xiaowei.yang@huawei.com>,
Nick Piggin <npiggin@kernel.dk>,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
fanhenglong@huawei.com, Kaushik Barde <kbarde@huawei.com>,
Kenneth Lee <liguozhu@huawei.com>,
linqaingmin <linqiangmin@huawei.com>,
wangzhenguo@huawei.com, Wu Fengguang <fengguang.wu@intel.com>,
"xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>,
linux-kernel@vger.kernel.org,
Marcelo Tosatti <mtosatti@redhat.com>,
Avi Kivity <avi@redhat.com>
Subject: Re: One (possible) x86 get_user_pages bug
Date: Thu, 27 Jan 2011 10:27:25 -0800 [thread overview]
Message-ID: <4D41B90D.5000305@goop.org> (raw)
In-Reply-To: <4D419416020000780002ECB7@vpn.id2.novell.com>
On 01/27/2011 06:49 AM, Jan Beulich wrote:
> However, going through all the comments in gup.c again I wonder
> whether pv Xen guests don't violate the major assumption: There
> is talk about interrupts being off preventing (or sufficiently
> deferring) remote CPUs doing TLB flushes. In pv Xen guests,
> however, non-local TLB flushes do not happen by sending IPIs -
> the hypercall interface gets used instead
Yes, I was aware of that synchronization mechanism, and I think I'd
convinced myself we were OK. But I can't think was that reasoning was -
perhaps it was something as simple as "gupf isn't used under Xen" (which
may have been true at the time, but isn't now).
As clever as it is, the whole "disable interrupts -> hold off IPI ->
prevent TLB flush -> delay freeing" chain seems pretty fragile. I guess
its OK if we assume that x86 will forever have IPI-based cross-cpu TLB
flushes, but one could imagine some kind of "remote tlb shootdown using
bus transaction" appearing in the architecture.
And even just considering virtualization, having non-IPI-based tlb
shootdown is a measurable performance win, since a hypervisor can
optimise away a cross-VCPU shootdown if it knows no physical TLB
contains the target VCPU's entries. I can imagine the KVM folks could
get some benefit from that as well.
So is there some way we can preserve the current scheme's benefits while
making it a bit more general? (If anyone else has non-IPI-based
shootdown, it would be s390; is there some inspiration there? An
instruction perhaps?)
J
next prev parent reply other threads:[~2011-01-27 18:27 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-27 13:05 One (possible) x86 get_user_pages bug Xiaowei Yang
2011-01-27 13:56 ` Peter Zijlstra
2011-01-27 14:30 ` Jan Beulich
2011-01-28 10:51 ` Peter Zijlstra
2011-01-27 14:49 ` Jan Beulich
2011-01-27 15:01 ` Peter Zijlstra
2011-01-27 18:27 ` Jeremy Fitzhardinge [this message]
2011-01-27 19:27 ` Peter Zijlstra
2011-01-30 13:01 ` Avi Kivity
2011-01-30 22:21 ` Kaushik Barde
2011-01-31 18:04 ` Jeremy Fitzhardinge
2011-01-31 20:10 ` Kaushik Barde
2011-01-31 22:10 ` Jeremy Fitzhardinge
2011-01-27 16:07 ` Jan Beulich
2011-01-27 16:25 ` Peter Zijlstra
2011-01-27 16:41 ` Jan Beulich
2011-01-27 16:56 ` Peter Zijlstra
2011-01-27 21:24 ` Nick Piggin
2011-01-28 7:17 ` Xiaowei Yang
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=4D41B90D.5000305@goop.org \
--to=jeremy@goop.org \
--cc=JBeulich@novell.com \
--cc=a.p.zijlstra@chello.nl \
--cc=avi@redhat.com \
--cc=fanhenglong@huawei.com \
--cc=fengguang.wu@intel.com \
--cc=kbarde@huawei.com \
--cc=liguozhu@huawei.com \
--cc=linqiangmin@huawei.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mtosatti@redhat.com \
--cc=npiggin@kernel.dk \
--cc=wangzhenguo@huawei.com \
--cc=xen-devel@lists.xensource.com \
--cc=xiaowei.yang@huawei.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox