From: Vineet Gupta <Vineet.Gupta1@synopsys.com>
To: Noam Camus <noamca@mellanox.com>, <linux-snps-arc@lists.infradead.org>
Cc: <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2 02/11] ARC: send ipi to all cpus sharing task mm in case of page fault
Date: Tue, 30 May 2017 09:40:39 -0700 [thread overview]
Message-ID: <59721e2f-efd2-4e75-a0e7-5bf87a98726f@synopsys.com> (raw)
In-Reply-To: <1495954328-28736-3-git-send-email-noamca@mellanox.com>
On 05/27/2017 11:51 PM, Noam Camus wrote:
> From: Noam Camus <noamca@mellanox.com>
>
> This patch is derived due to performance issue.
> The use case is a page fault that resides on more than the local cpu.
> Trying to broadcast all CPUs results on performance degradation.
> So we try to avoid this by sending only to the relevant CPUs.
>
> Signed-off-by: Noam Camus <noamca@mellanox.com>
> Reviewed-by: Alexey Brodkin <abrodkin@synopsys.com>
This indeed looks like a nice optimization - do you have any performance numbers
when say running hackbench or other multi-threaded workloads !
-Vineet
> ---
> arch/arc/include/asm/cacheflush.h | 3 ++-
> arch/arc/mm/cache.c | 12 ++++++++++--
> arch/arc/mm/tlb.c | 2 +-
> 3 files changed, 13 insertions(+), 4 deletions(-)
>
> diff --git a/arch/arc/include/asm/cacheflush.h b/arch/arc/include/asm/cacheflush.h
> index fc662f4..716dba1 100644
> --- a/arch/arc/include/asm/cacheflush.h
> +++ b/arch/arc/include/asm/cacheflush.h
> @@ -33,7 +33,8 @@
>
> void flush_icache_range(unsigned long kstart, unsigned long kend);
> void __sync_icache_dcache(phys_addr_t paddr, unsigned long vaddr, int len);
> -void __inv_icache_page(phys_addr_t paddr, unsigned long vaddr);
> +void __inv_icache_page(struct vm_area_struct *vma,
> + phys_addr_t paddr, unsigned long vaddr);
> void __flush_dcache_page(phys_addr_t paddr, unsigned long vaddr);
>
> #define ARCH_IMPLEMENTS_FLUSH_DCACHE_PAGE 1
> diff --git a/arch/arc/mm/cache.c b/arch/arc/mm/cache.c
> index 7d3e79b..e1ea57f 100644
> --- a/arch/arc/mm/cache.c
> +++ b/arch/arc/mm/cache.c
> @@ -934,9 +934,17 @@ void __sync_icache_dcache(phys_addr_t paddr, unsigned long vaddr, int len)
> }
>
> /* wrapper to compile time eliminate alignment checks in flush loop */
> -void __inv_icache_page(phys_addr_t paddr, unsigned long vaddr)
> +void __inv_icache_page(struct vm_area_struct *vma,
> + phys_addr_t paddr, unsigned long vaddr)
> {
> - __ic_line_inv_vaddr(paddr, vaddr, PAGE_SIZE);
> + struct ic_inv_args ic_inv = {
> + .paddr = paddr,
> + .vaddr = vaddr,
> + .sz = PAGE_SIZE
> + };
> +
> + on_each_cpu_mask(mm_cpumask(vma->vm_mm),
> + __ic_line_inv_vaddr_helper, &ic_inv, 1);
> }
>
> /*
> diff --git a/arch/arc/mm/tlb.c b/arch/arc/mm/tlb.c
> index c5e70d8..a095608 100644
> --- a/arch/arc/mm/tlb.c
> +++ b/arch/arc/mm/tlb.c
> @@ -626,7 +626,7 @@ void update_mmu_cache(struct vm_area_struct *vma, unsigned long vaddr_unaligned,
>
> /* invalidate any existing icache lines (U-mapping) */
> if (vma->vm_flags & VM_EXEC)
> - __inv_icache_page(paddr, vaddr);
> + __inv_icache_page(vma, paddr, vaddr);
> }
> }
> }
>
next prev parent reply other threads:[~2017-05-30 16:40 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-28 6:51 [PATCH v2 00/11] ARC plat-eznps upstream cont Noam Camus
2017-05-28 6:51 ` [PATCH v2 01/11] ARC: set level of log per CPU during boot to be debug level Noam Camus
2017-05-28 6:51 ` [PATCH v2 02/11] ARC: send ipi to all cpus sharing task mm in case of page fault Noam Camus
2017-05-30 16:40 ` Vineet Gupta [this message]
2017-05-28 6:52 ` [PATCH v2 03/11] ARC: typo fix in mm/fault.c Noam Camus
2017-05-28 6:52 ` [PATCH v2 04/11] ARC: typos fix in kernel/entry-compact.S Noam Camus
2017-05-28 6:52 ` [PATCH v2 05/11] ARC: [plat-eznps] typo fix at Kconfig Noam Camus
2017-05-28 6:52 ` [PATCH v2 06/11] ARC: [plat-eznps] Fix TLB Errata Noam Camus
2017-05-28 6:52 ` [PATCH v2 07/11] ARC: [plat-eznps] disabled stall counter due to a HW bug Noam Camus
2017-05-29 15:15 ` Alexey Brodkin
2017-05-28 6:52 ` [PATCH v2 08/11] ARC: [plat-eznps] spinlock aware for MTM Noam Camus
2017-06-02 18:36 ` Vineet Gupta
2017-06-04 6:11 ` Noam Camus
2017-05-28 6:52 ` [PATCH v2 09/11] ARC: [plat-eznps] use schd.wft instruction instead of sleep at idle task Noam Camus
2017-05-28 6:52 ` [PATCH v2 10/11] ARC: enable platform specific mem_service implementation Noam Camus
2017-05-28 6:52 ` [PATCH v2 11/11] ARC: [plat-eznps] Handle memory error as an exception Noam Camus
2017-06-02 19:04 ` Vineet Gupta
2017-06-04 6:10 ` Noam Camus
2017-06-06 22:10 ` Vineet Gupta
2017-06-07 6:07 ` Noam Camus
2017-06-07 11:14 ` Noam Camus
2017-06-07 16:15 ` Vineet Gupta
[not found] ` <AM5PR0502MB2996A1F4CFE1FE6AEB433A7DAAC80@AM5PR0502MB2996.eurprd05.prod.outlook.com>
[not found] ` <AM5PR0502MB2996FBD57D8591A42ED4A84CAAC90@AM5PR0502MB2996.eurprd05.prod.outlook.com>
2017-06-08 16:38 ` Vineet Gupta
[not found] ` <AM5PR0502MB299646D52F2A0AF3764CEC4BAAC90@AM5PR0502MB2996.eurprd05.prod.outlook.com>
2017-06-08 19:00 ` Vineet Gupta
[not found] ` <AM5PR0502MB2996B6DA5530C4B37A7B1AF0AACE0@AM5PR0502MB2996.eurprd05.prod.outlook.com>
2017-06-12 17:40 ` Vineet Gupta
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=59721e2f-efd2-4e75-a0e7-5bf87a98726f@synopsys.com \
--to=vineet.gupta1@synopsys.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-snps-arc@lists.infradead.org \
--cc=noamca@mellanox.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
Powered by JetHome