Re: [PATCH v3 1/3] RISC-V: Issue a local tlbflush if possible.

2019-08-21 Thread Atish Patra
On Thu, 2019-08-22 at 06:27 +0200, h...@lst.de wrote: > On Thu, Aug 22, 2019 at 04:01:24AM +, Atish Patra wrote: > > The downside of this is that for every !cmask case in true SMP > > (more > > common probably) it will execute 2 extra cpumask instructions. As > > tlbflush path is in

Re: [PATCH v3 1/3] RISC-V: Issue a local tlbflush if possible.

2019-08-21 Thread h...@lst.de
On Thu, Aug 22, 2019 at 04:01:24AM +, Atish Patra wrote: > The downside of this is that for every !cmask case in true SMP (more > common probably) it will execute 2 extra cpumask instructions. As > tlbflush path is in performance critical path, I think we should favor > more common case (SMP

Re: [PATCH v3 1/3] RISC-V: Issue a local tlbflush if possible.

2019-08-21 Thread Atish Patra
On Thu, 2019-08-22 at 03:46 +0200, Christoph Hellwig wrote: > On Wed, Aug 21, 2019 at 05:46:42PM -0700, Atish Patra wrote: > > In RISC-V, tlb flush happens via SBI which is expensive. If the > > local > > cpu is the only cpu in cpumask, there is no need to invoke a SBI > > call. > > > > Just do a

Re: [PATCH v3 1/3] RISC-V: Issue a local tlbflush if possible.

2019-08-21 Thread Christoph Hellwig
On Wed, Aug 21, 2019 at 05:46:42PM -0700, Atish Patra wrote: > In RISC-V, tlb flush happens via SBI which is expensive. If the local > cpu is the only cpu in cpumask, there is no need to invoke a SBI call. > > Just do a local flush and return. > > Signed-off-by: Atish Patra > --- >

[PATCH v3 1/3] RISC-V: Issue a local tlbflush if possible.

2019-08-21 Thread Atish Patra
In RISC-V, tlb flush happens via SBI which is expensive. If the local cpu is the only cpu in cpumask, there is no need to invoke a SBI call. Just do a local flush and return. Signed-off-by: Atish Patra --- arch/riscv/mm/tlbflush.c | 15 +++ 1 file changed, 15 insertions(+) diff