[PATCH v4 0/4] Miscellaneous about sbi_tlb and sbi_ipi
Xiang W
wxjstz at 126.com
Mon Apr 10 21:40:14 PDT 2023
在 2023-04-06星期四的 12:30 +0530,Anup Patel写道:
> On Thu, Apr 6, 2023 at 10:27 AM Anup Patel <anup at brainfault.org> wrote:
> >
> > On Thu, Mar 16, 2023 at 1:52 PM Xiang W <wxjstz at 126.com> wrote:
> > >
> > > 在 2023-02-02星期四的 16:51 +0800,Xiang W写道:
> > > > Removed the mutual waiting between process and sync in sbi_tlb
> > > > Update ipi first then wait together
> > > >
> > > Please review!
> > > Optimization can improve tlb sync efficiency.
> > >
> > > sequence diagram before optimization:
> > > ===================================================================
> > > send ipi hart hart 0 hart 1 hart 2 ...
> > > + + + +
> > > | | | |
> > > | update hart 0 | | |
> > > +<------------->+--+ | |
> > > | | |process | |
> > > | | | | |
> > > | +<-+ | |
> > > | sync | | |
> > > +<------------->+ | |
> > > | update hart 1 | |
> > > +<------------------------->+--+ |
> > > | | |process |
> > > | | | |
> > > | +<-+ |
> > > | sync | |
> > > +<------------------------->+ |
> > > | update hart 2 |
> > > +<------------------------------------->+--+
> > > | | |process
> > > | | |
> > > | +<-+
> > > | sync |
> > > +<------------------------------------->+
> > > .
> > > .
> > > .
> > >
> > > sequence diagram after optimization:
> > > ===================================================================
> > > send ipi hart hart 0 hart 1 hart 2 ...
> > > + + + +
> > > | | | |
> > > | update hart 0 | | |
> > > +<------------->+--+ | |
> > > | update hart 1 | |process | |
> > > +<--------------|--|------->+--+ |
> > > | update hart 2 +<-+ | |process |
> > > +<--------------|-----------|--|------->+--+
> > > | | +<-+ | |process
> > > | | | | |
> > > | sync | | +<-+
> > > +<------------->+ | |
> > > | sync | |
> > > +<------------------------->+ |
> > > | sync |
> > > +<------------------------------------->+
> > > .
> > > .
> > > .
> >
> > Sorry for being slow on this series. Overall, the approach looks
> > good but I need to review individual patches.
> >
> > In the meantime, I suggest you try running stress-ng one
> > QEMU virt machine with this patch applied in OpenSBI.
>
> To run stress-ng on QEMU virt machine, launch QEMU virt
> machine with at least 1G RAM and Fedora RootFS located
> at:
> https://dl.fedoraproject.org/pub/alt/risc-v/repo/virt-builder-images/images/
> https://dl.fedoraproject.org/pub/alt/risc-v/repo/virt-builder-images/images/Fedora-Developer-37-20221130.n.0-nvme.raw.img.xz
>
> I typically run a cyclic stress-ng test as follows:
> stress-ng --verbose --seq 4 -t 20 -x cyclic
The following is the log of my test:
without patches: https://drive.google.com/file/d/1I1pfA39tJvcZqFI55FSPxD-6o7mBaD1x/view?usp=share_link
with patches: https://drive.google.com/file/d/1FRRa6HJilS87dTgFYdA4XJRHhPIOBZms/view?usp=share_link
Regards,
Xiang W
>
> Regards,
> Anup
>
> >
> > Regards,
> > Anup
> >
> > >
> > > Regards,
> > > Xiang W
> > >
> > > > V4 Changes:
> > > > PATCH1: Fixed not adding one to tlb_sync when SBI_FIFO_UNCHANGED
> > > > PATCH4: Add comments
> > > >
> > > > V3 Changes:
> > > > PATCH2: Remove missing sync in update
> > > > add PATCH4: Optimize sbi_tlb queue waiting
> > > >
> > > > V2 Changes:
> > > > PATCH2: Fix m changes after update IPIs
> > > >
> > > > Xiang W (4):
> > > > lib: sbi: Optimize sbi_tlb
> > > > lib: sbi: Optimize sbi_ipi
> > > > lib: sbi: rename function of sbi_ipi
> > > > lib: sbi: Optimize sbi_tlb queue waiting
> > > >
> > > > include/sbi/sbi_ipi.h | 3 +++
> > > > lib/sbi/sbi_ipi.c | 43 ++++++++++++++++++++++++++++++-------
> > > > lib/sbi/sbi_tlb.c | 49 +++++++++++++++++++------------------------
> > > > 3 files changed, 61 insertions(+), 34 deletions(-)
> > > >
> > >
> > >
> > > --
> > > opensbi mailing list
> > > opensbi at lists.infradead.org
> > > http://lists.infradead.org/mailman/listinfo/opensbi
More information about the opensbi
mailing list