DragonFly BSD

CVS log for src/sys/sys/kernel.h

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

Request diff between arbitrary revisions


Keyword substitution: kv
Default branch: MAIN


Revision 1.32: download - view: text, markup, annotated - select for diffs
Mon Aug 25 17:11:23 2008 UTC (6 years ago) by dillon
Branches: MAIN
CVS tags: HEAD
Diff to: previous 1.31: preferred, unified
Changes since revision 1.31: +3 -1 lines
AMD64 Support:

* Add an identifier to SYSINIT structures for debugging purposes.

Submitted-by: Jordan Gordeev <jgordeev@dir.bg>
Obtained-from: FreeBSD, with modifications

Revision 1.31: download - view: text, markup, annotated - select for diffs
Wed Jul 23 17:22:33 2008 UTC (6 years, 1 month ago) by dillon
Branches: MAIN
CVS tags: DragonFly_Preview
Diff to: previous 1.30: preferred, unified
Changes since revision 1.30: +2 -0 lines
Synchronize some of the machine-independant AMD64 bits.

Obtained-from: Jordan Gordeev <jgordeev@dir.bg>

Revision 1.30: download - view: text, markup, annotated - select for diffs
Fri Mar 7 11:34:21 2008 UTC (6 years, 5 months ago) by sephe
Branches: MAIN
CVS tags: DragonFly_RELEASE_2_0_Slip, DragonFly_RELEASE_2_0
Diff to: previous 1.29: preferred, unified
Changes since revision 1.29: +1 -0 lines
Parallelize ifnet.if_addrhead accessing by duplicating the list itself
on each CPU, each list element points to ifaddr:
- Add SI_SUB_PRE_DRIVERS before SI_SUB_DRIVERS, so action could be taken
  before drivers' initialization (mainly before NIC driver's if_attach())
- Move netisr_init() to the FIRST of SI_SUB_PRE_DRIVERS, so that
  netmsg_service_port_init() could be called in earlier stage of system
  initialization.
- Create one thread on each CPU to propagate changes to ifnet.if_addrhead.
  Their thread ports are registered with netmsg_service_port_init() for
  port syncing operation.
- Change to ifnet.if_addrhead begins in netisr0, i.e. serial of changes
  to ifnet.if_addrhead are serialized by netisr0
- ifaddr's refcnt is moved to its list elements, i.e. per-CPU refcnt.
  They are initialized to 1 instead of 0.
- A magic field is added to ifaddr list element to make sure that IFAREF
  and IFAFREE are called on valid ifaddr list element.  This field is
  initialized to a magic value and is wiped out once the list element's
  refcnt drops to 0
- To close the gap between testing and freeing, once the ifaddr list
  element's refcnt drops to 0, ifa_portfn(0) (a thread's port on CPU0) is
  poked to check whether ifaddr is referenced on other CPUs, if not, then
  ifaddr is freed on ifa_portfn(0)

Reviewed-by: dillon@ (earlier version)

Revision 1.28.2.1: download - view: text, markup, annotated - select for diffs
Tue Jul 31 22:40:50 2007 UTC (7 years ago) by dillon
Branches: DragonFly_RELEASE_1_10
CVS tags: DragonFly_RELEASE_1_10_Slip
Diff to: previous 1.28: preferred, unified; next MAIN 1.29: preferred, unified
Changes since revision 1.28: +1 -0 lines
Synchronize all changes made in HEAD to date with the 1.10 release branch.

* usbdevs update
* header file fixes
* vinum root
* vinum device I/O fixes
* MD fixes
* New PCI ids for netif rum and ural
* New USB uplcom ids
* linux exec memory leak
* devclass ordering fixes (sound devices)
* rate-limited kprintf support (filesystem full console spams)
* msdosfs fixes
* Manual page work

Revision 1.29: download - view: text, markup, annotated - select for diffs
Sat Jul 28 23:24:32 2007 UTC (7 years, 1 month ago) by dillon
Branches: MAIN
CVS tags: DragonFly_RELEASE_1_12_Slip, DragonFly_RELEASE_1_12
Diff to: previous 1.28: preferred, unified
Changes since revision 1.28: +1 -0 lines
Add an ordering field to the interrupt config hook structure and adjust
CAM to place its config last.

Revision 1.28: download - view: text, markup, annotated - select for diffs
Tue May 1 02:29:31 2007 UTC (7 years, 3 months ago) by dillon
Branches: MAIN
Branch point for: DragonFly_RELEASE_1_10
Diff to: previous 1.27: preferred, unified
Changes since revision 1.27: +1 -1 lines
Move clock registration from before SMP startup to after.  APIC_IO builds
need the ioapic interrupt routing information from the mptable scan.

Revision 1.27: download - view: text, markup, annotated - select for diffs
Tue May 1 00:05:18 2007 UTC (7 years, 3 months ago) by dillon
Branches: MAIN
Diff to: previous 1.26: preferred, unified
Changes since revision 1.26: +1 -0 lines
Implement kern.do_async_attach. default disabled.  To enable add
kern.do_async_attach="1" to your /boot/loader.conf.  This feature allows
conforming drivers to attach in their own thread, allowing multiple
drivers to attach in parallel.

Implement a new device state, DS_INPROGRESS.  Seems to work properly.
Implement device_set_async_attach(), which allows a device's probe
function to indicate that it is ok for its attach function to be run in
its own thread.

Split tsleep's enable out from the 'cold' variable. tsleep works earlier
then when cold is cleared.  Add a 'tsleep_now_works' variable to take
over the functionality.

Implement DRIVERSLEEP()... similar to DELAY(), this function works in
any context and will call lwkt_switch() in its spin loop.  It isn't perfect
yet.

ATA/NATA:
    * Uses the new async attach feature
    * Uses DRIVERSLEEP
    * No longer uses a configuration interrupt hook.  Interrupts are now
      available during device config.

    NOTE: atapicam does not seem to be scanning the 'bus' (from cam's point
    of view), so 'cd0' is not found until CAM scans the bus itself in the
    interrupt config hook code.

USB:
    * Uses the new async attach feature
    * Uses tsleep instead of DELAY

MISC:
    * IF_EM, IF_NFE also use the async attach feature as a test, but it
      doesn't seem to have a huge effect.

Revision 1.26: download - view: text, markup, annotated - select for diffs
Mon Apr 30 07:18:56 2007 UTC (7 years, 3 months ago) by dillon
Branches: MAIN
Diff to: previous 1.25: preferred, unified
Changes since revision 1.25: +65 -34 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
Sat Dec 23 02:58:09 2006 UTC (7 years, 8 months ago) by swildner
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 -4 lines
Remove an #ifdef _KERNEL inside an #ifdef _KERNEL.

Revision 1.24: download - view: text, markup, annotated - select for diffs
Sat Dec 23 00:27:03 2006 UTC (7 years, 8 months ago) by swildner
Branches: MAIN
Diff to: previous 1.23: preferred, unified
Changes since revision 1.23: +2 -2 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
Sun Sep 3 17:43:59 2006 UTC (7 years, 11 months ago) by dillon
Branches: MAIN
Diff to: previous 1.22: preferred, unified
Changes since revision 1.22: +3 -3 lines
Rename functions to avoid conflicts with libc.

Revision 1.22: download - view: text, markup, annotated - select for diffs
Wed Aug 23 06:45:40 2006 UTC (8 years ago) by dillon
Branches: MAIN
Diff to: previous 1.21: preferred, unified
Changes since revision 1.21: +1 -0 lines
Bring in the initial cut of the Cache Coherency Management System module.
Add a sysctl kern.ccms_enable for testing.  CCMS operations are disabled by
default.

The comment below describes the whole enchillada.  Only basic locking has
been implemented in this commit.

CCMS is a duel-purpose cache management layer based around offset ranges.

#1 - Threads on the local machine can obtain shared, exclusive, and modifying
     range locks.  These work kinda like lockf locks and the kernel will use
     them to enforce UNIX I/O atomicy rules.

#2 - The BUF/BIO/VM system can manage the cache coherency state for offset
     ranges.  That is, Modified/Exclusive/Shared/Invalid (and two more
     advanced states).

     These cache states to not represent the state of data we have cached.
     Instead they represent the best case state of data we are allowed
     to cache within the range.

     The cache state for a single machine (i.e. no cluster), for every
     CCMS data set, would simply be 'Exclusive' or 'Modified' for the
     entire 64 bit offset range.

The way this works in general is that the locking layer is used to enforce
UNIX I/O atomicy rules locally and to generally control access on the local
machine.  The cache coherency layer would maintain the cache state for
the object's entire offset range.  The local locking layer would be used
to prevent demotion of the underlying cache state, and modifications to the
cache state might have the side effect of communicating with other machines
in the cluster.

Take a typical write().  The offset range in the file would first be locked,
then the underlying cache coherency state would be upgraded to Modified.
If the underlying cache state is not compatible with the desired cache
state then communication might occur with other nodes in the cluster in
order to gain exclusive access to the cache elements in question so they
can be upgraded to the desired state.  Once upgraded, the range lock
prevents downgrading until the operation completes.  This of course can
result in a deadlock between machines and deadlocks would have to be dealt
with.

Likewise, if a remote machine needs to upgrade its representation of
the cache state for a particular file it might have to communicate with
us in order to downgrade our cache state.  If a remote machine
needs an offset range to be Shared then we have to downgrade our
cache state for that range to Shared or Invalid.  This might have side
effects on us such as causing any dirty buffers or VM pages to be flushed
to disk.  If the remote machine needs to upgrade its cache state to
Exclusive then we have to downgrade ours to Invalid, resulting in a
flush and discard of the related buffers and VM pages.

Both range locks and range-based cache state is stored using a common
structure called a CST, in a red-black tree.  All operations are
approximately N*LOG(N).  CCMS uses a far superior algorithm to the one
that the POSIX locking code (lockf) has to use.

It is important to note that layer #2 cache state is fairly persistent
while layer #1 locks tend to be ephermal.  To prevent too much
fragmentation of the data space the cache state for adjacent elements
may have to be actively merged (either upgraded or downgraded to match).
The buffer cache and VM page caches are naturally fragmentory, but we
really do not want the CCMS representation to be too fragmented.  This
also gives us the opportunity to predispose our CCMS cache state so
I/O operations done on the local machine are not likely to require
communication with other hosts in the cluster.  The cache state as
stored in CCMS is a superset of the actual buffers and VM pages cached
on the local machine.

Revision 1.21: download - view: text, markup, annotated - select for diffs
Sun May 21 03:43:47 2006 UTC (8 years, 3 months ago) by dillon
Branches: MAIN
CVS tags: DragonFly_RELEASE_1_6_Slip, DragonFly_RELEASE_1_6
Diff to: previous 1.20: preferred, unified
Changes since revision 1.20: +11 -4 lines
Clean up more #include files.  Create an internal __boolean_t so two or
three sys/ header files don't have to juggle the type.  Use
_KERNEL_STRUCTURES in variuos pieces of user code that delve into kvm.

Reported-by: Rumko <rumcic@gmail.com>, walt <wa1ter@myrealbox.com>

Revision 1.20: download - view: text, markup, annotated - select for diffs
Sat May 20 02:42:13 2006 UTC (8 years, 3 months ago) by dillon
Branches: MAIN
Diff to: previous 1.19: preferred, unified
Changes since revision 1.19: +5 -0 lines
I'm growing tired of having to add #include lines for header files that
the include file(s) I really want depend on.

Go through nearly all major system include files and add appropriately
#ifndef'd #include lines to include all dependant header files.  Kernel
source files now only need to #include the header files they directly
depend on.

So, for example, if I wanted to add a SYSCTL to a kernel source file,
I would only have to #include <sys/sysctl.h> to bring in the support for
it, rather then four or five header files in addition to <sys/sysctl.h>.

Revision 1.18.2.1: download - view: text, markup, annotated - select for diffs
Tue Feb 28 21:47:58 2006 UTC (8 years, 5 months ago) by dillon
Branches: DragonFly_RELEASE_1_4
CVS tags: DragonFly_RELEASE_1_4_Slip
Diff to: previous 1.18: preferred, unified; next MAIN 1.19: preferred, unified
Changes since revision 1.18: +1 -0 lines
MFC the new random number generator entropy code from the commit on
"2006/01/25 11:56:31 PST".

Revision 1.19: download - view: text, markup, annotated - select for diffs
Wed Jan 25 19:56:23 2006 UTC (8 years, 7 months ago) by dillon
Branches: MAIN
Diff to: previous 1.18: preferred, unified
Changes since revision 1.18: +1 -0 lines
The random number generator was not generating sufficient entropy by
default, resulting in weak random numbers for a short period of time after
a machine is first booted.

* Change the entropy default for all interrupts except the clock interrupt
  from off to on.

* Greatly reduce the overhead of the interrupt entropy code so even high
  performance interrupts can call it.

* Instead of calculating the entropy at the time of the interrupt,
  introduce a new rate-limited kernel thread which the interrupt code can
  simply schedule.  The new thread will be responsible for adding the
  entropy.

  This thread will rate-limit based on the amount of entropy that has been
  built up.  The more entropy we have, the lower the thread's frequency of
  operation.  Currently the limit is set to 25 hz.

* Use the TSC in addition to the normal time calculation when introducing
  entropy.

Note that during tests it was found that a new ssh connection tends to
'eat' all available entropy.  This isn't actually true, it's really the
entropy calculation itself which is not quite correct, but I am duely noting
the issue here.

Reported-by: "Simon 'corecode' Schubert" <corecode@fs.ei.tum.de>

Revision 1.18: download - view: text, markup, annotated - select for diffs
Mon Nov 14 18:50:11 2005 UTC (8 years, 9 months ago) by dillon
Branches: MAIN
Branch point for: DragonFly_RELEASE_1_4
Diff to: previous 1.17: preferred, unified
Changes since revision 1.17: +1 -0 lines
Make tsleep/wakeup() MP SAFE for kernel threads and get us closer to
making it MP SAFE for user processes.  Currently the code is operating
under the rule that access to a thread structure requires cpu locality of
reference, and access to a proc structure requires the Big Giant Lock.  The
two are not mutually exclusive so, for example, tsleep/wakeup on a proc
needs both cpu locality of reference *AND* the BGL.  This was true with the
old tsleep/wakeup and has now been documented.

The new tsleep/wakeup algorithm is quite simple in concept.  Each cpu has its
own ident based hash table and each hash slot has a cpu mask which tells
wakeup() which cpu's might have the ident.  A wakeup iterates through all
candidate cpus simply by chaining the IPI message through them until either
all candidate cpus have been serviced, or (with wakeup_one()) the requested
number of threads have been woken up.

Other changes made in this patch set:

* The sense of P_INMEM has been reversed.  It is now P_SWAPPEDOUT.  Also,
  P_SWAPPING, P_SWAPINREQ are not longer relevant and have been removed.

* The swapping code has been cleaned up and seriously revamped.  The new
  swapin code staggers swapins to give the VM system a chance to respond
  to new conditions.  Also some lwp-related fixes were made (more
  p_rtprio vs lwp_rtprio confusion).

* As mentioned above, tsleep/wakeup have been rewritten.  The process
  p_stat no longer does crazy transitions from SSLEEP to SSTOP.  There is
  now only SSLEEP and SSTOP is synthesized from P_SWAPPEDOUT for userland
  consumpion.  Additionally, tsleep() with PCATCH will NO LONGER STOP THE
  PROCESS IN THE TSLEEP CALL.  Instead, the actual stop is deferred until
  the process tries to return to userland.  This removes all remaining cases
  where a stopped process can hold a locked kernel resource.

* A P_BREAKTSLEEP flag has been added.  This flag indicates when an event
  occurs that is allowed to break a tsleep with PCATCH.  All the weird
  undocumented setrunnable() rules have been removed and replaced with a
  very simple algorithm based on this flag.

* Since the UAREA is no longer swapped, we no longer faultin() on PHOLD().
  This also incidently fixes the 'ps' command's tendancy to try to swap
  all processes back into memory.

* speedup_syncer() no longer does hackish checks on proc0's tsleep channel
  (td_wchan).

* Userland scheduler acquisition and release has now been tightened up and
  KKASSERT's have been added (one of the bugs Stefan found was related
  to an improper lwkt_schedule() that was found by one of the new assertions).
  We also have added other assertions related to expected conditions.

* A serious race in pmap_release_free_page() has been corrected.  We
  no longer couple the object generation check with a failed
  pmap_release_free_page() call.  Instead the two conditions are checked
  independantly.  We no longer loop when pmap_release_free_page() succeeds
  (it is unclear how that could ever have worked properly).

Major testing by: Stefan Krueger <skrueger@meinberlikomm.de>

Revision 1.17: download - view: text, markup, annotated - select for diffs
Fri Jun 10 23:59:33 2005 UTC (9 years, 2 months ago) by dillon
Branches: MAIN
Diff to: previous 1.16: preferred, unified
Changes since revision 1.16: +5 -10 lines
spl->critical section conversion, plus remove some macros which are now
unused due the removal of spls.

Revision 1.16: download - view: text, markup, annotated - select for diffs
Wed Apr 20 17:57:16 2005 UTC (9 years, 4 months ago) by joerg
Branches: MAIN
Diff to: previous 1.15: preferred, unified
Changes since revision 1.15: +0 -1 lines
basetime should be static, all access done via PKI.

Revision 1.15: download - view: text, markup, annotated - select for diffs
Thu Apr 14 07:55:36 2005 UTC (9 years, 4 months ago) by joerg
Branches: MAIN
CVS tags: DragonFly_Stable
Diff to: previous 1.14: preferred, unified
Changes since revision 1.14: +0 -3 lines
Simplified NTP kernel interface:
- kern.ntp.delta gives the delta to apply (ns)
- kern.ntp.tick_delta is the correction applied in each tick (ns)
- kern.ntp.default_tick_delta is the default correction for each tick (ns)
- kern.ntp.big_delta is the threshold for kern.ntp.delta to use
  10x kern.ntp.default_tick_delta, not the normal value
- kern.ntp.adjust can be used to change the current value of kern.ntp.delta
  relatively.
- kern.ntp.next_leaf_second specifies the time_t of the next leaf second change,
  kern.ntp.insert_leaf_second != 0 means a leaf second is inserted, otherwise
  it is removed

All ntp_* variables are manipulated on CPU #0 with the exception of
set_timeofday. It just sets ntp_delta to 0, which is fine for the moment.

Revision 1.14: download - view: text, markup, annotated - select for diffs
Sat Mar 19 18:57:34 2005 UTC (9 years, 5 months ago) by swildner
Branches: MAIN
CVS tags: DragonFly_RELEASE_1_2_Slip, DragonFly_RELEASE_1_2
Diff to: previous 1.13: preferred, unified
Changes since revision 1.13: +1 -1 lines
Fix order for SI_SUB_TUNABLES.

Revision 1.13: download - view: text, markup, annotated - select for diffs
Fri Feb 4 02:55:38 2005 UTC (9 years, 6 months ago) by dillon
Branches: MAIN
Diff to: previous 1.12: preferred, unified
Changes since revision 1.12: +1 -0 lines
One of the last things the system does before it tries to mount root is
wait for interrupt-driven configuration hooks to finish.  This is one of
the common places where the system locks up due to e.g. blown interrupt
routing.

Wait up to 60 seconds for interrupt driven hooks to complete.  Generate
a warning every 10 seconds listing the hooks that have not yet completed.
Name all the hook structures to make the listing meaningful.  After 60
seconds, give up and continue booting.  The system might actually
be useable enough to aid in debugging depending on which device failed.

Revision 1.12: download - view: text, markup, annotated - select for diffs
Tue Feb 1 16:09:37 2005 UTC (9 years, 6 months ago) by hrs
Branches: MAIN
Diff to: previous 1.11: preferred, unified
Changes since revision 1.11: +1 -0 lines
- Nuke #ifdef SCOPEDROUTING.  It was never enabled and is useless now[1].
- Add in6_domifattach(), in6_domifdetach(), and ifp->if_afdata[2].
- ANSIfy.

Obtained from:	KAME via FreeBSD
References (FreeBSD):

	net/
	if.c		1.168[2]
	if_var.h	1.59[2]

	netinet/
	icmp6.h		1.12[2]
	tcp_input.c	1.209[2]

	netinet6/
	icmp6.c		1.38[1], 1.39[2]
	in6.c		1.30[1], 1.31[2]
	ip6_forward.c	1.20[1]
	in6_gif.c	1.15[1]
	in6_proto.c	1.25[2]
	in6_ifattach.c	1.17[1], 1.18[2]
	ip6_input.c	1.53[1], 1.57[2]
	ip6_output.c	1.58[1], 1.59[2]
	in6_src.c	1.14[2]
	in6_var.h	1.14[2]
	nd6.c		1.30[1], 1.32[2]
	nd6.h		1.13[2]
	nd6_nbr.c	1.19[2]
	nd6_rtr.c	1.20[2]
	scope6.c	1.8[2]
	scope6_var.h	1.3[2]

	sys/
	domain.h	1.18[2]
	kernel.h	1.113[2]

Revision 1.11: download - view: text, markup, annotated - select for diffs
Tue Mar 30 17:18:58 2004 UTC (10 years, 4 months ago) by joerg
Branches: MAIN
CVS tags: DragonFly_Snap29Sep2004, DragonFly_Snap13Sep2004, DragonFly_1_0_REL, DragonFly_1_0_RC1, DragonFly_1_0A_REL
Diff to: previous 1.10: preferred, unified
Changes since revision 1.10: +1 -0 lines
Add SI_SUB_LOCK as sysinit priority for the initialisation of tokens and
lockmgr locks. This priority should not be abused, since it is higher then
SI_SUB_VM.

Revision 1.10: download - view: text, markup, annotated - select for diffs
Mon Mar 1 06:33:19 2004 UTC (10 years, 5 months ago) by dillon
Branches: MAIN
Diff to: previous 1.9: preferred, unified
Changes since revision 1.9: +1 -0 lines
Newtoken commit.  Change the token implementation as follows:  (1) Obtaining
a token no longer enters a critical section.  (2) tokens can be held through
schedular switches and blocking conditions and are effectively released and
reacquired on resume.  Thus tokens serialize access only while the thread
is actually running.  Serialization is not broken by preemptive interrupts.
That is, interrupt threads which preempt do no release the preempted thread's
tokens.  (3) Unlike spl's, tokens will interlock w/ interrupt threads on
the same or on a different cpu.

The vnode interlock code has been rewritten and the API has changed.  The
mountlist vnode scanning code has been consolidated and all known races have
been fixed.  The vnode interlock is now a pool token.

The code that frees unreferenced vnodes whos last VM page has been freed has
been moved out of the low level vm_page_free() code and moved to the
periodic filesystem sycer code in vfs_msycn().

The SMP startup code and the IPI code has been cleaned up considerably.
Certain early token interactions on AP cpus have been moved to the BSP.

The LWKT rwlock API has been cleaned up and turned on.

Major testing by: David Rhodus

Revision 1.9: download - view: text, markup, annotated - select for diffs
Wed Feb 25 17:38:51 2004 UTC (10 years, 6 months ago) by joerg
Branches: MAIN
Diff to: previous 1.8: preferred, unified
Changes since revision 1.8: +4 -4 lines
Remove parameter names.

Submitted by Chris Pressey <cpressey@catseye.mine.nu>

Revision 1.8: download - view: text, markup, annotated - select for diffs
Fri Jan 30 05:42:17 2004 UTC (10 years, 6 months ago) by dillon
Branches: MAIN
Diff to: previous 1.7: preferred, unified
Changes since revision 1.7: +5 -3 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.7: download - view: text, markup, annotated - select for diffs
Sat Nov 22 19:30:57 2003 UTC (10 years, 9 months ago) by asmodai
Branches: MAIN
Diff to: previous 1.6: preferred, unified
Changes since revision 1.6: +1 -1 lines
Properly spell compatible and compatibility.

Revision 1.6: download - view: text, markup, annotated - select for diffs
Mon Nov 10 06:12:17 2003 UTC (10 years, 9 months ago) by dillon
Branches: MAIN
Diff to: previous 1.5: preferred, unified
Changes since revision 1.5: +1 -1 lines
Fully synchronize sys/boot from FreeBSD-5.x, but add / to the module path
so /kernel will be found and loaded instead of /boot/kernel.  This will
give us all the capabilities of the FreeBSD-5 boot code including AMD64 and
ELF64 support.

As part of this work, rather then try to adjust ufs/fs.h and friends to get
UFS2 info I instead copied the fs.h and friends from FreeBSD-5 into the
sys/boot subtree

Additionally, import Peter Wemm's linker set improvements from FreeBSD-5.x.
They happen to be compatible with GCC 2.95.x and it allows very few changes
to be made to the boot code.

Additionally import a number of other elements from FreeBSD-5 including
sys/diskmbr.h separation.

Revision 1.5: download - view: text, markup, annotated - select for diffs
Wed Sep 24 18:37:51 2003 UTC (10 years, 11 months ago) by dillon
Branches: MAIN
Diff to: previous 1.4: preferred, unified
Changes since revision 1.4: +1 -0 lines
Clean up thread priority and critical section handling during boot.  The
initial kernel threads (e.g. thread0/proc0) had a priority lower then userland!
Default them to the minimum kernel thread priority.

Thread0 was also unnecessarily left in a critical section, which prevented
certain device probes, such as the APIC 8254 timer test code, from working.

Revision 1.4: download - view: text, markup, annotated - select for diffs
Wed Aug 20 07:31:21 2003 UTC (11 years ago) by rob
Branches: MAIN
Diff to: previous 1.3: preferred, unified
Changes since revision 1.3: +6 -6 lines
__P() != wanted, begin removal, in order to preserve white space this needs
to be done by hand, as I accidently killed a source tree that I had gotten
this far on. I'm committing this now, LINT and GENERIC both build with
these changes, there are many more to come.

Revision 1.3: download - view: text, markup, annotated - select for diffs
Thu Jul 31 12:01:37 2003 UTC (11 years ago) by hmp
Branches: MAIN
Diff to: previous 1.2: preferred, unified
Changes since revision 1.2: +2 -3 lines
Generalise, and remove SI_SUB_VINUM; use SI_SUB_RAID instead.

Revision 1.2: download - view: text, markup, annotated - select for diffs
Tue Jun 17 04:28:58 2003 UTC (11 years, 2 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:51 2003 UTC (11 years, 2 months ago) by dillon
Branches: MAIN
CVS tags: FREEBSD_4_FORK
import from FreeBSD RELENG_4 1.63.2.9

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