All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sergey Matyukevich <geomatsi@gmail.com>
To: Jinyu Tang <tjytimi@163.com>
Cc: anup@brainfault.org, paul.walmsley@sifive.com,
	palmer@dabbelt.com, aou@eecs.berkeley.edu,
	alexandre.ghiti@canonical.com, guoren@kernel.org,
	heiko@sntech.de, akpm@linux-foundation.org,
	panqinglin2020@iscas.ac.cn, tongtiangen@huawei.com,
	sunnanyong@huawei.com, anshuman.khandual@arm.com,
	atishp@rivosinc.com, linux-riscv@lists.infradead.org,
	linux-kernel@vger.kernel.org, falcon@tinylab.org
Subject: Re: [PATCH v2] riscv: make update_mmu_cache to support asid
Date: Mon, 12 Sep 2022 10:26:00 +0300	[thread overview]
Message-ID: <Yx7fCL3rMgT4Uh96@curiosity> (raw)
In-Reply-To: <20220904133710.117263-1-tjytimi@163.com>

Hi Jinyu,

> The `update_mmu_cache` function in riscv flush tlb cache without asid
> information now, which will flush tlbs in other tasks' address space
> even if processor supports asid. So add a new function
> `flush_tlb_local_one_page` to flush local one page whether processor
> supports asid or not,for cases that need to flush local one page like
> function `update_mmu_cache`.
> 
> Signed-off-by: Jinyu Tang <tjytimi@163.com>
> ---
> RFC V1 -> V2 : 
> 1.Rebased on PATCH9 of IPI imporvement series as Anup Patel
> suggestion. 
> 2.Make commit log more clear.
> 
>  arch/riscv/include/asm/pgtable.h  |  2 +-
>  arch/riscv/include/asm/tlbflush.h |  2 ++
>  arch/riscv/mm/tlbflush.c          | 11 +++++++++++
>  3 files changed, 14 insertions(+), 1 deletion(-)

Just FYI: I have been looking into the same function w.r.t. to its
ASID/SMP handling. In addition to what your patch is doing with ASID,
I posted experimental change following flush_icache_mm approach. That
patch takes into account other concurrently running harts as well as
possible migration to other harts later on, see:

https://lore.kernel.org/linux-riscv/20220829205219.283543-1-geomatsi@gmail.com/

Regards,
Sergey

WARNING: multiple messages have this Message-ID (diff)
From: Sergey Matyukevich <geomatsi@gmail.com>
To: Jinyu Tang <tjytimi@163.com>
Cc: anup@brainfault.org, paul.walmsley@sifive.com,
	palmer@dabbelt.com, aou@eecs.berkeley.edu,
	alexandre.ghiti@canonical.com, guoren@kernel.org,
	heiko@sntech.de, akpm@linux-foundation.org,
	panqinglin2020@iscas.ac.cn, tongtiangen@huawei.com,
	sunnanyong@huawei.com, anshuman.khandual@arm.com,
	atishp@rivosinc.com, linux-riscv@lists.infradead.org,
	linux-kernel@vger.kernel.org, falcon@tinylab.org
Subject: Re: [PATCH v2] riscv: make update_mmu_cache to support asid
Date: Mon, 12 Sep 2022 10:26:00 +0300	[thread overview]
Message-ID: <Yx7fCL3rMgT4Uh96@curiosity> (raw)
In-Reply-To: <20220904133710.117263-1-tjytimi@163.com>

Hi Jinyu,

> The `update_mmu_cache` function in riscv flush tlb cache without asid
> information now, which will flush tlbs in other tasks' address space
> even if processor supports asid. So add a new function
> `flush_tlb_local_one_page` to flush local one page whether processor
> supports asid or not,for cases that need to flush local one page like
> function `update_mmu_cache`.
> 
> Signed-off-by: Jinyu Tang <tjytimi@163.com>
> ---
> RFC V1 -> V2 : 
> 1.Rebased on PATCH9 of IPI imporvement series as Anup Patel
> suggestion. 
> 2.Make commit log more clear.
> 
>  arch/riscv/include/asm/pgtable.h  |  2 +-
>  arch/riscv/include/asm/tlbflush.h |  2 ++
>  arch/riscv/mm/tlbflush.c          | 11 +++++++++++
>  3 files changed, 14 insertions(+), 1 deletion(-)

Just FYI: I have been looking into the same function w.r.t. to its
ASID/SMP handling. In addition to what your patch is doing with ASID,
I posted experimental change following flush_icache_mm approach. That
patch takes into account other concurrently running harts as well as
possible migration to other harts later on, see:

https://lore.kernel.org/linux-riscv/20220829205219.283543-1-geomatsi@gmail.com/

Regards,
Sergey

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

  parent reply	other threads:[~2022-09-12  7:26 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-04 13:37 [PATCH v2] riscv: make update_mmu_cache to support asid Jinyu Tang
2022-09-04 13:37 ` Jinyu Tang
2022-09-04 13:49 ` Conor.Dooley
2022-09-04 13:49   ` Conor.Dooley
2022-09-06 10:57   ` Jinyu Tang
2022-09-06 10:57     ` Jinyu Tang
2022-09-12  7:26 ` Sergey Matyukevich [this message]
2022-09-12  7:26   ` Sergey Matyukevich
2022-09-18  5:33   ` Jinyu Tang
2022-09-18  5:33     ` Jinyu Tang

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=Yx7fCL3rMgT4Uh96@curiosity \
    --to=geomatsi@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=alexandre.ghiti@canonical.com \
    --cc=anshuman.khandual@arm.com \
    --cc=anup@brainfault.org \
    --cc=aou@eecs.berkeley.edu \
    --cc=atishp@rivosinc.com \
    --cc=falcon@tinylab.org \
    --cc=guoren@kernel.org \
    --cc=heiko@sntech.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=palmer@dabbelt.com \
    --cc=panqinglin2020@iscas.ac.cn \
    --cc=paul.walmsley@sifive.com \
    --cc=sunnanyong@huawei.com \
    --cc=tjytimi@163.com \
    --cc=tongtiangen@huawei.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 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.