From: "Roger Pau Monné" <roger.pau@citrix.com>
To: Julien Grall <julien@xen.org>
Cc: Stefano Stabellini <sstabellini@kernel.org>, Wei Liu <wl@xen.org>,
paul@xen.org, Andrew Cooper <andrew.cooper3@citrix.com>,
Ian Jackson <ian.jackson@eu.citrix.com>,
George Dunlap <george.dunlap@citrix.com>,
Jan Beulich <jbeulich@suse.com>,
xen-devel@lists.xenproject.org,
Volodymyr Babchuk <Volodymyr_Babchuk@epam.com>
Subject: Re: [PATCH for-4.14 v3] x86/tlb: fix assisted flush usage
Date: Fri, 26 Jun 2020 12:07:45 +0200 [thread overview]
Message-ID: <20200626100745.GB735@Air-de-Roger> (raw)
In-Reply-To: <551387c6-f45d-bf6c-a41e-b0920425db9f@xen.org>
On Fri, Jun 26, 2020 at 10:38:11AM +0100, Julien Grall wrote:
> Hi Roger,
>
> Sorry I didn't manage to answer to your question before you sent v3.
>
> On 25/06/2020 12:30, Roger Pau Monne wrote:
> > diff --git a/xen/include/asm-arm/flushtlb.h b/xen/include/asm-arm/flushtlb.h
> > index ab1aae5c90..7ae0543885 100644
> > --- a/xen/include/asm-arm/flushtlb.h
> > +++ b/xen/include/asm-arm/flushtlb.h
> > @@ -27,6 +27,7 @@ static inline void page_set_tlbflush_timestamp(struct page_info *page)
> > /* Flush specified CPUs' TLBs */
> > void flush_tlb_mask(const cpumask_t *mask);
> > +#define flush_tlb_mask_sync flush_tlb_mask
>
> Dropping the parameter 'sync' from filtered_flush_tlb_mask() is a nice
> improvement, but it unfortunately doesn't fully address my concern.
>
> After this patch there is exactly one use of flush_tlb_mask() in common code
> (see grant_table.c). But without looking at the x86 code, it is not clear
> why this requires a different flush compare to the two other sites.
It's not dealing with page allocation or page type changes directly,
and hence doesn't need to use an IPI in order to prevent races with
spurious_page_fault.
> IOW, if I want to modify the common code in the future, how do I know which
> flush to call?
Unless you modify one of the specific areas mentioned above (page
allocation or page type changes) you should use flush_tlb_mask.
This is not ideal, and my aim will be to be able to use the assisted
flush everywhere if possible, so I would really like to get rid of the
interrupt disabling done in spurious_page_fault and this model where
x86 relies on blocking interrupts in order to prevent page type
changes or page freeing.
Such change however doesn't feel appropriate for a release freeze
period, and hence went with something smaller that restores the
previous behavior. Another option is to just disable assisted flushes
for the time being and re-enable them when a suitable solution is
found.
Roger.
next prev parent reply other threads:[~2020-06-26 10:08 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-25 11:30 [PATCH for-4.14 v3] x86/tlb: fix assisted flush usage Roger Pau Monne
2020-06-26 9:38 ` Julien Grall
2020-06-26 10:07 ` Roger Pau Monné [this message]
2020-06-26 13:11 ` Jan Beulich
2020-06-26 13:21 ` Paul Durrant
2020-06-26 13:58 ` Julien Grall
2020-06-26 14:16 ` Roger Pau Monné
2020-06-26 14:24 ` Jan Beulich
2020-06-26 14:28 ` Paul Durrant
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=20200626100745.GB735@Air-de-Roger \
--to=roger.pau@citrix.com \
--cc=Volodymyr_Babchuk@epam.com \
--cc=andrew.cooper3@citrix.com \
--cc=george.dunlap@citrix.com \
--cc=ian.jackson@eu.citrix.com \
--cc=jbeulich@suse.com \
--cc=julien@xen.org \
--cc=paul@xen.org \
--cc=sstabellini@kernel.org \
--cc=wl@xen.org \
--cc=xen-devel@lists.xenproject.org \
/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.