From: Andrew Jones <ajones@ventanamicro.com>
To: Anup Patel <anup@brainfault.org>
Cc: guoren@kernel.org, paul.walmsley@sifive.com, palmer@dabbelt.com,
bjorn@rivosinc.com, conor@kernel.org, leobras@redhat.com,
peterz@infradead.org, parri.andrea@gmail.com, will@kernel.org,
longman@redhat.com, boqun.feng@gmail.com, arnd@arndb.de,
alexghiti@rivosinc.com, rkrcmar@ventanamicro.com,
linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org,
Guo Ren <guoren@linux.alibaba.com>
Subject: Re: [PATCH 0/3] riscv: Add PARAVIRT_SPINLOCKS support
Date: Mon, 23 Dec 2024 18:07:26 +0100 [thread overview]
Message-ID: <20241223-165e7b7ee58e2dede8bfd830@orel> (raw)
In-Reply-To: <CAAhSdy1EXTmuCvMp4HK0Ozg42Zw2XzCjaS7kGi-aXQ__r=taPw@mail.gmail.com>
On Mon, Dec 23, 2024 at 01:44:50PM +0530, Anup Patel wrote:
> On Sun, Dec 22, 2024 at 9:09 AM <guoren@kernel.org> wrote:
> >
> > From: Guo Ren <guoren@linux.alibaba.com>
> >
> > Paravirtualized spinlocks allow a unfair qspinlock to replace the
> > ticket-lock or native fair qspinlock implementation with something
> > virtualization-friendly, for example, halt the virtual CPU rather
> > than spinning.
> >
> > You could observe the paravirt qspinlock internal work situation with
> > /sys/kernel/debug/tracing/trace:
> >
> > ls /sys/kernel/debug/tracing/events/paravirt/
> > enable filter pv_kick pv_wait
> >
> > echo 1 > /sys/kernel/debug/tracing/events/paravirt/enable
> > cat /sys/kernel/debug/tracing/trace
> > entries-in-buffer/entries-written: 33927/33927 #P:12
> >
> > _-----=> irqs-off/BH-disabled
> > / _----=> need-resched
> > | / _---=> hardirq/softirq
> > || / _--=> preempt-depth
> > ||| / _-=> migrate-disable
> > |||| / delay
> > TASK-PID CPU# ||||| TIMESTAMP FUNCTION
> > | | | ||||| | |
> > sh-100 [001] d..2. 28.312294: pv_wait: cpu 1 out of wfi
> > <idle>-0 [000] d.h4. 28.322030: pv_kick: cpu 0 kick target cpu 1
> > sh-100 [001] d..2. 30.982631: pv_wait: cpu 1 out of wfi
> > <idle>-0 [000] d.h4. 30.993289: pv_kick: cpu 0 kick target cpu 1
> > sh-100 [002] d..2. 44.987573: pv_wait: cpu 2 out of wfi
> > <idle>-0 [000] d.h4. 44.989000: pv_kick: cpu 0 kick target cpu 2
> > <idle>-0 [003] d.s3. 51.593978: pv_kick: cpu 3 kick target cpu 4
> > rcu_sched-15 [004] d..2. 51.595192: pv_wait: cpu 4 out of wfi
> > lock_torture_wr-115 [004] ...2. 52.656482: pv_kick: cpu 4 kick target cpu 2
> > lock_torture_wr-113 [002] d..2. 52.659146: pv_wait: cpu 2 out of wfi
> > lock_torture_wr-114 [008] d..2. 52.659507: pv_wait: cpu 8 out of wfi
> > lock_torture_wr-114 [008] d..2. 52.663503: pv_wait: cpu 8 out of wfi
> > lock_torture_wr-113 [002] ...2. 52.666128: pv_kick: cpu 2 kick target cpu 8
> > lock_torture_wr-114 [008] d..2. 52.667261: pv_wait: cpu 8 out of wfi
> > lock_torture_wr-114 [009] .n.2. 53.141515: pv_kick: cpu 9 kick target cpu 11
> > lock_torture_wr-113 [002] d..2. 53.143339: pv_wait: cpu 2 out of wfi
> > lock_torture_wr-116 [007] d..2. 53.143412: pv_wait: cpu 7 out of wfi
> > lock_torture_wr-118 [000] d..2. 53.143457: pv_wait: cpu 0 out of wfi
> > lock_torture_wr-115 [008] d..2. 53.143481: pv_wait: cpu 8 out of wfi
> > lock_torture_wr-117 [011] d..2. 53.143522: pv_wait: cpu 11 out of wfi
> > lock_torture_wr-117 [011] ...2. 53.143987: pv_kick: cpu 11 kick target cpu 8
> > lock_torture_wr-115 [008] ...2. 53.144269: pv_kick: cpu 8 kick target cpu 7
> >
> > This series is split from [1].
> >
> > [1]: https://lore.kernel.org/linux-riscv/20231225125847.2778638-1-guoren@kernel.org/
> >
> > Guo Ren (3):
> > RISC-V: paravirt: Add pvqspinlock KVM backend
> > RISC-V: paravirt: Add pvqspinlock frontend
> > RISC-V: paravirt: pvqspinlock: Add trace point for pv_kick/wait
>
> This should be an RFC series until the corresponding SBI extension
> is frozen. AFAIK, no one has posted any SBI extension in this context
> on any of the RVI mailing lists.
>
> Please work with the PRS TG and Hypervisors SIG for the proposed
> SBI extension.
>
I promised Guo I'd help out by writing a draft for the SBI extension. I'll
try to get something posted this week.
Thanks,
drew
next prev parent reply other threads:[~2024-12-23 17:07 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-22 3:39 [PATCH 0/3] riscv: Add PARAVIRT_SPINLOCKS support guoren
2024-12-22 3:39 ` [PATCH 1/3] RISC-V: paravirt: Add pvqspinlock KVM backend guoren
2024-12-22 3:39 ` [PATCH 2/3] RISC-V: paravirt: Add pvqspinlock frontend guoren
2024-12-22 3:39 ` [PATCH 3/3] RISC-V: paravirt: pvqspinlock: Add trace point for pv_kick/wait guoren
2024-12-23 8:14 ` [PATCH 0/3] riscv: Add PARAVIRT_SPINLOCKS support Anup Patel
2024-12-23 17:07 ` Andrew Jones [this message]
2024-12-24 5:40 ` Guo Ren
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=20241223-165e7b7ee58e2dede8bfd830@orel \
--to=ajones@ventanamicro.com \
--cc=alexghiti@rivosinc.com \
--cc=anup@brainfault.org \
--cc=arnd@arndb.de \
--cc=bjorn@rivosinc.com \
--cc=boqun.feng@gmail.com \
--cc=conor@kernel.org \
--cc=guoren@kernel.org \
--cc=guoren@linux.alibaba.com \
--cc=leobras@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=longman@redhat.com \
--cc=palmer@dabbelt.com \
--cc=parri.andrea@gmail.com \
--cc=paul.walmsley@sifive.com \
--cc=peterz@infradead.org \
--cc=rkrcmar@ventanamicro.com \
--cc=will@kernel.org \
/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