OpenBSD CVS

CVS log for src/sys/kern/Attic/kern_workq.c


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

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.18, Tue Jan 27 10:18:31 2015 UTC (9 years, 4 months ago) by dlg
Branch: MAIN
CVS Tags: HEAD
Changes since 1.17: +1 -1 lines
FILE REMOVED

remove workq code. its been replaced with tasks.

it has been unused since december, and unhooked from the build since
christmas.

ok krw@

Revision 1.17 / (download) - annotate - [select for diffs], Sat Nov 1 23:58:28 2014 UTC (9 years, 7 months ago) by tedu
Branch: MAIN
Changes since 1.16: +3 -3 lines
Diff to previous 1.16 (colored)

add a few sizes to free

Revision 1.16 / (download) - annotate - [select for diffs], Wed Oct 8 15:28:39 2014 UTC (9 years, 8 months ago) by blambert
Branch: MAIN
Changes since 1.15: +2 -1 lines
Diff to previous 1.15 (colored)

make workq/taskq runner threads yield when they've hogged the cpu

ok deraadt@ dlg@ phessler@

Revision 1.15 / (download) - annotate - [select for diffs], Sat Jul 12 18:43:32 2014 UTC (9 years, 11 months ago) by tedu
Branch: MAIN
CVS Tags: OPENBSD_5_6_BASE, OPENBSD_5_6
Changes since 1.14: +3 -3 lines
Diff to previous 1.14 (colored)

add a size argument to free. will be used soon, but for now default to 0.
after discussions with beck deraadt kettenis.

Revision 1.14 / (download) - annotate - [select for diffs], Tue Nov 26 20:33:19 2013 UTC (10 years, 6 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_5_5_BASE, OPENBSD_5_5
Changes since 1.13: +2 -2 lines
Diff to previous 1.13 (colored)

1 << 31 cleanup.  Eitan Adler pointed out that there has been a
resurrection of the bad idiom in the tree.
sufficient review by miod, kettenis, tedu

Revision 1.13 / (download) - annotate - [select for diffs], Mon Nov 18 20:21:51 2013 UTC (10 years, 6 months ago) by deraadt
Branch: MAIN
Changes since 1.12: +2 -2 lines
Diff to previous 1.12 (colored)

simplify kthread_create(). no more stdarg
ok matthew guenther mikeb

Revision 1.12 / (download) - annotate - [select for diffs], Mon Aug 23 04:49:10 2010 UTC (13 years, 9 months ago) by dlg
Branch: MAIN
CVS Tags: OPENBSD_5_4_BASE, OPENBSD_5_4, OPENBSD_5_3_BASE, OPENBSD_5_3, OPENBSD_5_2_BASE, OPENBSD_5_2, OPENBSD_5_1_BASE, OPENBSD_5_1, OPENBSD_5_0_BASE, OPENBSD_5_0, OPENBSD_4_9_BASE, OPENBSD_4_9
Changes since 1.11: +53 -27 lines
Diff to previous 1.11 (colored)

fix two problems identified by matthew@:

1. though shalt not hold a mutex while sleeping, which kthread_create can
do. instead of holding the wq mutex over the kthread_create and increasing
the number of running threads after kthread_create succeeds, this counts
the thread and drops the mutex before kthread_create. after the call it
takes the mutex again and decrements the number of threads if the call
failed.

2. if a workq is created during autoconf, the actual thread create
is deferred to when the scheduler is running. if the workq is
destroyed before then, the wq memory gets freed and then the deferred
thread creation will be using freed memory. we now have a workq
state variable so we can do the right thing at the different stages
of the workqs lifetime.

ok matthew@

Revision 1.11 / (download) - annotate - [select for diffs], Wed Sep 2 14:05:05 2009 UTC (14 years, 9 months ago) by dlg
Branch: MAIN
CVS Tags: OPENBSD_4_8_BASE, OPENBSD_4_8, OPENBSD_4_7_BASE, OPENBSD_4_7
Changes since 1.10: +20 -16 lines
Diff to previous 1.10 (colored)

when you add a task to a workq, it allocates memory to handle the
task and shove it on a list. allocations can fail, so if something
that wants to run a task later already has memory to handle the
workq task then let it provide it via a new function called
workq_queue_task.

ok kettenis@

Revision 1.10 / (download) - annotate - [select for diffs], Wed Jun 24 14:56:41 2009 UTC (14 years, 11 months ago) by jsg
Branch: MAIN
CVS Tags: OPENBSD_4_6_BASE, OPENBSD_4_6
Changes since 1.9: +2 -2 lines
Diff to previous 1.9 (colored)

Remove a semicolon at the end of an if statement that made the thread
waiting for all the workqs to die wakeup more often than
it should have.

ok dlg@ tedu@

Revision 1.9 / (download) - annotate - [select for diffs], Thu Oct 30 23:55:22 2008 UTC (15 years, 7 months ago) by dlg
Branch: MAIN
CVS Tags: OPENBSD_4_5_BASE, OPENBSD_4_5
Changes since 1.8: +61 -45 lines
Diff to previous 1.8 (colored)

reintroduce mutexes to workqs for locking.

tested by many on many archs including several alpha test.

ok tedu@ go for it deraadt@

Revision 1.8 / (download) - annotate - [select for diffs], Mon Oct 27 02:13:34 2008 UTC (15 years, 7 months ago) by dlg
Branch: MAIN
Changes since 1.7: +0 -1 lines
Diff to previous 1.7 (colored)

when shutting workq threads down, dont try to take the big kernel
lock when we've never given it up. this is a remnant of the mpsafe
workq stuff we had that wasnt cleaned up properly.

found by and fix tested by oga@

Revision 1.7 / (download) - annotate - [select for diffs], Fri Feb 15 04:08:36 2008 UTC (16 years, 3 months ago) by tedu
Branch: MAIN
CVS Tags: OPENBSD_4_4_BASE, OPENBSD_4_4, OPENBSD_4_3_BASE, OPENBSD_4_3
Changes since 1.6: +18 -23 lines
Diff to previous 1.6 (colored)

revert to a pre-mutex state.  for unknown reasons, the mutexes do not provide
sufficient exclusion on alpha, leading to self-locking panics.

Revision 1.6 / (download) - annotate - [select for diffs], Thu Dec 13 05:55:13 2007 UTC (16 years, 6 months ago) by tedu
Branch: MAIN
Changes since 1.5: +23 -27 lines
Diff to previous 1.5 (colored)

use a mutex to protect workq.  incidentally, this removes the additional
creation of threads which may have caused multile syswq threads to start.
ok dlg

Revision 1.5 / (download) - annotate - [select for diffs], Wed Nov 28 13:54:07 2007 UTC (16 years, 6 months ago) by tedu
Branch: MAIN
Changes since 1.4: +1 -5 lines
Diff to previous 1.4 (colored)

remove the DIRECTOK flag.  the caller semantics were too weird, and it's a
bad idea to have functions that react unpredictably.

Revision 1.4 / (download) - annotate - [select for diffs], Sun Nov 25 15:56:17 2007 UTC (16 years, 6 months ago) by tedu
Branch: MAIN
Changes since 1.3: +7 -2 lines
Diff to previous 1.3 (colored)

convert crypto thread to workq.  add WQ_DIRECTOK flag to workq.
combined, this lets us use crypto before the thread is running
and therefore cryptoraid can attach nice and early.
ok/testing deraadt mbalmer marco

Revision 1.3 / (download) - annotate - [select for diffs], Mon Jun 11 22:15:11 2007 UTC (17 years ago) by thib
Branch: MAIN
CVS Tags: OPENBSD_4_2_BASE, OPENBSD_4_2
Changes since 1.2: +1 -2 lines
Diff to previous 1.2 (colored)

kill unneeded include;
(stdarg.h, leftover from the vararg's idea).

ok tedu@

Revision 1.2 / (download) - annotate - [select for diffs], Thu May 31 21:33:07 2007 UTC (17 years ago) by tedu
Branch: MAIN
Changes since 1.1: +4 -4 lines
Diff to previous 1.1 (colored)

switch the flags argument to the front, requested by art
ok dlg

Revision 1.1 / (download) - annotate - [select for diffs], Thu May 31 18:16:59 2007 UTC (17 years ago) by dlg
Branch: MAIN

add an interface for work queues run from a kernel thread.

this type of code is implemented many times already in the kernel, this is
a generic version of all those replicated code bases.

originally from tedu@
ok tedu@ tom@ deraadt@

This form allows you to request diff's 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.