Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/net/npf Skip npf_config_sync if nothing to do.
details: https://anonhg.NetBSD.org/src/rev/85e7f2b926dc
branches: trunk
changeset: 1005589:85e7f2b926dc
user: riastradh <riastradh%NetBSD.org@localhost>
date: Sat Dec 14 15:21:51 2019 +0000
description:
Skip npf_config_sync if nothing to do.
Saves an unnecessary pserialize_perform every second.
diffstat:
sys/net/npf/npf_conndb.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diffs (21 lines):
diff -r 5c3cb959540d -r 85e7f2b926dc sys/net/npf/npf_conndb.c
--- a/sys/net/npf/npf_conndb.c Sat Dec 14 15:08:45 2019 +0000
+++ b/sys/net/npf/npf_conndb.c Sat Dec 14 15:21:51 2019 +0000
@@ -46,7 +46,7 @@
#ifdef _KERNEL
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: npf_conndb.c,v 1.6 2019/07/23 00:52:01 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: npf_conndb.c,v 1.7 2019/12/14 15:21:51 riastradh Exp $");
#include <sys/param.h>
#include <sys/types.h>
@@ -371,7 +371,7 @@
* Note: drop the conn_lock (see the lock order).
*/
gcref = thmap_stage_gc(cd->cd_map);
- if (sync) {
+ if (sync && (gcref || !LIST_EMPTY(&cd->cd_gclist))) {
npf_config_enter(npf);
npf_config_sync(npf);
npf_config_exit(npf);
Home |
Main Index |
Thread Index |
Old Index