tech-kern archive

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

vfs_lockf changes (was: CVS commit: src)



On Sun, Sep 10, 2023 at 02:45:53PM +0000, Andrew Doran wrote:
> Module Name:	src
> Committed By:	ad
> Date:		Sun Sep 10 14:45:53 UTC 2023
> 
> Modified Files:
> 	src/common/lib/libc/gen: radixtree.c
> 	src/sys/kern: init_main.c kern_descrip.c kern_lwp.c kern_mutex_obj.c
> 	    kern_resource.c kern_rwlock_obj.c kern_turnstile.c subr_kcpuset.c
> 	    vfs_cwd.c vfs_init.c vfs_lockf.c
> 	src/sys/rump/librump/rumpkern: rump.c
> 	src/sys/rump/librump/rumpvfs: rump_vfs.c
> 	src/sys/sys: namei.src
> 	src/sys/uvm: uvm_init.c uvm_map.c uvm_readahead.c
> 
> Log Message:
> - Do away with separate pool_cache for some kernel objects that have no special
>   requirements and use the general purpose allocator instead.  On one of my
>   test systems this makes for a small (~1%) but repeatable reduction in system
>   time during builds presumably because it decreases the kernel's cache /
>   memory bandwidth footprint a little.
> - vfs_lockf: cache a pointer to the uidinfo and put mutex in the data segment.

Hi Andrew, 

most (all?) vfs_lockf tests are now crashing, e.g.

https://netbsd.org/~martin/evbearmv7hf-atf/469_atf.html#failed-tcs-summary


Core was generated by `t_vnops'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  rumpuser_mutex_spin_p (mtx=0x0) at /work/src/lib/librumpuser/rumpuser_pth.c:166
[Current thread is 1 (process 18892)]
#0  rumpuser_mutex_spin_p (mtx=0x0) at /work/src/lib/librumpuser/rumpuser_pth.c:166
#1  0x71c672dc in mutex_enter (mtx=0x71d78fc0 <lockf_lock>) at /work/src/lib/librump/../../sys/rump/librump/rumpkern/locks.c:164
#2  0x71d3dd58 in lf_advlock (ap=0x7ff897b8, head=0x6cdc7140, size=<optimized out>) at /work/src/lib/librumpvfs/../../sys/rump/../kern/vfs_lockf.c:896
#3  0x71d51bec in VOP_ADVLOCK (vp=0x6cde0600, id=<optimized out>, op=<optimized out>, fl=<optimized out>, flags=64) at /work/src/lib/librumpvfs/../../sys/rump/../kern/vnode_if.c:1867
#4  0x71be5f64 in do_fcntl_lock (fd=fd@entry=0, cmd=cmd@entry=8, fl=fl@entry=0x7ff89818) at /work/src/lib/librump/../../sys/rump/../kern/sys_descrip.c:285
#5  0x71be6154 in sys_fcntl (l=<optimized out>, uap=0x7ff898fc, retval=<optimized out>) at /work/src/lib/librump/../../sys/rump/../kern/sys_descrip.c:365
#6  0x71c70d9c in sy_call (rval=0x7ff898f4, uap=0x7ff898fc, l=0x6ce09c80, sy=0x71cbf6f0 <rumpns_sysent+1840>) at /work/src/lib/librump/../../sys/rump/../sys/syscallvar.h:65
#7  sy_invoke (code=0, rval=0x7ff898f4, uap=0x7ff898fc, l=0x6ce09c80, sy=0x71cbf6f0 <rumpns_sysent+1840>) at /work/src/lib/librump/../../sys/rump/../sys/syscallvar.h:94
#8  rump_syscall (num=0, num@entry=92, data=0x7ff898fc, data@entry=0x7ff898f4, dlen=dlen@entry=12, retval=0x7ff898f4, retval@entry=0x7ff898ec) at /work/src/lib/librump/../../sys/rump/librump/rumpkern/rump.c:782
#9  0x71c63e8c in rump___sysimpl_fcntl (fd=fd@entry=0, cmd=cmd@entry=8, arg=arg@entry=0x7ff899e8) at /work/src/lib/librump/../../sys/rump/librump/rumpkern/rump_syscalls.c:1322
#10 0x007f8120 in fcntl_getlock_pids (tc=0x855234 <atfu_ext2fs_fcntl_getlock_pids_tc>, mp=0x8329c0 "/mnt") at /work/src/tests/fs/vfs/t_vnops.c:941
#11 0x00811134 in atfu_ext2fs_fcntl_getlock_pids_body (tc=0x855234 <atfu_ext2fs_fcntl_getlock_pids_tc>) at /work/src/tests/fs/vfs/t_vnops.c:1085
#12 0x71ae8658 in atf_tc_run (tc=0x855234 <atfu_ext2fs_fcntl_getlock_pids_tc>, resfile=<optimized out>) at /work/src/external/bsd/atf/dist/atf-c/tc.c:1024
#13 0x71ae4f84 in run_tc (exitcode=<synthetic pointer>, p=0x7ff8a840, tp=0x7ff8a83c) at /work/src/external/bsd/atf/dist/atf-c/detail/tp_main.c:510
#14 controlled_main (exitcode=<synthetic pointer>, add_tcs_hook=0x7ff8a86c, argv=<optimized out>, argc=<optimized out>) at /work/src/external/bsd/atf/dist/atf-c/detail/tp_main.c:580
#15 atf_tp_main (argc=<optimized out>, argv=<optimized out>, add_tcs_hook=0x7ff8a86c) at /work/src/external/bsd/atf/dist/atf-c/detail/tp_main.c:610
#16 0x007e6aa4 in ___start ()

Martin


Home | Main Index | Thread Index | Old Index