git: kernel - Refactor in-kernel system call API to remove bcopy()

Matthew Dillon dillon at crater.dragonflybsd.org
Sat Jul 25 12:31:48 PDT 2020


commit 80d831e1ad5c5886e45827bf13837cf84baba296
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date:   Fri Jul 24 21:25:07 2020 -0700

    kernel - Refactor in-kernel system call API to remove bcopy()
    
    * Change the in-kernel system call prototype to take the
      system call arguments as a separate pointer, and make the
      contents read-only.
    
      int     sy_call_t (void *);
      int     sy_call_t (struct sysmsg *sysmsg, const void *);
    
    * System calls with 6 arguments or less no longer need to copy
      the arguments from the trapframe to a holding structure.  Instead,
      we simply point into the trapframe.
    
      The L1 cache footprint will be a bit smaller, but in simple tests
      the results are not noticably faster... maybe 1ns or so
      (roughly 1%).

Summary of changes:
 sys/dev/raid/vinum/vinum.c                |    4 +-
 sys/emulation/ndis/subr_ndis.c            |    2 +-
 sys/kern/imgact_resident.c                |   10 +-
 sys/kern/imgact_shell.c                   |    2 +-
 sys/kern/init_main.c                      |    6 +-
 sys/kern/init_sysent.c                    |    4 +-
 sys/kern/kern_acct.c                      |    4 +-
 sys/kern/kern_acl.c                       |   26 +-
 sys/kern/kern_checkpoint.c                |    7 +-
 sys/kern/kern_descrip.c                   |   40 +-
 sys/kern/kern_environment.c               |    8 +-
 sys/kern/kern_event.c                     |   24 +-
 sys/kern/kern_exec.c                      |    6 +-
 sys/kern/kern_exit.c                      |   23 +-
 sys/kern/kern_fork.c                      |   30 +-
 sys/kern/kern_fp.c                        |    2 +-
 sys/kern/kern_jail.c                      |   10 +-
 sys/kern/kern_ktrace.c                    |    9 +-
 sys/kern/kern_linker.c                    |   34 +-
 sys/kern/kern_module.c                    |   28 +-
 sys/kern/kern_nrandom.c                   |    6 +-
 sys/kern/kern_ntptime.c                   |    8 +-
 sys/kern/kern_p1003_1b.c                  |   42 +-
 sys/kern/kern_prot.c                      |  112 ++-
 sys/kern/kern_resource.c                  |   84 +-
 sys/kern/kern_shutdown.c                  |    8 +-
 sys/kern/kern_sig.c                       |   26 +-
 sys/kern/kern_syscalls.c                  |    7 +-
 sys/kern/kern_sysctl.c                    |    4 +-
 sys/kern/kern_threads.c                   |   20 +-
 sys/kern/kern_time.c                      |   35 +-
 sys/kern/kern_umtx.c                      |   25 +-
 sys/kern/kern_usched.c                    |   10 +-
 sys/kern/kern_uuid.c                      |    4 +-
 sys/kern/kern_varsym.c                    |   23 +-
 sys/kern/kern_wdog.c                      |    2 +-
 sys/kern/makesyscalls.sh                  |   16 +-
 sys/kern/subr_prof.c                      |    4 +-
 sys/kern/sys_generic.c                    |   58 +-
 sys/kern/sys_mqueue.c                     |   30 +-
 sys/kern/sys_pipe.c                       |   10 +-
 sys/kern/sys_process.c                    |    6 +-
 sys/kern/sys_vmm.c                        |   10 +-
 sys/kern/syscalls.master                  |    4 +-
 sys/kern/sysv_msg.c                       |   18 +-
 sys/kern/sysv_sem.c                       |   14 +-
 sys/kern/sysv_shm.c                       |   32 +-
 sys/kern/uipc_syscalls.c                  |   62 +-
 sys/kern/vfs_aio.c                        |   18 +-
 sys/kern/vfs_cache.c                      |    4 +-
 sys/kern/vfs_quota.c                      |    4 +-
 sys/kern/vfs_syscalls.c                   |  218 ++--
 sys/net/accf_data/accf_data.c             |    2 +-
 sys/net/accf_http/accf_http.c             |    2 +-
 sys/platform/pc64/x86_64/machdep.c        |    4 +-
 sys/platform/pc64/x86_64/sysarch.c        |    4 +-
 sys/platform/pc64/x86_64/tls.c            |    8 +-
 sys/platform/pc64/x86_64/trap.c           |   48 +-
 sys/platform/vkernel64/platform/sysarch.c |    4 +-
 sys/platform/vkernel64/x86_64/cpu_regs.c  |    4 +-
 sys/platform/vkernel64/x86_64/tls.c       |    8 +-
 sys/platform/vkernel64/x86_64/trap.c      |   49 +-
 sys/sys/ktrace.h                          |    2 +-
 sys/sys/sysent.h                          |    3 +-
 sys/sys/sysmsg.h                          |   32 +-
 sys/sys/sysproto.h                        | 1546 ++++++-----------------------
 sys/sys/sysunion.h                        |    3 -
 sys/vfs/mfs/mfs_vfsops.c                  |    7 +-
 sys/vfs/nfs/nfs_subs.c                    |    2 +-
 sys/vfs/nfs/nfs_syscalls.c                |    4 +-
 sys/vm/vm_mmap.c                          |   30 +-
 sys/vm/vm_swap.c                          |    6 +-
 sys/vm/vm_unix.c                          |   12 +-
 sys/vm/vm_vmspace.c                       |   38 +-
 74 files changed, 1075 insertions(+), 1946 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/80d831e1ad5c5886e45827bf13837cf84baba296


-- 
DragonFly BSD source repository



More information about the Commits mailing list