Download raw body.
Use foffset() to push the KERNEL_LOCK()
On 12/11/25(Wed) 22:05, Vitaliy Makkoveev wrote: > [...] > I like the idea to push kernel lock deeper and keep it around > VOP_READ()/VOP_WRITE(). We don't need to move vn_lock()/VOP_LOCK(), so > the race for `f_offset' will be excluded. > > I can make this diff by myself if mpi@ has no interest in this > direction. Sure, I don't mind. Note that there are currently two independent bottlenecks when it comes to FS syscalls. One is related to VOP_READ() and VOP_WRITE() and I have a plan to address it. The other is related to namei(9) (doopenat(), dofstatat(), and sys___realpath()) and will certainly reduce the KERNREL_LOCK() contention with fewer efforts. So if you're interested in reducing the KERNEL_LOCK() contention in this area, may I suggest you look at vn_open() and all others parts of the kernel namei(9) is not yet surrounded by a KERNEL_LOCK() dance? Then we can start pushing it further into namei(9). Thanks, Martin
Use foffset() to push the KERNEL_LOCK()