freebsd-src/sys/fs/devfs
Poul-Henning Kamp 56dd3a6182 Add optional device vnode bypass to DEVFS.
The tunable vfs.devfs.fops controls this feature and defaults to off.

When enabled (vfs.devfs.fops=1 in loader), device vnodes opened
through a filedescriptor gets a special fops vector which instead
of the detour through the vnode layer goes directly to DEVFS.

Amongst other things this allows us to run Giant free read/write to
device drivers which have been weaned off D_NEEDGIANT.

Currently this means /dev/null, /dev/zero, disks, (and maybe the
random stuff ?)

On a 700MHz K7 machine this doubles the speed of
	dd if=/dev/zero of=/dev/null bs=1 count=1000000

This roughly translates to shaving 2usec of each read/write syscall.

The poll/kqfilter paths need more work before they are giant free,
this work is ongoing in p4::phk_bufwork

Please test this and report any problems, LORs etc.
2004-11-08 10:46:47 +00:00
..
devfs.h Do the dreaded s/dev_t/struct cdev */ 2004-06-16 09:47:26 +00:00
devfs_devs.c Reduce a fair bit of the atomics because we are now called with a 2004-06-18 08:08:47 +00:00
devfs_rule.c XXX mark two places where we do not hold a threadcount on the dev when 2004-09-24 08:32:36 +00:00
devfs_vfsops.c What can I say: don't allow people to mount DEVFS with option "nodev". 2004-10-28 06:03:25 +00:00
devfs_vnops.c Add optional device vnode bypass to DEVFS. 2004-11-08 10:46:47 +00:00