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 kami...



details:   https://anonhg.NetBSD.org/src/rev/d178f040ea95
branches:  netbsd-9
changeset: 962760:d178f040ea95
user:      martin <martin%NetBSD.org@localhost>
date:      Tue Aug 06 16:16:55 2019 +0000

description:
Pull up following revision(s) (requested by kamil in ticket #20):

        sys/kern/kern_proc.c: revision 1.234

Update our vm resource use for sysctl(3) call reading kinfo_proc*

Without this change RSS properties are zeroed unless a process exits or
calls getrusage(2).

diffstat:

 sys/kern/kern_proc.c |  6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diffs (27 lines):

diff -r c7d5178f97e5 -r d178f040ea95 sys/kern/kern_proc.c
--- a/sys/kern/kern_proc.c      Tue Aug 06 16:14:33 2019 +0000
+++ b/sys/kern/kern_proc.c      Tue Aug 06 16:16:55 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kern_proc.c,v 1.233 2019/06/11 23:18:55 kamil Exp $    */
+/*     $NetBSD: kern_proc.c,v 1.233.2.1 2019/08/06 16:16:55 martin Exp $       */
 
 /*-
  * Copyright (c) 1999, 2006, 2007, 2008 The NetBSD Foundation, Inc.
@@ -62,7 +62,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_proc.c,v 1.233 2019/06/11 23:18:55 kamil Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_proc.c,v 1.233.2.1 2019/08/06 16:16:55 martin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_kstack.h"
@@ -1819,6 +1819,8 @@
 
                if (buflen >= elem_size &&
                    (type == KERN_PROC || elem_count > 0)) {
+                       ruspace(p);     /* Update process vm resource use */
+
                        if (type == KERN_PROC) {
                                fill_proc(p, &kbuf->kproc.kp_proc, allowaddr);
                                fill_eproc(p, &kbuf->kproc.kp_eproc, zombie,



Home | Main Index | Thread Index | Old Index