[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH for-next] xen/arm: mm: flush_page_to_ram() only need to clean to PoC


  • To: Julien Grall <julien@xxxxxxx>
  • From: Bertrand Marquis <Bertrand.Marquis@xxxxxxx>
  • Date: Mon, 22 Feb 2021 11:58:33 +0000
  • Accept-language: en-GB, en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=fndaDEo2QfTLg4yPXyoHD4mZ+VaKn/RmwZSeipwhK1s=; b=croSNUEhmbz/nUv9FiTBNTQ6apJGbDpq0gGrYdIjGA5SMwOjrRnRg1HTgpHLwSNF1lOkF5ycXrEjA6hWH5dWgbC1ITyRIBxv3GogYEMdBOuZ1u1ubhptSs2zKIqpWnhlSVnpNAvMbF16xI0NbiI8CjrmOfPiDRg3Oc1iDtrLhKBxy+VJXMJqeqVytw11GOqQUystOzL+SuKZ5TcDRwTxJs/vN5AgQx7bzlkyXEH2RmsiMcIJ/s8dUcUV7QmDCdlMs3ThjwWSYG2DUC+GtAqsUif31zVkPpUhr8mn2aFfzxtB+nxuYAON72iW029KklglIVvEIzz463wttkDvccnhmQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jiWdzOV+D25//tT7MYET4UeC2GMmb4Fbt8XzQZ7rHo+ACkamheuZUaeQXeX/jD23GjS+Ivnke6xW06W46a8L1d3yg3o8q/R6m77OiapQXQbMCpyp4/Tjk+m2lONVF4pE9igkCx++JPDrUNbREWDkJF3SqWZKo9HNyGW8KCTpop5TQcAwyKSK1gtJn7JcBtGYSMaxuxxe9PbQLLjbCxBqoqJ1MnwVwMkSOW8ZsAsSKcSa335hMCvkhln9jazxM4Ik7IVoWlblZLXdH7pUqEj6doi+8Z9pvwi9s3PrLqNLb22dZnjXEQdaSE4T8HiyvqsBAhfpEQrxNdC9r8ePL5XkIQ==
  • Authentication-results-original: xen.org; dkim=none (message not signed) header.d=none;xen.org; dmarc=none action=none header.from=arm.com;
  • Cc: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Julien Grall <jgrall@xxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
  • Delivery-date: Mon, 22 Feb 2021 11:58:57 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Nodisclaimer: true
  • Original-authentication-results: xen.org; dkim=none (message not signed) header.d=none;xen.org; dmarc=none action=none header.from=arm.com;
  • Thread-index: AQHXB7GCcUtPYwKMVk+6z4A6IyPFF6pkFLEA
  • Thread-topic: [PATCH for-next] xen/arm: mm: flush_page_to_ram() only need to clean to PoC

Hi Julien,

> On 20 Feb 2021, at 17:54, Julien Grall <julien@xxxxxxx> wrote:
> 
> From: Julien Grall <jgrall@xxxxxxxxxx>
> 
> At the moment, flush_page_to_ram() is both cleaning and invalidate to
> PoC the page. However, the cache line can be speculated and pull in the
> cache right after as it is part of the direct map.

If we go further through this logic maybe all calls to
clean_and_invalidate_dcache_va_range could be transformed in a
clean_dcache_va_range.

> 
> So it is pointless to try to invalidate the line in the data cache.
> 

But what about processors which would not speculate ?

Do you expect any performance optimization here ?

If so it might be good to explain it as I am not quite sure I get it.

Cheers
Bertrand

> Signed-off-by: Julien Grall <jgrall@xxxxxxxxxx>
> ---
> xen/arch/arm/mm.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/xen/arch/arm/mm.c b/xen/arch/arm/mm.c
> index 59f8a3f15fd1..2f11d214e184 100644
> --- a/xen/arch/arm/mm.c
> +++ b/xen/arch/arm/mm.c
> @@ -529,7 +529,7 @@ void flush_page_to_ram(unsigned long mfn, bool 
> sync_icache)
> {
>     void *v = map_domain_page(_mfn(mfn));
> 
> -    clean_and_invalidate_dcache_va_range(v, PAGE_SIZE);
> +    clean_dcache_va_range(v, PAGE_SIZE);
>     unmap_domain_page(v);
> 
>     /*
> -- 
> 2.17.1
> 
> 




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.