tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: RFC: New userspace fetch/store API
On Sat, 23 Feb 2019, Jason Thorpe wrote:
> int ufetch_8(const uint8_t *uaddr, uint8_t *valp);
> int ufetch_16(const uint16_t *uaddr, uint16_t *valp);
> int ufetch_32(const uint32_t *uaddr, uint32_t *valp);
> #ifdef _LP64
> int ufetch_64(const uint64_t *uaddr, uint64_t *valp);
> #endif
etc.
I'd prefer to return the fetched value and have an out of band error
check.
With this API the routine does a userland load, then a store into kernel
memory. Then the kernel needs to reload that value. On modern CPUs
memory accesses tend to be sloooooow.
Eduardo
Home |
Main Index |
Thread Index |
Old Index