summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_poll.c
Commit message (Collapse)AuthorAgeFilesLines
* Increase size of ifnet.if_flags from 16 bits (short) to 32 bits (int). To avoidsobomax2002-08-181-5/+5
| | | | | | | breaking application ABI use unused ifreq.ifru_flags[1] for upper 16 bits in SIOCSIFFLAGS and SIOCGIFFLAGS ioctl's. Reviewed by: -hackers, -net
* Temporarily disable polling when no processes are active, while Iluigi2002-08-041-1/+1
| | | | | | | | | investigate the problem described below. I am seeing some strange livelock on recent -current sources with a slow box under heavy load, which disappears with this change. This might suggest some kind of problem (either insufficient locking, or mishandling of priorities) in the poll_idle thread.
* Part 1 of KSE-IIIjulian2002-06-291-1/+0
| | | | | | | | | | | | | The ability to schedule multiple threads per process (one one cpu) by making ALL system calls optionally asynchronous. to come: ia64 and power-pc patches, patches for gdb, test program (in tools) Reviewed by: Almost everyone who counts (at various times, peter, jhb, matt, alfred, mini, bernd, and a cast of thousands) NOTE: this is still Beta code, and contains lots of debugging stuff. expect slight instability in signals..
* Remove a printf and add a comment on an assumption that could beluigi2002-06-271-3/+10
| | | | occasionally violated by device drivers.
* Make the DEVICE_POLLING code compile with -Werror and in LINTluigi2002-03-091-2/+4
|
* Make this compile after changes to kse structures.luigi2002-02-151-1/+1
| | | | | | | | | This escaped because DEVICE_POLLING is disabled in LINT being not compatible with SMP. In fact, it is only a runtime problem, so if we could recognize that we are building a LINT kernel we could as well disable the check for SMP being defined. Reported-by: Joe Clarke
* MFS: synchronize the code with the version in -stable, specifically:luigi2002-02-111-61/+98
| | | | | | + SYSCTL_ULONG -> SYSCTL_UINT + some procedure renaming and variable rearrangement + fix the 'interface going deaf' problem same as in -stable.
* In a threaded world, differnt priorirites become properties ofjulian2002-02-111-1/+1
| | | | | | different entities. Make it so. Reviewed by: jhb@freebsd.org (john baldwin)
* Complete the device polling support by adding a thread in chargeluigi2001-12-191-0/+55
| | | | | | | of polling interfaces at the lowest possible priority (this might result in softnetisr being scheduled, but there is no risk of livelock because they have a higher priority than this thread).
* Device Polling code for -current.luigi2001-12-141-0/+422
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
OpenPOWER on IntegriCloud