freebsd-dev/sys/conf
Luigi Rizzo e4fc250c15 Device Polling code for -current.
Non-SMP, i386-only, no polling in the idle loop at the moment.

To use this code you must compile a kernel with

        options DEVICE_POLLING

and at runtime enable polling with

        sysctl kern.polling.enable=1

The percentage of CPU reserved to userland can be set with

        sysctl kern.polling.user_frac=NN (default is 50)

while the remainder is used by polling device drivers and netisr's.
These are the only two variables that you should need to touch. There
are a few more parameters in kern.polling but the default values
are adequate for all purposes. See the code in kern_poll.c for
more details on them.

Polling in the idle loop will be implemented shortly by introducing
a kernel thread which does the job. Until then, the amount of CPU
dedicated to polling will never exceed (100-user_frac).
The equivalent (actually, better) code for -stable is at

	http://info.iet.unipi.it/~luigi/polling/

and also supports polling in the idle loop.

NOTE to Alpha developers:
There is really nothing in this code that is i386-specific.
If you move the 2 lines supporting the new option from
sys/conf/{files,options}.i386 to sys/conf/{files,options} I am
pretty sure that this should work on the Alpha as well, just that
I do not have a suitable test box to try it. If someone feels like
trying it, I would appreciate it.

NOTE to other developers:
sure some things could be done better, and as always I am open to
constructive criticism, which a few of you have already given and
I greatly appreciated.
However, before proposing radical architectural changes, please
take some time to possibly try out this code, or at the very least
read the comments in kern_poll.c, especially re. the reason why I
am using a soft netisr and cannot (I believe) replace it with a
simple timeout.

Quick description of files touched by this commit:

sys/conf/files.i386
        new file kern/kern_poll.c
sys/conf/options.i386
        new option
sys/i386/i386/trap.c
        poll in trap (disabled by default)
sys/kern/kern_clock.c
        initialization and hardclock hooks.
sys/kern/kern_intr.c
        minor swi_net changes
sys/kern/kern_poll.c
        the bulk of the code.
sys/net/if.h
        new flag
sys/net/if_var.h
        declaration for functions used in device drivers.
sys/net/netisr.h
        NETISR_POLL
sys/dev/fxp/if_fxp.c
sys/dev/fxp/if_fxpvar.h
sys/pci/if_dc.c
sys/pci/if_dcreg.h
sys/pci/if_sis.c
sys/pci/if_sisreg.h
        device driver modifications
2001-12-14 17:56:12 +00:00
..
defines
files Back out my "joy" change. It was really the for some uncommitted ata 2001-12-07 01:52:40 +00:00
files.alpha GC userconfig after Peter axed it 15 months ago. 2001-11-05 21:46:35 +00:00
files.i386 Device Polling code for -current. 2001-12-14 17:56:12 +00:00
files.ia64 OLDCARD isn't supported on alpha or ia64, so don't pretend that it is by 2001-10-30 14:53:36 +00:00
files.pc98 Split the sio driver for pc98 into bus front end and back end. 2001-11-26 12:29:53 +00:00
files.powerpc Move procfs_* from procfs_machdep.c into sys_process.c, and rename them to 2001-10-21 23:57:24 +00:00
files.sparc64 Add entries for the recently committed code. 2001-11-09 20:44:44 +00:00
kern.mk This will have to be revised, but allow putting 'makeoptions GCC3=true' 2001-09-10 06:23:33 +00:00
kern.post.mk Move all: target to kern.pre.mk so it matters less where you include 2001-11-11 06:16:53 +00:00
kern.pre.mk Compile all kernels with "-ffreestanding": 2001-12-06 17:53:32 +00:00
kmod.mk Support the "install.debug" and "reinstall.debug" targets for kernel modules. 2001-10-27 00:52:50 +00:00
ldscript.alpha Use the kernbase symbol exported from locore.o instead of hardcoded magic 2001-09-20 09:19:38 +00:00
ldscript.amd64 Remove hard coded magic load address. Now to change the load address, 2001-09-18 01:12:43 +00:00
ldscript.i386 Remove hard coded magic load address. Now to change the load address, 2001-09-18 01:12:43 +00:00
ldscript.ia64 Put symbols at the start and end of the unwind section so that we can 2001-10-29 11:40:14 +00:00
ldscript.powerpc Page align the data segment. 2001-10-08 10:43:34 +00:00
ldscript.sparc64 Add kernbase symbol and use it instead of magic numbers in the 2001-09-21 05:43:38 +00:00
majors Add 'ciss'. 2001-10-26 21:17:26 +00:00
Makefile.alpha Proper fix for old config setting maxusers to 8. 2001-12-14 09:39:29 +00:00
Makefile.i386 Proper fix for old config setting maxusers to 8. 2001-12-14 09:39:29 +00:00
Makefile.ia64 Proper fix for old config setting maxusers to 8. 2001-12-14 09:39:29 +00:00
Makefile.pc98 Proper fix for old config setting maxusers to 8. 2001-12-14 09:39:29 +00:00
Makefile.powerpc Proper fix for old config setting maxusers to 8. 2001-12-14 09:39:29 +00:00
Makefile.sparc64 Proper fix for old config setting maxusers to 8. 2001-12-14 09:39:29 +00:00
newvers.sh setlocale(3) has been fixed to match POSIX standard: 2001-03-02 16:52:14 +00:00
NOTES o Clarify the comments on AIO to note that yes, AIO really is unsuitable 2001-12-14 11:21:16 +00:00
options Axe NFS_NOSERVER since it doesn't do anything anymore. Remove NFSSERVER 2001-11-15 16:03:24 +00:00
options.alpha Implement support for MAXMEM option and hw.physmem environment variable 2001-09-10 07:03:59 +00:00
options.i386 Device Polling code for -current. 2001-12-14 17:56:12 +00:00
options.ia64 Add various file relating to firmware interfaces and make SKI support 2001-09-29 11:46:22 +00:00
options.pc98 MFi386: revision 1.160 2001-11-17 13:44:33 +00:00
options.powerpc Add a cosmetic comment. 2001-08-02 23:54:23 +00:00
options.sparc64 Add entries for the recently committed code. 2001-11-09 20:44:44 +00:00
systags.sh $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00