[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190820092207.GA26271@infradead.org>
Date: Tue, 20 Aug 2019 02:22:07 -0700
From: "hch@...radead.org" <hch@...radead.org>
To: Atish Patra <Atish.Patra@....com>
Cc: "schwab@...ux-m68k.org" <schwab@...ux-m68k.org>,
"linux-riscv@...ts.infradead.org" <linux-riscv@...ts.infradead.org>,
"paul.walmsley@...ive.com" <paul.walmsley@...ive.com>,
"aou@...s.berkeley.edu" <aou@...s.berkeley.edu>,
"allison@...utok.net" <allison@...utok.net>,
"anup@...infault.org" <anup@...infault.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"hch@...radead.org" <hch@...radead.org>,
"palmer@...ive.com" <palmer@...ive.com>
Subject: Re: [v2 PATCH] RISC-V: Optimize tlb flush path.
On Tue, Aug 20, 2019 at 08:42:19AM +0000, Atish Patra wrote:
> cmask NULL is pretty common case and we would be unnecessarily
> executing bunch of instructions everytime while not saving much. Kernel
> still have to make an SBI call and OpenSBI is doing a local flush
> anyways.
>
> Looking at the code again, I think we can just use cpumask_weight and
> do local tlb flush only if local cpu is the only cpu present.
>
> Otherwise, it will just fall through and call sbi_remote_sfence_vma().
Maybe it is just time to split the different cases at a higher level.
The idea to multiple everything onto a single function always seemed
odd to me.
FYI, here is what I do for the IPI based tlbflush for the native S-mode
clint prototype, which seems much easier to understand:
http://git.infradead.org/users/hch/riscv.git/commitdiff/ea4067ae61e20fcfcf46a6f6bd1cc25710ce3afe
Powered by blists - more mailing lists