[v9, 00/10] riscv: support kernel-mode Vector

Eric Biggers ebiggers at kernel.org
Sun Jan 7 19:52:09 PST 2024


On Mon, Jan 08, 2024 at 11:16:27AM +0800, Andy Chiu wrote:
> On Sat, Jan 6, 2024 at 2:59 AM Eric Biggers <ebiggers at kernel.org> wrote:
> >
> > Hi Palmer,
> >
> > On Fri, Dec 29, 2023 at 02:36:17PM +0000, Andy Chiu wrote:
> > > This series provides support running Vector in kernel mode.
> >
> > Is there any chance that you can take patches 1 and 2 of this series via the
> > RISC-V tree for v6.8?  The vector crypto patchset depends on those two patches.
> 
> Patch 4 is very essential for non-preemptible kernel-mode Vector,
> unless we want to bear restoring overhead at each kernel_vector_end().
> It's ~200 cycles on a VLEN=128 hardware. It happens as long as Vector
> is also used in user-mode, which will be very common. Please consider
> including up to patch 4 if we must split.
> 

It's definitely an important optimization, but I wouldn't call it "very
essential".  x86 didn't implement lazy restores until kernel v5.2.

My hope is that we can just get enough merged soon to unblock the vector crypto
patchset, which just needs kernel_vector_{begin,end} with softirq support.  The
remaining core vector work can happen in parallel.

- Eric



More information about the linux-riscv mailing list