Revision tags: release/7.0.0_cvs, release/7.0.0, release/6.3.0_cvs, release/6.3.0 |
|
#
0bf686c1 |
| 06-Aug-2007 |
Robert Watson <rwatson@FreeBSD.org> |
Remove the now-unused NET_{LOCK,UNLOCK,ASSERT}_GIANT() macros, which previously conditionally acquired Giant based on debug.mpsafenet. As that has now been removed, they are no longer required. Rem
Remove the now-unused NET_{LOCK,UNLOCK,ASSERT}_GIANT() macros, which previously conditionally acquired Giant based on debug.mpsafenet. As that has now been removed, they are no longer required. Removing them significantly simplifies error-handling in the socket layer, eliminated quite a bit of unwinding of locking in error cases.
While here clean up the now unneeded opt_net.h, which previously was used for the NET_WITH_GIANT kernel option. Clean up some related gotos for consistency.
Reviewed by: bz, csjp Tested by: kris Approved by: re (kensmith)
show more ...
|
#
982d11f8 |
| 05-Jun-2007 |
Jeff Roberson <jeff@FreeBSD.org> |
Commit 14/14 of sched_lock decomposition. - Use thread_lock() rather than sched_lock for per-thread scheduling sychronization. - Use the per-process spinlock rather than the sched_lock for per-p
Commit 14/14 of sched_lock decomposition. - Use thread_lock() rather than sched_lock for per-thread scheduling sychronization. - Use the per-process spinlock rather than the sched_lock for per-process scheduling synchronization.
Tested by: kris, current@ Tested on: i386, amd64, ULE, 4BSD, libthr, libkse, PREEMPTION, etc. Discussed with: kris, attilio, kmacy, jhb, julian, bde (small parts each)
show more ...
|
#
041b706b |
| 04-Jun-2007 |
David Malone <dwmalone@FreeBSD.org> |
Despite several examples in the kernel, the third argument of sysctl_handle_int is not sizeof the int type you want to export. The type must always be an int or an unsigned int.
Remove the instances
Despite several examples in the kernel, the third argument of sysctl_handle_int is not sizeof the int type you want to export. The type must always be an int or an unsigned int.
Remove the instances where a sizeof(variable) is passed to stop people accidently cut and pasting these examples.
In a few places this was sysctl_handle_int was being used on 64 bit types, which would truncate the value to be exported. In these cases use sysctl_handle_quad to export them and change the format to Q so that sysctl(1) can still print them.
show more ...
|
Revision tags: release/6.2.0_cvs, release/6.2.0 |
|
#
ad1e7d28 |
| 06-Dec-2006 |
Julian Elischer <julian@FreeBSD.org> |
Threading cleanup.. part 2 of several.
Make part of John Birrell's KSE patch permanent.. Specifically, remove: Any reference of the ksegrp structure. This feature was never fully utilised and made t
Threading cleanup.. part 2 of several.
Make part of John Birrell's KSE patch permanent.. Specifically, remove: Any reference of the ksegrp structure. This feature was never fully utilised and made things overly complicated. All code in the scheduler that tried to make threaded programs fair to unthreaded programs. Libpthread processes will already do this to some extent and libthr processes already disable it.
Also: Since this makes such a big change to the scheduler(s), take the opportunity to rename some structures and elements that had to be moved anyhow. This makes the code a lot more readable.
The ULE scheduler compiles again but I have no idea if it works.
The 4bsd scheduler still reqires a little cleaning and some functions that now do ALMOST nothing will go away, but I thought I'd do that as a separate commit.
Tested by David Xu, and Dan Eischen using libthr and libpthread.
show more ...
|
#
8460a577 |
| 26-Oct-2006 |
John Birrell <jb@FreeBSD.org> |
Make KSE a kernel option, turned on by default in all GENERIC kernel configs except sun4v (which doesn't process signals properly with KSE).
Reviewed by: davidxu@
|
Revision tags: release/5.5.0_cvs, release/5.5.0, release/6.1.0_cvs, release/6.1.0 |
|
#
0f180a7c |
| 17-Apr-2006 |
John Baldwin <jhb@FreeBSD.org> |
Change msleep() and tsleep() to not alter the calling thread's priority if the specified priority is zero. This avoids a race where the calling thread could read a snapshot of it's current priority,
Change msleep() and tsleep() to not alter the calling thread's priority if the specified priority is zero. This avoids a race where the calling thread could read a snapshot of it's current priority, then a different thread could change the first thread's priority, then the original thread would call sched_prio() inside msleep() undoing the change made by the second thread. I used a priority of zero as no thread that calls msleep() or tsleep() should be specifying a priority of zero anyway.
The various places that passed 'curthread->td_priority' or some variant as the priority now pass 0.
show more ...
|
Revision tags: release/6.0.0_cvs, release/6.0.0 |
|
#
f0796cd2 |
| 05-Oct-2005 |
Gleb Smirnoff <glebius@FreeBSD.org> |
- Don't pollute opt_global.h with DEVICE_POLLING and introduce opt_device_polling.h - Include opt_device_polling.h into appropriate files. - Embrace with HAVE_KERNEL_OPTION_HEADERS the include in t
- Don't pollute opt_global.h with DEVICE_POLLING and introduce opt_device_polling.h - Include opt_device_polling.h into appropriate files. - Embrace with HAVE_KERNEL_OPTION_HEADERS the include in the files that can be compiled as loadable modules.
Reviewed by: bde
show more ...
|
#
e113edf3 |
| 03-Oct-2005 |
Gleb Smirnoff <glebius@FreeBSD.org> |
o Move a lot of parameter checking from netisr_poll() to dedicated sysctl handlers. Protect manipulations with poll_mtx. The affected sysctls are: - kern.polling.burst_max - kern.polling.each
o Move a lot of parameter checking from netisr_poll() to dedicated sysctl handlers. Protect manipulations with poll_mtx. The affected sysctls are: - kern.polling.burst_max - kern.polling.each_burst - kern.polling.user_frac - kern.polling.reg_frac o Use CTLFLAG_RD on MIBs that supposed to be read-only. o u_int32t -> uint32_t o Remove unneeded locking from poll_switch().
show more ...
|
#
40929967 |
| 01-Oct-2005 |
Gleb Smirnoff <glebius@FreeBSD.org> |
Big polling(4) cleanup.
o Axe poll in trap.
o Axe IFF_POLLING flag from if_flags.
o Rework revision 1.21 (Giant removal), in such a way that poll_mtx is not dropped during call to polling handle
Big polling(4) cleanup.
o Axe poll in trap.
o Axe IFF_POLLING flag from if_flags.
o Rework revision 1.21 (Giant removal), in such a way that poll_mtx is not dropped during call to polling handler. This fixes problem with idle polling.
o Make registration and deregistration from polling in a functional way, insted of next tick/interrupt.
o Obsolete kern.polling.enable. Polling is turned on/off with ifconfig.
Detailed kern_poll.c changes: - Remove polling handler flags, introduced in 1.21. The are not needed now. - Forget and do not check if_flags, if_capenable and if_drv_flags. - Call all registered polling handlers unconditionally. - Do not drop poll_mtx, when entering polling handlers. - In ether_poll() NET_LOCK_GIANT prior to locking poll_mtx. - In netisr_poll() axe the block, where polling code asks drivers to unregister. - In netisr_poll() and ether_poll() do polling always, if any handlers are present. - In ether_poll_[de]register() remove a lot of error hiding code. Assert that arguments are correct, instead. - In ether_poll_[de]register() use standard return values in case of error or success. - Introduce poll_switch() that is a sysctl handler for kern.polling.enable. poll_switch() goes through interface list and enabled/disables polling. A message that kern.polling.enable is deprecated is printed.
Detailed driver changes: - On attach driver announces IFCAP_POLLING in if_capabilities, but not in if_capenable. - On detach driver calls ether_poll_deregister() if polling is enabled. - In polling handler driver obtains its lock and checks IFF_DRV_RUNNING flag. If there is no, then unlocks and returns. - In ioctl handler driver checks for IFCAP_POLLING flag requested to be set or cleared. Driver first calls ether_poll_[de]register(), then obtains driver lock and [dis/en]ables interrupts. - In interrupt handler driver checks IFCAP_POLLING flag in if_capenable. If present, then returns.This is important to protect from spurious interrupts.
Reviewed by: ru, sam, jhb
show more ...
|
#
f46ab10c |
| 06-Sep-2005 |
Gleb Smirnoff <glebius@FreeBSD.org> |
Document flags of a pollrec.
|
#
16901c01 |
| 05-Sep-2005 |
Gleb Smirnoff <glebius@FreeBSD.org> |
Remove Giant mutex from polling(4) and use a separate poll_mtx(4) instead. Detailed changelist:
o Add flags field to struct pollrec, to indicate that are particular entry is being worked on. o Def
Remove Giant mutex from polling(4) and use a separate poll_mtx(4) instead. Detailed changelist:
o Add flags field to struct pollrec, to indicate that are particular entry is being worked on. o Define a macro PR_VALID() to check that a pollrec is valid and pollable. o Mark ISRs as mpsafe.
o ether_poll() - Acquire poll_mtx while traversing pollrec array. - Skip pollrecs, that are being worked on. - Conditionally acquire Giant when entering handler.
o netisr_pollmore() - Conditionally assert Giant. - Acquire poll_mtx while working with statistics.
o netisr_poll() - Conditionally assert Giant. - Acquire poll_mtx while working with statistics and traversing pollrec array.
o ether_poll_register(), ether_poll_deregister() - Conditionally assert Giant. - Acquire poll_mtx while working with pollrec array.
o poll_idle() - Remove all strange manipulations with Giant.
In collaboration with: ru, pjd In collaboration with: Oleg Bulyzhin <oleg rinet.ru> In collaboration with: dima <_pppp mail.ru>
show more ...
|
#
13f4c340 |
| 09-Aug-2005 |
Robert Watson <rwatson@FreeBSD.org> |
Propagate rename of IFF_OACTIVE and IFF_RUNNING to IFF_DRV_OACTIVE and IFF_DRV_RUNNING, as well as the move from ifnet.if_flags to ifnet.if_drv_flags. Device drivers are now responsible for synchron
Propagate rename of IFF_OACTIVE and IFF_RUNNING to IFF_DRV_OACTIVE and IFF_DRV_RUNNING, as well as the move from ifnet.if_flags to ifnet.if_drv_flags. Device drivers are now responsible for synchronizing access to these flags, as they are in if_drv_flags. This helps prevent races between the network stack and device driver in maintaining the interface flags field.
Many __FreeBSD__ and __FreeBSD_version checks maintained and continued; some less so.
Reviewed by: pjd, bz MFC after: 7 days
show more ...
|
Revision tags: release/5.4.0_cvs, release/5.4.0 |
|
#
183a16a3 |
| 25-Feb-2005 |
Tom Rhodes <trhodes@FreeBSD.org> |
Remove recently added note about DEVICE_POLLING not working with SMP. Remove warning from kern_poll.c to allow DEVICE_POLLING to be built with SMP.
Discussed with: ru, glebius
|
Revision tags: release/4.11.0_cvs, release/4.11.0, release/5.3.0_cvs, release/5.3.0 |
|
#
b5cbda50 |
| 03-Jul-2004 |
John Baldwin <jhb@FreeBSD.org> |
Add a NULL param to an mi_switch() that I missed.
Reported by: Jung-uk Kim jkim at niksun dot com
|
Revision tags: release/4.10.0_cvs, release/4.10.0 |
|
#
61f7581d |
| 15-Apr-2004 |
Ruslan Ermilov <ru@FreeBSD.org> |
Ensure that the poll_burst <= poll_burst_max constraint really holds.
Reviewed by: luigi
|
Revision tags: release/5.2.1_cvs, release/5.2.1 |
|
#
29bcc451 |
| 25-Jan-2004 |
Jeff Roberson <jeff@FreeBSD.org> |
- Add a flags parameter to mi_switch. The value of flags may be SW_VOL or SW_INVOL. Assert that one of these is set in mi_switch() and propery adjust the rusage statistics. This is to simpli
- Add a flags parameter to mi_switch. The value of flags may be SW_VOL or 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.
show more ...
|
Revision tags: release/5.2.0_cvs, release/5.2.0 |
|
#
7902224c |
| 08-Nov-2003 |
Sam Leffler <sam@FreeBSD.org> |
o add a flags parameter to netisr_register that is used to specify whether or not the isr needs to hold Giant when running; Giant-less operation is also controlled by the setting of debug_mpsafen
o add a flags parameter to netisr_register that is used to specify 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
show more ...
|
Revision tags: release/4.9.0_cvs, release/4.9.0 |
|
#
6c240564 |
| 20-Oct-2003 |
Sam Leffler <sam@FreeBSD.org> |
revert default for idle polling to zero until we can resolve the livelock problem
|
#
bd196698 |
| 14-Oct-2003 |
Sam Leffler <sam@FreeBSD.org> |
Change default for kern.polling.idle_poll back to 1. This was set to 0 because Luigi observed livelock but in recent testing it did not occur so I'm re-enabling it by default.
Reviewed by: luigi
|
#
677b542e |
| 11-Jun-2003 |
David E. O'Brien <obrien@FreeBSD.org> |
Use __FBSDID().
|
Revision tags: release/5.1.0_cvs, release/5.1.0, release/4.8.0_cvs, release/4.8.0 |
|
#
1cafed39 |
| 05-Mar-2003 |
Jonathan Lemon <jlemon@FreeBSD.org> |
Update netisr handling; Each SWI now registers its queue, and all queue drain routines are done by swi_net, which allows for better queue control at some future point. Packets may also be directly d
Update netisr handling; Each SWI now registers its queue, and all queue 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
show more ...
|
Revision tags: release/5.0.0_cvs, release/5.0.0, release/4.7.0_cvs |
|
#
62f76486 |
| 18-Aug-2002 |
Maxim Sobolev <sobomax@FreeBSD.org> |
Increase size of ifnet.if_flags from 16 bits (short) to 32 bits (int). To avoid breaking application ABI use unused ifreq.ifru_flags[1] for upper 16 bits in SIOCSIFFLAGS and SIOCGIFFLAGS ioctl's.
Re
Increase size of ifnet.if_flags from 16 bits (short) to 32 bits (int). To avoid breaking application ABI use unused ifreq.ifru_flags[1] for upper 16 bits in SIOCSIFFLAGS and SIOCGIFFLAGS ioctl's.
Reviewed by: -hackers, -net
show more ...
|
Revision tags: release/4.6.2_cvs, release/4.6.2 |
|
#
fc1c73c2 |
| 04-Aug-2002 |
Luigi Rizzo <luigi@FreeBSD.org> |
Temporarily disable polling when no processes are active, while I investigate the problem described below.
I am seeing some strange livelock on recent -current sources with a slow box under heavy lo
Temporarily disable polling when no processes are active, while I 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.
show more ...
|
Revision tags: release/4.6.1, release/4.6.0_cvs |
|
#
e602ba25 |
| 29-Jun-2002 |
Julian Elischer <julian@FreeBSD.org> |
Part 1 of KSE-III
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 pro
Part 1 of KSE-III
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..
show more ...
|
#
d26d355f |
| 28-Jun-2002 |
Luigi Rizzo <luigi@FreeBSD.org> |
Remove a printf and add a comment on an assumption that could be occasionally violated by device drivers.
|