All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefano Stabellini <sstabellini@kernel.org>
To: Punit Agrawal <punit.agrawal@arm.com>
Cc: sstabellini@kernel.org, wei.liu2@citrix.com,
	George.Dunlap@eu.citrix.com, andrew.cooper3@citrix.com,
	tim@xen.org, xen-devel@lists.xen.org, julien.grall@arm.com,
	jbeulich@suse.com, ian.jackson@eu.citrix.com
Subject: Re: [For Xen-4.10 RFC PATCH 2/3] arm: p2m: Prevent redundant icache flushes
Date: Fri, 31 Mar 2017 16:54:17 -0700 (PDT)	[thread overview]
Message-ID: <alpine.DEB.2.10.1703311653520.3287@sstabellini-ThinkPad-X260> (raw)
In-Reply-To: <20170331102424.11869-3-punit.agrawal@arm.com>

On Fri, 31 Mar 2017, Punit Agrawal wrote:
> When toolstack requests flushing the caches, flush_page_to_ram() is
> called for each page of the requested domain. This needs to unnecessary
> icache invalidation operations.
> 
> Let's take the responsibility of performing icache operations and use
> the recently introduced flag to prevent redundant icache operations by
> flush_page_to_ram().
> 
> Signed-off-by: Punit Agrawal <punit.agrawal@arm.com>

Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>


> ---
>  xen/arch/arm/p2m.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/xen/arch/arm/p2m.c b/xen/arch/arm/p2m.c
> index 76cd1c34f3..8136522ed8 100644
> --- a/xen/arch/arm/p2m.c
> +++ b/xen/arch/arm/p2m.c
> @@ -1400,13 +1400,15 @@ int p2m_cache_flush(struct domain *d, gfn_t start, unsigned long nr)
>          /* XXX: Implement preemption */
>          while ( gfn_x(start) < gfn_x(next_gfn) )
>          {
> -            flush_page_to_ram(mfn_x(mfn), true);
> +            flush_page_to_ram(mfn_x(mfn), false);
>  
>              start = gfn_add(start, 1);
>              mfn = mfn_add(mfn, 1);
>          }
>      }
>  
> +    invalidate_icache();
> +
>      p2m_read_unlock(p2m);
>  
>      return 0;
> -- 
> 2.11.0
> 

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

  reply	other threads:[~2017-03-31 23:54 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-31 10:24 [For Xen-4.10 RFC PATCH 0/3] Reduce unnecessary icache maintenance operations Punit Agrawal
2017-03-31 10:24 ` [For Xen-4.10 RFC PATCH 1/3] Allow control of icache invalidations when calling flush_page_to_ram() Punit Agrawal
2017-03-31 23:53   ` Stefano Stabellini
2017-03-31 10:24 ` [For Xen-4.10 RFC PATCH 2/3] arm: p2m: Prevent redundant icache flushes Punit Agrawal
2017-03-31 23:54   ` Stefano Stabellini [this message]
2017-04-03 10:45     ` Punit Agrawal
2017-03-31 10:24 ` [For Xen-4.10 RFC PATCH 3/3] Prevent redundant icache flushes in populate_physmap() Punit Agrawal
2017-03-31 11:34   ` Wei Liu
2017-03-31 13:53     ` Punit Agrawal
2017-03-31 14:10       ` Wei Liu
2017-03-31 14:27         ` Punit Agrawal
2017-03-31 23:58         ` Stefano Stabellini
2017-05-09 15:16   ` Julien Grall
2017-05-12 12:35     ` Punit Agrawal

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=alpine.DEB.2.10.1703311653520.3287@sstabellini-ThinkPad-X260 \
    --to=sstabellini@kernel.org \
    --cc=George.Dunlap@eu.citrix.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=jbeulich@suse.com \
    --cc=julien.grall@arm.com \
    --cc=punit.agrawal@arm.com \
    --cc=tim@xen.org \
    --cc=wei.liu2@citrix.com \
    --cc=xen-devel@lists.xen.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.