summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_poll.c
Commit message (Collapse)AuthorAgeFilesLines
* Add a NULL param to an mi_switch() that I missed.jhb2004-07-031-1/+1
| | | | Reported by: Jung-uk Kim jkim at niksun dot com
* Ensure that the poll_burst <= poll_burst_max constraint really holds.ru2004-04-151-0/+2
| | | | Reviewed by: luigi
* - Add a flags parameter to mi_switch. The value of flags may be SW_VOL orjeff2004-01-251-2/+1
| | | | | | | | | | SW_INVOL. Assert that one of these is set in mi_switch() and propery adjust the rusage statistics. This is to simplify the large number of users of this interface which were previously all required to adjust the proper counter prior to calling mi_switch(). This also facilitates more switch and locking optimizations. - Change all callers of mi_switch() to pass the appropriate paramter and remove direct references to the process statistics.
* o add a flags parameter to netisr_register that is used to specifysam2003-11-081-2/+2
| | | | | | | | | | | | | | | | whether or not the isr needs to hold Giant when running; Giant-less operation is also controlled by the setting of debug_mpsafenet o mark all netisr's except NETISR_IP as needing Giant o add a GIANT_REQUIRED assertion to the top of netisr's that need Giant o pickup Giant (when debug_mpsafenet is 1) inside ip_input before calling up with a packet o change netisr handling so swi_net runs w/o Giant; instead we grab Giant before invoking handlers based on whether the handler needs Giant o change netisr handling so that netisr's that are marked MPSAFE may have multiple instances active at a time o add netisr statistics for packets dropped because the isr is inactive Supported by: FreeBSD Foundation
* revert default for idle polling to zero until we can resolve thesam2003-10-201-1/+1
| | | | livelock problem
* Change default for kern.polling.idle_poll back to 1. This was set to 0sam2003-10-141-1/+1
| | | | | | | because Luigi observed livelock but in recent testing it did not occur so I'm re-enabling it by default. Reviewed by: luigi
* Use __FBSDID().obrien2003-06-111-2/+3
|
* Update netisr handling; Each SWI now registers its queue, and all queuejlemon2003-03-041-11/+11
| | | | | | | | | | drain routines are done by swi_net, which allows for better queue control at some future point. Packets may also be directly dispatched to a netisr instead of queued, this may be of interest at some installations, but currently defaults to off. Reviewed by: hsu, silby, jayanth, sam Sponsored by: DARPA, NAI Labs
* 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