Age | Commit message (Collapse) | Author |
|
* workqueue.c: (work_queue_run) Err more on the side of keeping granularity
down, by being more conservative about increasing it.
Also, fix mispelling.
|
|
* lib/workqueue.c: free-ing workqueues had never been tested obviously,
queue's thread was not being stopped
* bgpd/bgpd.c: null out freed workqueues, to prevent acting on freed
workqueues
|
|
|
|
existing static routes to be revalidated)
|
|
2006-03-30 Paul Jakma <paul.jakma@sun.com>
* workqueue.c: (work_queue_run) fix line length of comment
|
|
2006-02-02 Paul Jakma <paul.jakma@sun.com>
* workqueue.h: (struct work_queue) Remove the delay field.
It served no purpose and just introduced bad behaviour.
Should be excised before its allowed to escape into 1.0.
This removes need for the 'flood' and runs_since_clear
fields.
* workqueue.c: (general) excise delay factor between queue
runs, hence the 'flood' crap too.. See above.
* bgp_route.c: (bgp_{clear_node,process}_queue_init) delay
field is removed from workqueue spec.
|
|
2005-11-14 Paul Jakma <paul.jakma@sun.com>
* (general) pass struct work-queue to callback functions.
* workqueue.h: (struct work_queue) move the state flag
variables to end.
Add an opaque pointer to spec, for user-data global to the
queue.
Pass reference to work_queue to all callbacks.
* workqueue.c: (work_queue_item_remove) pass ref to workqueue
to user callbacks.
(work_queue_run) ditto.
|
|
* (general) Add state to detect queue floods. There's no sense
trying to be sparing of CPU resources, if the queue is
flooding and using ever more memory resources. we should just
get on with clearing the queue.
The sense of delay and hold were wrong way around, fix.
* workqueue.h: (struct work_queue) Add status bitfield. Add
'flood' integer to workqueue spec. Add runs_since_clear
counter to workqueue.
* workqueue.c: (work_queue_new) set defaults for delay, hold
and flood.
(work_queue_add) initial schedule should use delay, not hold.
(show_work_queues) Print flood field, conserve whitespace.
(work_queue_unplug) use delay, not hold.
(work_queue_run) consecutive runs should be seperated by hold
time, not delay.
Keep track of number of consecutive runs, go into 'overdrive'
if queue is being flooded, we can't avoid making heavy use of
resources, better to use CPU than ever more RAM.
|
|
* workqueue.h: Add a WQ_QUEUE_BLOCKED item_status return code,
to allow a queue function to indicate the queue is not
ready/blocked - rather than any problem with the item at hand.
Add a notion of being able to 'plug' and 'unplug' a queue.
Add helpers to plug/unplug a queue.
Add a completion callback, to be called when a queue is emptied.
* workqueue.c: (work_queue_new) remove useless list_free.
(work_queue_schedule) new internal helper function to schedule
queue, if appropriate.
(work_queue_add) use work_queue_schedule
(show_work_queues) Print 'P' if queue is plugged.
(work_queue_plug) new API function, plug a queue - ie prevent it
from 'drained' / processed / scheduled.
(work_queue_unplug) unplug a queue, allowing it to be drained
/ scheduled / processed again.
(work_queue_run) Add support for WQ_QUEUE_BLOCKED.
Add comment for RETRY_NOW case.
Make hysteris more aggresive in ramping up granularity, improves
performance significantly.
Add support for calling completion callback when queue is emptied,
possibly useful for knowing when to unplug a queue.
|
|
* workqueue.c (show_work_queues): Remove unused gettimeofday call.
|
|
* workqueue.h: (struct work_queue_item) change retry_count to ran,
its a count of number item has been run.
* workqueue.c: (show_work_queues) Fix formating of slightly
bugfix: fix SIGFPE if wq->runs is 0.
(work_queue_run) retry logic was slightly wrong.
cycles.best is 0 initialy, granularity is 1, so update best
if cycles >= granularity, not just >.
|
|
* workqueue.{c,h}: Helper API for setting up and running queues via
background threads.
* command.c: install the 'show workqueues' command
* memtypes.c: Add work queue mtypes, and a rib-queue type for
a zebra rib work queue.
* memtypes.h: Updated to match memtypes.c
* Makefile.am: Add new workqueue files to build.
|