diff options
author | David Gwynne <dlg@cvs.openbsd.org> | 2015-02-09 03:15:42 +0000 |
---|---|---|
committer | David Gwynne <dlg@cvs.openbsd.org> | 2015-02-09 03:15:42 +0000 |
commit | 24ad848078fcf32ba92421894c27fa8abb452209 (patch) | |
tree | 310b78e8bbf34ba1ceab66cfc2bd1afacecde97b /sys/crypto | |
parent | b0353336ff6ce726e4e5366de313c7cbf62de3c1 (diff) |
we want to defer work traditionally (in openbsd) handled in an
interrupt context to a taskq running in a thread. however, there
is a concern that if we do that then we allow accidental use of
sleeping APIs in this work, which will make it harder to move the
work back to interrupts in the future.
guenther and kettenis came up with the idea of marking a proc with
CANTSLEEP which the sleep paths can check and panic on.
this builds on that so you create taskqs that run with CANTSLEEP
set except when they need to sleep for more tasks to run.
the taskq_create api is changed to take a flags argument so users
can specify CANTSLEEP. MPSAFE is also passed via this flags field
now. this means archs that defined IPL_MPSAFE to 0 can now create
mpsafe taskqs too.
lots of discussion at s2k15
ok guenther@ miod@ mpi@ tedu@ pelikan@
Diffstat (limited to 'sys/crypto')
-rw-r--r-- | sys/crypto/crypto.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/crypto/crypto.c b/sys/crypto/crypto.c index 88c6ec51960..8ab5563e9a9 100644 --- a/sys/crypto/crypto.c +++ b/sys/crypto/crypto.c @@ -1,4 +1,4 @@ -/* $OpenBSD: crypto.c,v 1.73 2015/01/27 03:17:35 dlg Exp $ */ +/* $OpenBSD: crypto.c,v 1.74 2015/02/09 03:15:41 dlg Exp $ */ /* * The author of this code is Angelos D. Keromytis (angelos@cis.upenn.edu) * @@ -495,7 +495,7 @@ crypto_getreq(int num) void crypto_init(void) { - crypto_taskq = taskq_create("crypto", 1, IPL_VM); + crypto_taskq = taskq_create("crypto", 1, IPL_VM, 0); pool_init(&cryptop_pool, sizeof(struct cryptop), 0, 0, 0, "cryptop", NULL); |