tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Straw proposal: MI kthread vector/fp unit API



On Sat, 20 Jun 2020, Taylor R Campbell wrote:

> Here's a straw proposal for an MI API to allow a kthread to use any
> vector or floating-point unit on the CPU -- call it the `FPU' for
> brevity.

Description elided.

> Thoughts?

I think this is sort of a half-measure since it restricts coprocessor 
usage to a few threads.  If you want to say, implement the kenrel memcopy 
using vector registers (the way sparc64 does) this doesn't help and may 
end up getting in the way.

I'd do something simpler such as adding a MI routine to allocate or 
activate a temporary or permanent register save area that can be used by 
kernel threads.  

Then, if you want, in the coprocessor trap handler, if you want, if you 
are in kernel state you can check whether a kernel save area has been 
allocated and panic if not.

Eduardo


Home | Main Index | Thread Index | Old Index