All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Roger Pau Monné" <roger.pau@citrix.com>
To: Jan Beulich <JBeulich@suse.com>, David Vrabel <david.vrabel@citrix.com>
Cc: xen-devel@lists.xenproject.org, Tim Deegan <tim@xen.org>,
	Ian Campbell <ian.campbell@citrix.com>
Subject: Re: [PATCH] xen: don't flush the TLB on grant unmap for auto-translated guests
Date: Wed, 7 May 2014 12:00:56 +0200	[thread overview]
Message-ID: <536A0458.9050402@citrix.com> (raw)
In-Reply-To: <536A07D0020000780000FB4A@mail.emea.novell.com>

On 07/05/14 10:15, Jan Beulich wrote:
>>>> On 06.05.14 at 19:01, <david.vrabel@citrix.com> wrote:
>> On 06/05/14 17:37, Roger Pau Monne wrote:
>>> For auto-translated guests the p2m code will do the necessary TLB
>>> flushes, so there's no need to perform any TLB flushes in generic
>>> grant table code.
>>>
>>> Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
>>> Cc: Jan Beulich <jbeulich@suse.com>
>>> Cc: Tim Deegan <tim@xen.org>
>>> Cc: Ian Campbell <ian.campbell@citrix.com>
>>> ---
>>>  xen/common/grant_table.c |   12 ++++++++----
>>>  1 files changed, 8 insertions(+), 4 deletions(-)
>>>
>>> diff --git a/xen/common/grant_table.c b/xen/common/grant_table.c
>>> index 107b000..a2a857f 100644
>>> --- a/xen/common/grant_table.c
>>> +++ b/xen/common/grant_table.c
>>> @@ -1099,7 +1099,8 @@ gnttab_unmap_grant_ref(
>>>              guest_handle_add_offset(uop, 1);
>>>          }
>>>  
>>> -        flush_tlb_mask(current->domain->domain_dirty_cpumask);
>>> +        if ( !paging_mode_external(current->domain) )
>>> +            flush_tlb_mask(current->domain->domain_dirty_cpumask);
>>
>> Introduce
>>
>> void gnttab_flush_tlb(struct domain *d)
>> {
>>     if ( !paging_mode_external(d) )
>>         flush_tlb_mask(d->domain_dirty_cpumask);
>> }
> 
> Yes, please, but preferably as
> 
> static void gnttab_flush_tlb(const struct domain *d)

Any reason not to make it static inline void?

> 
> Also, while you might not be concerned about its performance,
> I'd highly appreciate if the one remaining use (in gnttab_transfer())
> would also be inspected and - if suitable - replaced (or else a note
> added to the commit message clarifying why there the same can't
> be done).

Yes, I see the other caller of flush_tlb_mask, and
guest_physmap_remove_page ends up calling p2m_set_entry, which is the
same as the other callers, so AFAICT, the flush is not necessary there
either.

Roger.


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

  reply	other threads:[~2014-05-07 10:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-06 16:37 [PATCH] xen: don't flush the TLB on grant unmap for auto-translated guests Roger Pau Monne
2014-05-06 17:01 ` David Vrabel
2014-05-07  8:15   ` Jan Beulich
2014-05-07 10:00     ` Roger Pau Monné [this message]
2014-05-07 11:35       ` Jan Beulich

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=536A0458.9050402@citrix.com \
    --to=roger.pau@citrix.com \
    --cc=JBeulich@suse.com \
    --cc=david.vrabel@citrix.com \
    --cc=ian.campbell@citrix.com \
    --cc=tim@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.