Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/pci Remove WQ_PERCPU flag for the workqueue that doe...
details: https://anonhg.NetBSD.org/src/rev/c47f1e321eb7
branches: trunk
changeset: 745203:c47f1e321eb7
user: yamaguchi <yamaguchi%NetBSD.org@localhost>
date: Tue Feb 25 07:05:57 2020 +0000
description:
Remove WQ_PERCPU flag for the workqueue that does configurations
such as link up and down
And added kpreempt_disable and kpreempt_enable around
workqueue_enqueue to call it in non-WQ_PERCPU thread context.
pointed out and reviewed by knakahara@n.o., thanks.
diffstat:
sys/dev/pci/if_ixl.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diffs (37 lines):
diff -r fcbc9822d318 -r c47f1e321eb7 sys/dev/pci/if_ixl.c
--- a/sys/dev/pci/if_ixl.c Tue Feb 25 07:00:26 2020 +0000
+++ b/sys/dev/pci/if_ixl.c Tue Feb 25 07:05:57 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_ixl.c,v 1.43 2020/02/25 07:00:26 yamaguchi Exp $ */
+/* $NetBSD: if_ixl.c,v 1.44 2020/02/25 07:05:57 yamaguchi Exp $ */
/*
* Copyright (c) 2013-2015, Intel Corporation
@@ -74,7 +74,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_ixl.c,v 1.43 2020/02/25 07:00:26 yamaguchi Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_ixl.c,v 1.44 2020/02/25 07:05:57 yamaguchi Exp $");
#ifdef _KERNEL_OPT
#include "opt_net_mpsafe.h"
@@ -1341,7 +1341,7 @@
snprintf(xnamebuf, sizeof(xnamebuf), "%s_wq_cfg", device_xname(self));
sc->sc_workq = ixl_workq_create(xnamebuf, IXL_WORKQUEUE_PRI,
- IPL_NET, WQ_PERCPU | WQ_MPSAFE);
+ IPL_NET, WQ_MPSAFE);
if (sc->sc_workq == NULL)
goto teardown_sysctls;
@@ -6642,7 +6642,9 @@
if (atomic_cas_uint(&work->ixw_added, 0, 1) != 0)
return;
+ kpreempt_disable();
workqueue_enqueue(wq, &work->ixw_cookie, NULL);
+ kpreempt_enable();
}
static void
Home |
Main Index |
Thread Index |
Old Index