diff options
author | ed <ed@FreeBSD.org> | 2008-08-20 08:31:58 +0000 |
---|---|---|
committer | ed <ed@FreeBSD.org> | 2008-08-20 08:31:58 +0000 |
commit | cc3116a9380fe32a751b584f3d8083698ccfba15 (patch) | |
tree | bd0c08a66997254385160ce71ea32029b99f99f9 /sys/modules | |
parent | b49301b5cd9ff43a7af0bd9054d9d1a328c0d212 (diff) | |
download | FreeBSD-src-cc3116a9380fe32a751b584f3d8083698ccfba15.zip FreeBSD-src-cc3116a9380fe32a751b584f3d8083698ccfba15.tar.gz |
Integrate the new MPSAFE TTY layer to the FreeBSD operating system.
The last half year I've been working on a replacement TTY layer for the
FreeBSD kernel. The new TTY layer was designed to improve the following:
- Improved driver model:
The old TTY layer has a driver model that is not abstract enough to
make it friendly to use. A good example is the output path, where the
device drivers directly access the output buffers. This means that an
in-kernel PPP implementation must always convert network buffers into
TTY buffers.
If a PPP implementation would be built on top of the new TTY layer
(still needs a hooks layer, though), it would allow the PPP
implementation to directly hand the data to the TTY driver.
- Improved hotplugging:
With the old TTY layer, it isn't entirely safe to destroy TTY's from
the system. This implementation has a two-step destructing design,
where the driver first abandons the TTY. After all threads have left
the TTY, the TTY layer calls a routine in the driver, which can be
used to free resources (unit numbers, etc).
The pts(4) driver also implements this feature, which means
posix_openpt() will now return PTY's that are created on the fly.
- Improved performance:
One of the major improvements is the per-TTY mutex, which is expected
to improve scalability when compared to the old Giant locking.
Another change is the unbuffered copying to userspace, which is both
used on TTY device nodes and PTY masters.
Upgrading should be quite straightforward. Unlike previous versions,
existing kernel configuration files do not need to be changed, except
when they reference device drivers that are listed in UPDATING.
Obtained from: //depot/projects/mpsafetty/...
Approved by: philip (ex-mentor)
Discussed: on the lists, at BSDCan, at the DevSummit
Sponsored by: Snow B.V., the Netherlands
dcons(4) fixed by: kan
Diffstat (limited to 'sys/modules')
-rw-r--r-- | sys/modules/nmdm/Makefile | 9 | ||||
-rw-r--r-- | sys/modules/rc/Makefile | 7 |
2 files changed, 1 insertions, 15 deletions
diff --git a/sys/modules/nmdm/Makefile b/sys/modules/nmdm/Makefile index b788334..25e9470 100644 --- a/sys/modules/nmdm/Makefile +++ b/sys/modules/nmdm/Makefile @@ -4,14 +4,5 @@ KMOD= nmdm SRCS= nmdm.c -SRCS+= opt_compat.h opt_tty.h vnode_if.h - -.if !defined(KERNBUILDDIR) -opt_compat.h: - echo "#define COMPAT_43 1" >opt_compat.h - -opt_tty.h: - echo "#define TTYHOG 8192" >opt_tty.h -.endif .include <bsd.kmod.mk> diff --git a/sys/modules/rc/Makefile b/sys/modules/rc/Makefile index cc8d228..ffa6163 100644 --- a/sys/modules/rc/Makefile +++ b/sys/modules/rc/Makefile @@ -3,11 +3,6 @@ .PATH: ${.CURDIR}/../../dev/rc KMOD= rc -SRCS= rc.c device_if.h bus_if.h isa_if.h opt_tty.h - -.if !defined(KERNBUILDDIR) -opt_tty.h: - echo "#define TTYHOG 8192" >opt_tty.h -.endif +SRCS= rc.c device_if.h bus_if.h isa_if.h .include <bsd.kmod.mk> |