[libbsd 00/22] Remove FreeBSD file descriptors and avoid VFS
Sebastian Huber
sebastian.huber at embedded-brains.de
Fri Jun 24 06:33:28 UTC 2022
This patch set removes the FreeBSD file descriptors. The VFS is no longer used
if only the USB, SD/MMC, network, PCI, and NVMe support is used by the
application. This change significantly reduce the memory usage of LibBSD for
these applications. Using the media01 test case for the arm/lpc32xx BSP as a
benchmark, the heap usage dropped from 14.3MiB to 10.2MiB. The "_BSD
bufdaemon", "_BSD vnlru", "_BSD syncer", and "_BSD bufspacedaemon-" tasks are
no longer present in media01. The code size is reduced by about 8KiB. The
data size is reduced by about 30KiB. The throughput with a simple FTP test
increased by about 1%.
The "Remove FreeBSD file descriptors" change removes more lines than there are
added.
This change makes it easier to port the NFS support to the master branch since
now the changes are more localized.
Sebastian Huber (22):
Fix default NET_CFG_NFS_MOUNT_PATH
Fix redefinition warnings
Update kernel namespace
Move setfib() back to route.c
Remove duplicate sysctl(), etc. definitions
nfsclient: Include header for rtems_version()
nfsclient: Fix extra token after #else warning
devfs: Do not use FreeBSD file descriptors
Remove FreeBSD file descriptors
Update CONTRIBUTING.rst
Add struct file wrapper
Move kqueue() and kevent(), avoid VFS
cryptodev: Do not use VFS
Move select(), pselect(), and poll(), avoid VFS
Use define for maxfiles and maxfilesperproc
Move socket system calls, avoid VFS
Move bio_transient_maxcnt
Move unmapped_buf_allowed
Move VFS BIO initialization
Remove unused rtems_bsd_sysgen_imfsnodeops
Make rtems_bsd_iop_to_file() static
Disable UNIX Domain Sockets credentials
CONTRIBUTING.rst | 79 ++
freebsd/sys/fs/devfs/devfs_int.h | 3 +-
freebsd/sys/fs/devfs/devfs_vnops.c | 4 +-
freebsd/sys/fs/nfsclient/nfs_clrpcops.c | 5 +-
freebsd/sys/kern/kern_descrip.c | 58 +-
freebsd/sys/kern/kern_event.c | 288 ++++--
freebsd/sys/kern/kern_sysctl.c | 4 +
freebsd/sys/kern/sys_generic.c | 247 ++++-
freebsd/sys/kern/sys_socket.c | 271 +++++-
freebsd/sys/kern/uipc_socket.c | 3 +
freebsd/sys/kern/uipc_syscalls.c | 532 ++++++++++-
freebsd/sys/kern/uipc_usrreq.c | 24 +-
freebsd/sys/kern/vfs_bio.c | 30 +-
freebsd/sys/kern/vfs_cache.c | 2 +
freebsd/sys/kern/vfs_lookup.c | 4 +
freebsd/sys/kern/vfs_mount.c | 2 +
freebsd/sys/kern/vfs_subr.c | 4 +
freebsd/sys/kern/vfs_syscalls.c | 18 +
freebsd/sys/net/route.c | 18 +
freebsd/sys/netinet/in_pcb.h | 4 +
freebsd/sys/opencrypto/cryptodev.c | 81 +-
freebsd/sys/sys/eventvar.h | 2 +
freebsd/sys/sys/file.h | 103 +-
freebsd/sys/sys/filedesc.h | 89 +-
freebsd/sys/sys/namei.h | 2 +
freebsd/sys/sys/proc.h | 2 +-
freebsd/sys/sys/socketvar.h | 5 +-
freebsd/sys/sys/syscallsubr.h | 5 +
freebsd/sys/sys/sysctl.h | 8 +
freebsd/sys/sys/sysproto.h | 20 +-
freebsd/sys/sys/unpcb.h | 2 +-
libbsd.py | 1 +
.../machine/rtems-bsd-kernel-namespace.h | 418 +++++++-
.../include/machine/rtems-bsd-kernel-space.h | 5 -
rtemsbsd/include/machine/rtems-bsd-libio.h | 207 +---
rtemsbsd/include/rtems/bsd/sys/file.h | 248 +++++
rtemsbsd/rtems/rtems-bsd-libio.c | 61 --
rtemsbsd/rtems/rtems-bsd-syscall-api.c | 898 ++----------------
rtemsbsd/rtems/rtems-kernel-fget.c | 79 ++
rtemsbsd/rtems/rtems-kernel-get-file.c | 9 +-
rtemsbsd/rtems/rtems-kernel-init.c | 32 +-
rtemsbsd/sys/fs/devfs/devfs_devs.c | 181 +---
testsuite/syscalls01/test_main.c | 13 +-
waf_libbsd.py | 2 +-
44 files changed, 2544 insertions(+), 1529 deletions(-)
create mode 100644 rtemsbsd/include/rtems/bsd/sys/file.h
create mode 100644 rtemsbsd/rtems/rtems-kernel-fget.c
--
2.35.3
More information about the devel
mailing list