DragonFly BSD

CVS log for src/sys/kern/kern_poll.c

[BACK] Up to [DragonFly] / src / sys / kern

Request diff between arbitrary revisions


Keyword substitution: kv
Default branch: MAIN


Revision 1.48: download - view: text, markup, annotated - select for diffs
Wed Sep 24 12:07:19 2008 UTC (6 years, 2 months ago) by sephe
Branches: MAIN
CVS tags: HEAD
Diff to: previous 1.47: preferred, unified
Changes since revision 1.47: +14 -9 lines
Mark all msgs used by polling(4) as MPSAFE ones

Revision 1.47: download - view: text, markup, annotated - select for diffs
Tue Sep 23 14:14:20 2008 UTC (6 years, 2 months ago) by sephe
Branches: MAIN
Diff to: previous 1.46: preferred, unified
Changes since revision 1.46: +22 -20 lines
polling(4)'s poll/pollmore netmsg handler will not be changed, so initialize
them once.

Revision 1.46: download - view: text, markup, annotated - select for diffs
Thu May 1 02:03:28 2008 UTC (6 years, 7 months ago) by sephe
Branches: MAIN
CVS tags: DragonFly_RELEASE_2_0_Slip, DragonFly_RELEASE_2_0, DragonFly_Preview
Diff to: previous 1.45: preferred, unified
Changes since revision 1.45: +19 -1 lines
- Promote em(4) polling begin/end ktr into polling(4)
- Add crit section around if_poll

Revision 1.45: download - view: text, markup, annotated - select for diffs
Wed Apr 30 09:30:59 2008 UTC (6 years, 7 months ago) by sephe
Branches: MAIN
Diff to: previous 1.44: preferred, unified
Changes since revision 1.44: +8 -1 lines
Add tunable for each_burst.

Revision 1.44: download - view: text, markup, annotated - select for diffs
Sat Mar 29 05:27:07 2008 UTC (6 years, 8 months ago) by sephe
Branches: MAIN
Diff to: previous 1.43: preferred, unified
Changes since revision 1.43: +10 -1 lines
Add tunable for polling burst max, which is a significant tuning parameter
in addition to polling hz for polling(4) operation

Revision 1.43: download - view: text, markup, annotated - select for diffs
Fri Nov 16 05:07:36 2007 UTC (7 years ago) by sephe
Branches: MAIN
CVS tags: DragonFly_RELEASE_1_12_Slip, DragonFly_RELEASE_1_12
Diff to: previous 1.42: preferred, unified
Changes since revision 1.42: +7 -9 lines
Nuke net/intrq.[ch] and ipintrq related bits; they were gone almost three
years ago.

Revision 1.42: download - view: text, markup, annotated - select for diffs
Sun Nov 11 07:38:29 2007 UTC (7 years ago) by sephe
Branches: MAIN
Diff to: previous 1.41: preferred, unified
Changes since revision 1.41: +12 -1 lines
Protect pollctx fields (noticably netmsg used to schedule netisr_poll),
which will be touched by systimer callback function by critical section.

Revision 1.41: download - view: text, markup, annotated - select for diffs
Mon Oct 1 11:18:44 2007 UTC (7 years, 2 months ago) by sephe
Branches: MAIN
Diff to: previous 1.40: preferred, unified
Changes since revision 1.40: +90 -57 lines
- Move polling disablement, i.e. deregistering all NICs, out of hot code path.
- When the last NIC is deregistered or polling is disabled, reset all interval
  state.
- Return immediately in netisr_poll/netisr_pollmore if no NIC is registered.
- Add assertion in netisr_poll/netisr_pollmore: it is not possible that polling
  is not enabled but there are registered NIC.
- Comment pollctx structure fields.

Revision 1.40: download - view: text, markup, annotated - select for diffs
Mon Oct 1 10:03:49 2007 UTC (7 years, 2 months ago) by sephe
Branches: MAIN
Diff to: previous 1.39: preferred, unified
Changes since revision 1.39: +52 -16 lines
Move poll_each_burst adjustment out of hot code path.

Revision 1.39: download - view: text, markup, annotated - select for diffs
Mon Oct 1 09:37:30 2007 UTC (7 years, 2 months ago) by sephe
Branches: MAIN
Diff to: previous 1.38: preferred, unified
Changes since revision 1.38: +56 -7 lines
- Move poll_burst_max adjustment out of hot code path.
- Adjust poll_burst and residual_burst accordingly if poll_burst_max changes.

Revision 1.38: download - view: text, markup, annotated - select for diffs
Mon Oct 1 09:03:28 2007 UTC (7 years, 2 months ago) by sephe
Branches: MAIN
Diff to: previous 1.37: preferred, unified
Changes since revision 1.37: +4 -3 lines
- poll_burst and residual_burst are dynamicly adjusted by the running code,
  so it does not make much sense to keep them RW.
- Adjust comment according to reality.

Revision 1.37: download - view: text, markup, annotated - select for diffs
Mon Oct 1 08:52:40 2007 UTC (7 years, 2 months ago) by sephe
Branches: MAIN
Diff to: previous 1.36: preferred, unified
Changes since revision 1.36: +65 -10 lines
Move reg_frac/reg_frac_count adjustment out of hot code path.

Revision 1.36: download - view: text, markup, annotated - select for diffs
Mon Oct 1 07:31:45 2007 UTC (7 years, 2 months ago) by sephe
Branches: MAIN
Diff to: previous 1.35: preferred, unified
Changes since revision 1.35: +4 -5 lines
- Fix a bug introduced by dynamic polling frequency support:
  polling frequency is no longer 'hz' but 'pollhz'
- Nuke unnecessary header inclusion

Revision 1.35: download - view: text, markup, annotated - select for diffs
Sun Sep 30 05:12:25 2007 UTC (7 years, 2 months ago) by sephe
Branches: MAIN
Diff to: previous 1.34: preferred, unified
Changes since revision 1.34: +20 -13 lines
- Adjust comment according to the recent addition of multiple cpu
  polling(4) support.
- Move comment to proper place.
- Nuke unused header inclusion.
- Shut up GCC4 signedness warning.

Revision 1.34: download - view: text, markup, annotated - select for diffs
Sun Sep 30 04:37:27 2007 UTC (7 years, 2 months ago) by sephe
Branches: MAIN
Diff to: previous 1.33: preferred, unified
Changes since revision 1.33: +294 -112 lines
Support polling(4) on multiple CPUs, i.e. each NIC can be assigned to a
particular CPU that supports polling(4):
- Tunable kern.polling.cpumask controls which CPU can support polling(4).
- Sysctl nodes under kern.polling.X should be used to tune polling(4)
  parameters on CPU_X.
- 'pollcpu' is added to ifconfig(8), which can be used to assign an NIC
  to a particular CPU.

Revision 1.33: download - view: text, markup, annotated - select for diffs
Wed Sep 12 12:02:09 2007 UTC (7 years, 2 months ago) by sephe
Branches: MAIN
Diff to: previous 1.32: preferred, unified
Changes since revision 1.32: +303 -168 lines
Prepare to support polling(4) on multiple cpus:
- Add per-cpu polling(4) context, move global variables into it.
- Make global sysctl nodes per-cpu.  Fake original global sysctl
  nodes by creating alias to the lowest cpu's sysctl nodes, mainly
  for compatibility.

Revision 1.32: download - view: text, markup, annotated - select for diffs
Sun Sep 9 09:14:38 2007 UTC (7 years, 2 months ago) by sephe
Branches: MAIN
Diff to: previous 1.31: preferred, unified
Changes since revision 1.31: +6 -6 lines
- Make fwe(4) aware of IFF_POLLING setting in its if_init().
- Allow IFF_POLLING flag to be turned on even when the interface is not
  up yet, since after above fix, all drivers that support polling(4) will
  turn on/off interrupt in their if_init() based on IFF_POLLING.

This fixes the bug reported by many people that enabling "polling" in
rc.conf's ifconfig_ifaceX does not work.

Revision 1.31: download - view: text, markup, annotated - select for diffs
Sun Sep 9 05:11:28 2007 UTC (7 years, 2 months ago) by sephe
Branches: MAIN
Diff to: previous 1.30: preferred, unified
Changes since revision 1.30: +3 -1 lines
NULL should never be passed to ether_poll_deregister().  Try catching any
brain dead caller by assertion.

Revision 1.30: download - view: text, markup, annotated - select for diffs
Sun Sep 9 04:30:25 2007 UTC (7 years, 2 months ago) by sephe
Branches: MAIN
Diff to: previous 1.29: preferred, unified
Changes since revision 1.29: +17 -13 lines
- Fix comment.
- Use ifp as local variable, indirect accessing ifp through pollrec is not
  meaningful here.
- Break long lines.

Revision 1.29: download - view: text, markup, annotated - select for diffs
Sun Sep 9 03:51:25 2007 UTC (7 years, 2 months ago) by sephe
Branches: MAIN
Diff to: previous 1.28: preferred, unified
Changes since revision 1.28: +0 -9 lines
Nuke the hack in vr(4) that polling(4) will be turned when watchdog times out;
if interrupt does not work at all, polling(4) can be turned manually.

Approved-by: dillon@

Revision 1.28: download - view: text, markup, annotated - select for diffs
Sat Aug 4 08:25:37 2007 UTC (7 years, 3 months ago) by sephe
Branches: MAIN
Diff to: previous 1.27: preferred, unified
Changes since revision 1.27: +2 -2 lines
'phrase' and 'pending_polls' should never be changed by users, since
they control polling code execution logic.

Revision 1.27: download - view: text, markup, annotated - select for diffs
Wed May 23 08:57:04 2007 UTC (7 years, 6 months ago) by dillon
Branches: MAIN
CVS tags: DragonFly_RELEASE_1_10_Slip, DragonFly_RELEASE_1_10
Diff to: previous 1.26: preferred, unified
Changes since revision 1.26: +4 -6 lines
* Greatly reduce the complexity of the LWKT messaging and port abstraction.
  Significantly reduce the overhead of the subsystem.

* The message abort algorithm has been rewritten.  It now sends a
  separate message to issue the abort instead of trying to requeue
  the original message.  This also means the TAILQ embedded in the
  lwkt_msg structure can be used by unrelated code during processing
  of the message.

* Numerous MSGF_ flags have been removed, and all the LWKT msg/port
  algorithms have been rewritten and simplified.  The message structure
  is now only touched by the current owner in all situations.

* Numerous structural fields have been removed.  In particular, the
  fields used for message abort sequencing have been simplified and
  we do not try to embed a 'command' field in the base LWKT message
  any more.

* Clean up the netmsg abstraction, which is used all over the network stack.
  Instead of trying to overload fields in lwkt_msg we now simply extend
  the base lwkt_msg into struct netmsg.  The function dispatch now takes
  a netmsg and returns void (before we had to return EASYNC), and we no
  longer need weird casts.

  Accept/connect message aborts are now greatly simplified.

Revision 1.26: download - view: text, markup, annotated - select for diffs
Mon Apr 30 07:18:53 2007 UTC (7 years, 7 months ago) by dillon
Branches: MAIN
Diff to: previous 1.25: preferred, unified
Changes since revision 1.25: +3 -3 lines
Revamp SYSINIT ordering.  Relabel sysinit IDs (SI_* in sys/kernel.h) to
make them less confusing, particularly with regard to the relative order
init routines are called in.

Reorder many sysinits.  Reorder the SMP and CLOCK code to bring all the
cpus up far earlier in the boot sequence and to make the full threading and
clocking subsystems available for device config.

Revision 1.25: download - view: text, markup, annotated - select for diffs
Fri Jan 5 22:16:28 2007 UTC (7 years, 10 months ago) by dillon
Branches: MAIN
CVS tags: DragonFly_RELEASE_1_8_Slip, DragonFly_RELEASE_1_8
Diff to: previous 1.24: preferred, unified
Changes since revision 1.24: +0 -1 lines
Move dumplo from MD to kern/kern_shutdown.c

Move db_disasm.c from the platform architecture to the cpu architecture

Move add missing __volatile to cpu_halt()'s HLT function to prevent it from
being optimized out.

Remove the vm_page_zero_idle() function (that has not been used for a while).

Move some more function prototypes for MD functions used by MI code into MI
header files.

Revision 1.24: download - view: text, markup, annotated - select for diffs
Sat Dec 23 00:35:04 2006 UTC (7 years, 11 months ago) by swildner
Branches: MAIN
Diff to: previous 1.23: preferred, unified
Changes since revision 1.23: +3 -3 lines
Rename printf -> kprintf in sys/ and add some defines where necessary
(files which are used in userland, too).

Revision 1.23: download - view: text, markup, annotated - select for diffs
Mon Oct 23 21:50:33 2006 UTC (8 years, 1 month ago) by dillon
Branches: MAIN
Diff to: previous 1.22: preferred, unified
Changes since revision 1.22: +1 -1 lines
Further normalize the _XXX_H_ symbols used to conditionalize header file
inclusion.

Use _MACHINE_BLAH_H_ for headers found in "/usr/src/sys/arch/<arch>/include".
Most headers already did this, but some did not.

Use _ARCH_SUBDIR_BLAH_H_ for headers found in "/usr/src/sys/arch/<arch>/subdir"
instead of _I386_SUBDIR_BLAH_H_.

Change #include's made in architecture-specific directories to use
<machine/blah.h> instead of "blah.h", allowing the included header files
to be overrdden by another architecture.  For example, a virtual kernel
architecture might include a header from arch/i386/include which then
includes some other header in arch/i386/include.  But really we want that
other header to also go via the arch/vkernel/include, so the header files
in arch/i386/include must use <machine/blah.h> instead of "blah.h" for most
of their sub-includes.

Change most architecture-specific includes such as <i386/icu/icu.h> to
use a generic path through the "arch" softlink, such as <arch/icu/icu.h>.

Remove the temporary -I@/arch shim made in a recent commit, the <arch/...>
mechanism replaces it.

These changes allow us to implement heirarchical architectural overrides,
primarily intended for virtual kernel support.  A virtual kernel uses an
architecture of 'vkernel' but must be able to access actual cpu-specific
header files such as those found in arch/i386.  It does this using a
"cpu" softlink.  For example, someone including <machine/atomic.h> in a
vkernel build would hit the "arch/vkernel/include/atomic.h" header, and this
header could then #include <cpu/atomic.h> to access the actual cpu's
atomic.h file: "arch/i386/include/atomic.h".

The ultimate effect is that an architecture can build on another
architecture's header and source files.

Revision 1.22: download - view: text, markup, annotated - select for diffs
Mon Nov 28 17:13:45 2005 UTC (9 years ago) by dillon
Branches: MAIN
CVS tags: DragonFly_RELEASE_1_6_Slip, DragonFly_RELEASE_1_6, DragonFly_RELEASE_1_4_Slip, DragonFly_RELEASE_1_4
Diff to: previous 1.21: preferred, unified
Changes since revision 1.21: +24 -12 lines
Make all network interrupt service routines MPSAFE part 1/3.

Replace the critical section that was previously used to serialize access
with the LWKT serializer.  Integrate the serializer into the IFNET structure.
Note that kern.intr_mpsafe must be set to 1 for network interrupts to actually
run MPSAFE.  Also note that any interrupts shared with othre non-MP drivers
will cause all drivers on that interrupt to run with the Big Giant Lock.

Network interrupt - Each network driver then simply passes that serializer
to bus_setup_intr() so only a single serializer is required to process the
entire interrupt path.  LWKT serialization support is already 100% integrated
into the interrupt subsystem so it will already be held as of when the
registered interrupt procedure is called.

Ioctl and if_* functions - All callers of if_* functions (such as if_start,
if_ioctl, etc) now obtain the IFNET serializer before making the call.  Thus
all of these entry points into the driver will now be serialized.

if_input - All code that calls if_input now ensures that the serializer
is held.  It will either already be held (when called from a driver), or
the serializer will be wrapped around the call.  When packets are forwarded
or bridged between interfaces, the target interface serializer will be
dropped temporarily to avoid a deadlock.

Device Driver access - dev_* entry points into certain pseudo-network
devices now obtain and release the serializer.  This had to be done on
a device-by-device basis (but there are only a few such devices).

Thanks to several people for helping test the patch, in particular
Sepherosa Ziehau.

Revision 1.21: download - view: text, markup, annotated - select for diffs
Mon Oct 24 08:06:16 2005 UTC (9 years, 1 month ago) by sephe
Branches: MAIN
Diff to: previous 1.20: preferred, unified
Changes since revision 1.20: +2 -0 lines
- Move DEVICE_POLLING from opt_global.h to opt_polling.h(newly added),
  so that polling(4) can be enabled in modules that are not built
  during kernel building
- Add opt_polling.h to files that depend on DEVICE_POLLING
- Change related netif modules' Makefile to enable polling(4) support
- Add comment in net/if_var.h to prevent DEVICE_POLLING related
  incompatibilities from being introduced
  Suggested-by: dillon

NOTE: As of this commit, any file that will depend on DEVICE_POLLING
      *must* include opt_polling.h at its beginning

With-helps-from: joerg
Reviewed-by: dillon, submit@

Revision 1.20: download - view: text, markup, annotated - select for diffs
Thu Oct 20 15:54:55 2005 UTC (9 years, 1 month ago) by dillon
Branches: MAIN
Diff to: previous 1.19: preferred, unified
Changes since revision 1.19: +2 -2 lines
Oops, fix the polling enable name, it's supposed to be kern.polling.enable,
not kern.polling.polling.

Reported-by: Sepherosa Ziehau <sepherosa@gmail.com>

Revision 1.19: download - view: text, markup, annotated - select for diffs
Thu Oct 13 00:45:36 2005 UTC (9 years, 1 month ago) by dillon
Branches: MAIN
Diff to: previous 1.18: preferred, unified
Changes since revision 1.18: +71 -10 lines
Move the polling systimer initialization code out of kern_clock.c and into
kern_poll.c.

Program the polling systimer to 1hz while polling is disabled, to reduce
cpu waste.  Change the default polling frequency to 2000hz.

Revision 1.18: download - view: text, markup, annotated - select for diffs
Mon Jun 6 15:02:28 2005 UTC (9 years, 5 months ago) by dillon
Branches: MAIN
Diff to: previous 1.17: preferred, unified
Changes since revision 1.17: +8 -7 lines
Remove spl*() calls from kern, replacing them with critical sections.
Change the meaning of safepri from a cpl mask to a thread priority.
Make a minor adjustment to tests within one of the buffer cache's
critical sections.

Revision 1.17: download - view: text, markup, annotated - select for diffs
Wed Jun 1 20:47:14 2005 UTC (9 years, 5 months ago) by joerg
Branches: MAIN
Diff to: previous 1.16: preferred, unified
Changes since revision 1.16: +65 -28 lines
Back out last commit, this wasn't supposed to crep in.

Revision 1.16: download - view: text, markup, annotated - select for diffs
Wed Jun 1 20:04:53 2005 UTC (9 years, 6 months ago) by joerg
Branches: MAIN
Diff to: previous 1.15: preferred, unified
Changes since revision 1.15: +28 -65 lines
Removing rest of debugging code which slipped into the commit.
This doesn't change the semantic.

Noticed-by: Andreas Kohn

Revision 1.15: download - view: text, markup, annotated - select for diffs
Wed May 25 01:44:14 2005 UTC (9 years, 6 months ago) by dillon
Branches: MAIN
Diff to: previous 1.14: preferred, unified
Changes since revision 1.14: +62 -40 lines
Rewrite the polling code.  Instead of trying to do fancy polling enablement
from inside the IF interrupt itself, which creates a headache in the code,
simply allow IFF_POLLING to be set and cleared via ifconfig.  This greatly
simplifies both the networking code and the polling code and allows polling
to be enabled and disabled at will on a per-network-interface basis.

* Drivers no longer have to have polling checks in the interrupt path.
* An if_poll function vector has been added.  Polling is supported if the
  driver initializes the vector.
* Registration command added to the poll function command list.
* Driver code for registration and deregistration is now greatly simplified.

The kernel polling code no longer randomly turns off the polling bit if an
interface goes down or is reset.

Remove IFCAP_POLLING, it serves no purpose.

Fix a couple of bugs in the serializer code.  Add a warning in
nexus_setup_intr if a driver tries to specify a serializer and an SPL.
A driver can specify one or the other, not both.

Convert the EM driver to use the new serializer API instead of SPLs.

Add ifconfig poll and ifconfig -poll support to ifconfig, and fix bugs
in the rtsock code that only returned the low 16 bits of the interface
flags so ifconfig properly reports when polling mode is turned on for an
interface.

NOTE to people using polling.  You must first enable polling via
kern.polling.enable, and then may specify the 'poll' directive in ifconfig
to enable it on a per interface basis.  If IFF_POLLING refuses to be set,
the device does not support polling.

Revision 1.14: download - view: text, markup, annotated - select for diffs
Tue May 24 21:18:27 2005 UTC (9 years, 6 months ago) by dillon
Branches: MAIN
Diff to: previous 1.13: preferred, unified
Changes since revision 1.13: +0 -24 lines
Get rid of the bad hack that was doing network polling from the trap code.

Revision 1.13: download - view: text, markup, annotated - select for diffs
Sun Jun 27 19:40:12 2004 UTC (10 years, 5 months ago) by dillon
Branches: MAIN
CVS tags: DragonFly_Stable, DragonFly_Snap29Sep2004, DragonFly_Snap13Sep2004, DragonFly_RELEASE_1_2_Slip, DragonFly_RELEASE_1_2, DragonFly_1_0_REL, DragonFly_1_0_RC1, DragonFly_1_0A_REL
Diff to: previous 1.12: preferred, unified
Changes since revision 1.12: +20 -37 lines
The schednetisr() routine is supposed to be MP and interrupt safe, but wasn't
because it allocated its messages.  Instead of allocating a message use a
fixed message in the netisr structure.

Get rid of #ifdef SMP/#error.  DEVICE_POLLING now works on SMP builds.

Implement an emergency polling enable function to try to keep the system
operational in a degraded state if interrupt routing is blown.  NOTE: only
vr0 uses the feature at the moment, and DEVICE_POLLING must be enabled.

Revision 1.12: download - view: text, markup, annotated - select for diffs
Wed Apr 21 18:13:47 2004 UTC (10 years, 7 months ago) by dillon
Branches: MAIN
Diff to: previous 1.11: preferred, unified
Changes since revision 1.11: +6 -4 lines
Fix a netmsg memory leak in the ARP code.  Adjust all ms_cmd function
dispatches to return a proper error code.

Reported-by: multiple people

Revision 1.11: download - view: text, markup, annotated - select for diffs
Fri Apr 16 14:21:58 2004 UTC (10 years, 7 months ago) by joerg
Branches: MAIN
Diff to: previous 1.10: preferred, unified
Changes since revision 1.10: +5 -5 lines
Move IFF_PROMISC and IFF_POLLING from ifnet.ipending to ifnet.if_flags,
where they belong. Consistently use the higher bits of if_flags, not ipending.

Revision 1.10: download - view: text, markup, annotated - select for diffs
Sun Apr 11 05:14:47 2004 UTC (10 years, 7 months ago) by hsu
Branches: MAIN
Diff to: previous 1.9: preferred, unified
Changes since revision 1.9: +5 -2 lines
Fix compilation errors with missing header files and misnamed formal parameter.

Reported by:	David Rhodus

Revision 1.9: download - view: text, markup, annotated - select for diffs
Fri Apr 9 22:34:09 2004 UTC (10 years, 7 months ago) by hsu
Branches: MAIN
Diff to: previous 1.8: preferred, unified
Changes since revision 1.8: +4 -2 lines
Push the lwkt_replymsg() up one level from netisr_service_loop() to
the message handler so we can explicitly reply or not reply as appropriate.

Revision 1.8: download - view: text, markup, annotated - select for diffs
Sat Mar 6 01:58:54 2004 UTC (10 years, 8 months ago) by hsu
Branches: MAIN
Diff to: previous 1.7: preferred, unified
Changes since revision 1.7: +5 -4 lines
Dispatch upper-half protocol request handling.

Revision 1.7: download - view: text, markup, annotated - select for diffs
Fri Jan 30 05:42:17 2004 UTC (10 years, 10 months ago) by dillon
Branches: MAIN
Diff to: previous 1.6: preferred, unified
Changes since revision 1.6: +2 -0 lines
This commit represents a major revamping of the clock interrupt and timebase
infrastructure in DragonFly.

* Rip out the existing 8254 timer 0 code, and also disable the use of
  Timer 2 (which means that the PC speaker will no longer go beep).  Timer 0
  used to represent a periodic interrupt and a great deal of code was in
  place to attempt to obtain a timebase off of that periodic interrupt.

  Timer 0 is now used in software retriggerable one-shot mode to produce
  variable-delay interrupts.  A new hardware interrupt clock abstraction
  called SYSTIMERS has been introduced which allows threads to register
  periodic or one-shot interrupt/IPI callbacks at approximately 1uS
  granularity.

  Timer 2 is now set in continuous periodic mode with a period of 65536
  and provides the timebase for the system, abstracted to 32 bits.

  All the old platform-integrated hardclock() and statclock() code has
  been rewritten.  The old IPI forwarding code has been #if 0'd out and
  will soon be entirely removed (the systimer abstraction takes care of
  multi-cpu registrations now).  The architecture-specific clkintr() now
  simply calls an entry point into the systimer and provides a Timer 0
  reload and Timer 2 timebase function API.

* On both UP and SMP systems, cpus register systimer interrupts for the Hz
  interrupt, the stat interrupt, and the scheduler round-robin interrupt.
  The abstraction is carefully designed to allow multiple interrupts occuring
  at the same time to be processed in a single hardware interrupt.  While
  we currently use IPI's to distribute requested interrupts from other cpu's,
  the intent is to use the abstraction to take advantage of per-cpu timers
  when available (e.g. on the LAPIC) in the future.

  systimer interrupts run OUTSIDE THE MP LOCK.  Entry points may be called
  from the hard interrupt or via an IPI message (IPI messages have always
  run outside the MP lock).

* Rip out timecounters and disable alternative timecounter code for other
  time sources.  This is temporary.  Eventually other time sources, such as
  the TSC, will be reintegrated as independant, parallel-running entities.
  There will be no 'time switching' per-say, subsystems will be able to
  select which timebase they wish to use.  It is desireable to reintegrate
  at least the TSC to improve [get]{micro,nano}[up]time() performance.

  WARNING: PPS events may not work properly.  They were not removed, but
  they have not been retested with the new code either.

* Remove spl protection around [get]{micro,nano}[up]time() calls, they are
  now internally protected.

* Use uptime instead of realtime in certain CAM timeout tests

* Remove struct clockframe.  Use struct intrframe everywhere where clockframe
  used to be used.

* Replace most splstatclock() protections with crit_*() protections, because
  such protections must now also protect against IPI messaging interrupts.

* Add fields to the per-cpu globaldata structure to access timebase related
  information using only a critical section rather then a mutex.  However,
  the 8254 Timer 2 access code still uses spin locks.  More work needs to
  be done here, the 'realtime' correction is still done in a single global
  'struct timespec basetime' structure.

* Remove the CLKINTR_PENDING icu and apic interrupt hacks.

* Augment the IPI Messaging code to make an intrframe available to callbacks.

* Document 8254 timing modes in i386/sai/timerreg.h.  Note that at the
  moment we assume an 8254 instead of an 8253 as we are using TIMER_SWSTROBE
  mode.  This may or may not have to be changed to an 8253 mode.

* Integrate the NTP correction code into the new timebase subsystem.

* Separate boottime from basettime.  Once boottime is believed to be stable
  it is no longer effected by NTP or other time corrections.

CAVETS:

	* PC speaker no longer works

	* Profiling interrupt rate not increased (it needs work to be
	  made operational on a per-cpu basis rather then system-wide).

	* The native timebase API is function-based, but currently hardwired.

	* There might or might not be issues with 486 systems due to the
	  timer mode I am using.

Revision 1.6: download - view: text, markup, annotated - select for diffs
Sat Nov 8 07:57:41 2003 UTC (11 years ago) by dillon
Branches: MAIN
Diff to: previous 1.5: preferred, unified
Changes since revision 1.5: +8 -7 lines
Network threading stage 1/3: netisrs are already software interrupts,
which means they alraedy run in their own thread.  This commit creates
multiple supporting threads for netisrs rather then just one and code
has been added to begin routing packets to particular threads based on
their content.  Eventually this will lead to us being able to isolate and
serialize PCBs in particular threads.  The tail end of the ip_input path's
protocol dispatch, the UIPC (user entry) code, and listen socket have not
been covered yet and still need to be serialized.

A new debugging sysctl, net.inet.ip.mthread_enable, has been added.  It
defaults to 1.  If you set this sysctl 0 netisr processing will revert to
the prior single-threaded behavior.

Submitted-by: Jeffrey Hsu <hsu@FreeBSD.org>
Additional-work-by: dillon

Revision 1.5: download - view: text, markup, annotated - select for diffs
Mon Sep 15 23:38:13 2003 UTC (11 years, 2 months ago) by hsu
Branches: MAIN
Diff to: previous 1.4: preferred, unified
Changes since revision 1.4: +2 -2 lines
Centralize if queue handling.

Original patch against FreeBSD submitted by Jonathan Lemon.
Reviewed by Matt Dillon.

Revision 1.4: download - view: text, markup, annotated - select for diffs
Tue Jul 22 22:10:51 2003 UTC (11 years, 4 months ago) by dillon
Branches: MAIN
Diff to: previous 1.3: preferred, unified
Changes since revision 1.3: +2 -2 lines
Remove two unnecessary volatile qualifications.

Revision 1.3: download - view: text, markup, annotated - select for diffs
Mon Jul 21 07:57:47 2003 UTC (11 years, 4 months ago) by dillon
Branches: MAIN
Diff to: previous 1.2: preferred, unified
Changes since revision 1.2: +4 -4 lines
LINT build test.  Aggregated source code adjustments to bring most of the
rest of the kernel source up to date, using the LINT build.

Revision 1.2: download - view: text, markup, annotated - select for diffs
Tue Jun 17 04:28:41 2003 UTC (11 years, 5 months ago) by dillon
Branches: MAIN
CVS tags: PRE_MP
Diff to: previous 1.1: preferred, unified
Changes since revision 1.1: +1 -0 lines
Add the DragonFly cvs id and perform general cleanups on cvs/rcs/sccs ids.  Most
ids have been removed from !lint sections and moved into comment sections.

Revision 1.1: download - view: text, markup, annotated - select for diffs
Tue Jun 17 02:55:01 2003 UTC (11 years, 5 months ago) by dillon
Branches: MAIN
CVS tags: FREEBSD_4_FORK
import from FreeBSD RELENG_4 1.2.2.4

Diff request

This form allows you to request diffs between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.

Log view options