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

At 2022-09-12 15:26:00, "Sergey Matyukevich" <geomatsi@gmail.com> wrote:
>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
Maybe local flush is enough for this function,because others may not use the pte forever.
And if another hart use this pte later, it may trap in pagefault to survive.

Yours,

Jinyu


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

At 2022-09-12 15:26:00, "Sergey Matyukevich" <geomatsi@gmail.com> wrote:
>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
Maybe local flush is enough for this function,because others may not use the pte forever.
And if another hart use this pte later, it may trap in pagefault to survive.

Yours,

Jinyu


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

  reply	other threads:[~2022-09-18  5:35 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
2022-09-12  7:26   ` Sergey Matyukevich
2022-09-18  5:33   ` Jinyu Tang [this message]
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=20220918053332.22189-1-tjytimi@163.com \
    --to=tjytimi@163.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=geomatsi@gmail.com \
    --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=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.