Source-Changes archive

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

CVS commit: src/sys



Module Name:    src
Committed By:   ad
Date:           Sun May 24 21:41:26 UTC 2009

Modified Files:
        src/sys/compat/netbsd32: netbsd32_ioctl.c
        src/sys/compat/svr4: svr4_filio.c
        src/sys/compat/svr4_32: svr4_32_filio.c
        src/sys/ddb: db_xxx.c
        src/sys/kern: init_sysctl.c kern_descrip.c kern_event.c kern_sig.c
            subr_exec_fd.c sys_aio.c sys_descrip.c sys_generic.c sys_select.c
            uipc_usrreq.c
        src/sys/miscfs/fdesc: fdesc_vfsops.c fdesc_vnops.c
        src/sys/miscfs/portal: portal_vnops.c
        src/sys/miscfs/procfs: procfs_vnops.c
        src/sys/sys: filedesc.h

Log Message:
More changes to improve kern_descrip.c.

- Avoid atomics in more places.
- Remove the per-descriptor mutex, and just use filedesc_t::fd_lock.
  It was only being used to synchronize close, and in any case we needed
  to take fd_lock to free the descriptor slot.
- Optimize certain paths for the <NDFDFILE case.
- Sprinkle more comments and assertions.
- Cache more stuff in filedesc_t.
- Fix numerous minor bugs spotted along the way.
- Restructure how the open files array is maintained, for clarity and so
  that we can eliminate the membar_consumer() call in fd_getfile().  This is
  mostly syntactic sugar; the main functional change is that fd_nfiles now
  lives alongside the open file array.

Some measurements with libmicro:

- simple file syscalls are like close() are between 1 to 10% faster.
- some nice improvements, e.g. poll(1000) which is ~50% faster.


To generate a diff of this commit:
cvs rdiff -u -r1.41 -r1.42 src/sys/compat/netbsd32/netbsd32_ioctl.c
cvs rdiff -u -r1.22 -r1.23 src/sys/compat/svr4/svr4_filio.c
cvs rdiff -u -r1.16 -r1.17 src/sys/compat/svr4_32/svr4_32_filio.c
cvs rdiff -u -r1.60 -r1.61 src/sys/ddb/db_xxx.c
cvs rdiff -u -r1.163 -r1.164 src/sys/kern/init_sysctl.c
cvs rdiff -u -r1.191 -r1.192 src/sys/kern/kern_descrip.c
cvs rdiff -u -r1.64 -r1.65 src/sys/kern/kern_event.c
cvs rdiff -u -r1.297 -r1.298 src/sys/kern/kern_sig.c
cvs rdiff -u -r1.1 -r1.2 src/sys/kern/subr_exec_fd.c
cvs rdiff -u -r1.23 -r1.24 src/sys/kern/sys_aio.c
cvs rdiff -u -r1.12 -r1.13 src/sys/kern/sys_descrip.c
cvs rdiff -u -r1.122 -r1.123 src/sys/kern/sys_generic.c
cvs rdiff -u -r1.14 -r1.15 src/sys/kern/sys_select.c
cvs rdiff -u -r1.125 -r1.126 src/sys/kern/uipc_usrreq.c
cvs rdiff -u -r1.79 -r1.80 src/sys/miscfs/fdesc/fdesc_vfsops.c
cvs rdiff -u -r1.106 -r1.107 src/sys/miscfs/fdesc/fdesc_vnops.c
cvs rdiff -u -r1.82 -r1.83 src/sys/miscfs/portal/portal_vnops.c
cvs rdiff -u -r1.173 -r1.174 src/sys/miscfs/procfs/procfs_vnops.c
cvs rdiff -u -r1.54 -r1.55 src/sys/sys/filedesc.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



Home | Main Index | Thread Index | Old Index