Commit Graph

20 Commits

Author SHA1 Message Date
thorpej 1b84adbe5f New callout implementation. This is based on callwheel implementation
done by Artur Grabowski and Thomas Nordin for OpenBSD, which is more
efficient in several ways than the callwheel implementation that it is
replacing.  It has been adapted to our pre-existing callout API, and
also provides the slightly more efficient (and much more intuitive)
API (adapted to the callout_*() naming scheme) that the OpenBSD version
provides.

Among other things, this shaves a bunch of cycles off rescheduling-in-
the-future a callout which is already scheduled, which the common case
for TCP timers (notably REXMT and KEEP).

The API has been simplified a bit, as well.  The (very confusing to
a good many people) "ACTIVE" state for callouts has gone away.  There
is now only "PENDING" (scheduled to fire in the future) and "EXPIRED"
(has fired, and the function called).

Kernel version bump not done; we'll ride the 1.6N bump that happened
with the malloc(9) change.
2003-02-04 01:21:03 +00:00
pk 58005dc9d3 Zombie procs have no lwps. 2003-01-23 12:41:33 +00:00
thorpej b78f59b443 Merge the nathanw_sa branch. 2003-01-18 08:51:40 +00:00
scw a82718b34d Casting from a pointer, to a db_expr_t, has to go via an intptr_t.
(db_expr_t == int64_t on sh5, for example).
2002-08-26 11:34:27 +00:00
simonb 4eaa4d66a8 ANSIfy, KNF.
Make some variables and functions static when not used outside of a module.
Make variables in headers extern.
Delete the unused db_find_watchpoint() function.
2002-02-15 07:33:48 +00:00
lukem 1ac69d9cb3 add RCSIDs 2001-11-12 22:54:03 +00:00
chs 3fb05f05f8 use a for loop instead of goto. 2001-09-15 18:20:53 +00:00
thorpej 16c229ea7c Optimization suggested by Bill Sommerfeld: Keep a hint as to the
"earliest" firing callout in a bucket.  This allows us to skip
the scan up the bucket if no callouts are due in the bucket.

A cheap O(1) hint update is done at callout insertion (if new callout
is earlier than hint) and removal (is bucket empty).  A thorough
refresh of the hint is done when the bucket is traversed.

This doesn't matter much on machines with small values of hz
(e.g. i386), but on systems with large values of hz (e.g. Alpha),
it has a definite positive effect.

Also, keep the callwheel stats in evcnts, so that you can view them
with "vmstat -e".
2001-09-11 04:32:19 +00:00
atatat 124ae5b65c Add an easy way to dump the message buffer from ddb. 2001-07-31 04:28:16 +00:00
thorpej 366b23111a Make sure values for a %llx are long long. 2000-11-28 21:44:34 +00:00
eeh 6a7e0164dd Implement db_show_callout() again. 2000-11-28 19:20:37 +00:00
jhawk f3528d725d Interface change: db_printsym() takes a third argument, pr, a function
pointer indicating how to print the symbol. This allows db_printsym()
to called in places where db_printf() is not an appropriate output
function.

While straightforward, apologies in advance if I've introduced any minor
syntax errors; I was unable to test compilation this on all the affected
platforms.
2000-05-25 19:57:30 +00:00
kleink 8abfe24915 Cast timeval members to types we know the printf conversions of. 2000-03-26 20:24:12 +00:00
thorpej fc96443d15 New callout mechanism with two major improvements over the old
timeout()/untimeout() API:
- Clients supply callout handle storage, thus eliminating problems of
  resource allocation.
- Insertion and removal of callouts is constant time, important as
  this facility is used quite a lot in the kernel.

The old timeout()/untimeout() API has been removed from the kernel.
2000-03-23 07:01:25 +00:00
thorpej 40c08923a8 XXX LOCKING XXX of allproc; DDB runs with interrupts blocked, and MD
code should suspend other processors, so this probably isn't a problem,
but the comment is added anyhow.
1999-07-22 21:11:26 +00:00
thorpej 970e60efb8 - Use proclists[], rather than checking allproc and zombproc explicitly.
- Add some comments about locking.
1998-09-08 23:50:13 +00:00
eeh a2dd74ed79 Merge paddr_t changes into the main branch. 1998-08-13 02:10:37 +00:00
ross 9b463a1108 Print more info on ps/w, note the current proc, and properly declare db_maxoff. 1998-01-31 04:14:46 +00:00
chuck e0ced7363a fix printf formatting of "ps" (aka "show all proc") so that lines never
overflow (always hated that).

replaced "/m" flag with:
	/a == show process address info
	/n == show normal process info [currently the default]
	/w == show process wait/emul info
1997-10-24 18:26:36 +00:00
gwr 25bdbcc1dc Move some DDB stuff here from kern_clock.c and kern_proc.c 1997-05-21 19:54:00 +00:00