Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-9]: src/sys/kern Pull up following revision(s) (requested by ad i...
details: https://anonhg.NetBSD.org/src/rev/dc380ae29063
branches: netbsd-9
changeset: 843669:dc380ae29063
user: martin <martin%NetBSD.org@localhost>
date: Thu Dec 12 20:43:08 2019 +0000
description:
Pull up following revision(s) (requested by ad in ticket #546):
sys/kern/kern_resource.c: revision 1.183
sys/kern/kern_softint.c: revision 1.49
calcru: ignore running softints, unless softint_timing is on.
Fixes crazy times reported for proc0.
diffstat:
sys/kern/kern_resource.c | 8 +++++---
sys/kern/kern_softint.c | 12 +++++++-----
2 files changed, 12 insertions(+), 8 deletions(-)
diffs (77 lines):
diff -r 0348c3ba78e3 -r dc380ae29063 sys/kern/kern_resource.c
--- a/sys/kern/kern_resource.c Thu Dec 12 12:27:13 2019 +0000
+++ b/sys/kern/kern_resource.c Thu Dec 12 20:43:08 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: kern_resource.c,v 1.182 2019/04/05 00:33:21 mlelstv Exp $ */
+/* $NetBSD: kern_resource.c,v 1.182.4.1 2019/12/12 20:43:08 martin Exp $ */
/*-
* Copyright (c) 1982, 1986, 1991, 1993
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_resource.c,v 1.182 2019/04/05 00:33:21 mlelstv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_resource.c,v 1.182.4.1 2019/12/12 20:43:08 martin Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -506,7 +506,8 @@
LIST_FOREACH(l, &p->p_lwps, l_sibling) {
lwp_lock(l);
bintime_add(&tm, &l->l_rtime);
- if ((l->l_pflag & LP_RUNNING) != 0) {
+ if ((l->l_pflag & LP_RUNNING) != 0 &&
+ (l->l_pflag & (LP_INTR | LP_TIMEINTR)) != LP_INTR) {
struct bintime diff;
/*
* Adjust for the current time slice. This is
@@ -516,6 +517,7 @@
* error.
*/
binuptime(&diff);
+ membar_consumer(); /* for softint_dispatch() */
bintime_sub(&diff, &l->l_stime);
bintime_add(&tm, &diff);
}
diff -r 0348c3ba78e3 -r dc380ae29063 sys/kern/kern_softint.c
--- a/sys/kern/kern_softint.c Thu Dec 12 12:27:13 2019 +0000
+++ b/sys/kern/kern_softint.c Thu Dec 12 20:43:08 2019 +0000
@@ -1,7 +1,7 @@
-/* $NetBSD: kern_softint.c,v 1.47 2019/05/17 03:34:26 ozaki-r Exp $ */
+/* $NetBSD: kern_softint.c,v 1.47.2.1 2019/12/12 20:43:08 martin Exp $ */
/*-
- * Copyright (c) 2007, 2008 The NetBSD Foundation, Inc.
+ * Copyright (c) 2007, 2008, 2019 The NetBSD Foundation, Inc.
* All rights reserved.
*
* This code is derived from software contributed to The NetBSD Foundation
@@ -170,7 +170,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_softint.c,v 1.47 2019/05/17 03:34:26 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_softint.c,v 1.47.2.1 2019/12/12 20:43:08 martin Exp $");
#include <sys/param.h>
#include <sys/proc.h>
@@ -868,14 +868,16 @@
timing = (softint_timing ? LP_TIMEINTR : 0);
l->l_switchto = pinned;
l->l_stat = LSONPROC;
- l->l_pflag |= (LP_RUNNING | timing);
/*
* Dispatch the interrupt. If softints are being timed, charge
* for it.
*/
- if (timing)
+ if (timing) {
binuptime(&l->l_stime);
+ membar_producer(); /* for calcru */
+ }
+ l->l_pflag |= (LP_RUNNING | timing);
softint_execute(si, l, s);
if (timing) {
binuptime(&now);
Home |
Main Index |
Thread Index |
Old Index