Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 5 Feb 1999 23:04:24 -0800 (PST)
From:      Matthew Dillon <dillon@apollo.backplane.com>
To:        Bruce Evans <bde@zeta.org.au>
Cc:        wwoods@cybcon.com, bde@zeta.org.au, current@FreeBSD.ORG
Subject:   Re: Top not working in -Current??
Message-ID:  <199902060704.XAA06756@apollo.backplane.com>
References:   <199902060526.QAA10052@godzilla.zeta.org.au>

next in thread | previous in thread | raw e-mail | index | archive | help
    Yah yah.  I had to get a machine up without any configured swap, it
    took a little while.  Fixes have been comitted.

    SWIF_DUMP_TREE is not used for error reporting.  It's used to dump
    the radix tree.

    While one could argue that printf()'s should not exist in libkvm,
    I am not going to spend another bunch of hours separating the radix
    tree dump code into another library.  It wouldn't be appropriate
    anyway.

    The support for the original swap configuration will eventually be 
    removed, but not until we decide somewhere down the line ( in a few
    months.. NOT NOW! ) whether to backport the new swapper to -3.x or not.
    If we do, I'll want that legacy support in for at least one release.

					-Matt

:
:>Index: kvm_getswapinfo.c
:>===================================================================
:>RCS file: /home/ncvs/src/lib/libkvm/kvm_getswapinfo.c,v
:>retrieving revision 1.4
:>diff -u -r1.4 kvm_getswapinfo.c
:>--- kvm_getswapinfo.c	1999/01/27 11:29:15	1.4
:>+++ kvm_getswapinfo.c	1999/02/06 04:46:48
:>@@ -127,10 +127,10 @@
:> 		KGET(NL_NSWDEV, nswdev);
:> 		KGET(NL_DMMAX, dmmax);
:> 
:>-		if (kvm_swap_nl[NL_SWAPLIST].n_value)
:>+		if (kvm_swap_nl[NL_SWAPLIST].n_type != N_UNDF)
:> 			type = 1;
:> 
:>-		if (kvm_swap_nl[NL_SWAPBLIST].n_value)
:>+		if (kvm_swap_nl[NL_SWAPBLIST].n_type != N_UNDF)
:> 			type = 2;
:> 
:> 		/*
:>@@ -406,6 +406,13 @@
:> 	struct blist blcopy = { 0 };
:> 
:> 	KGET(NL_SWAPBLIST, swapblist);
:>+
:>+	if (swapblist == NULL) {
:>+		if (flags & SWIF_DUMP_TREE)
:>+			printf("radix tree: NULL - no swap in system\n");
:>+		return;
:>+	}
:>+
:> 	KGET2(swapblist, &blcopy, sizeof(blcopy), "*swapblist");
:> 
:> 	if (flags & SWIF_DUMP_TREE) {
:
:
:This needs more work
:- library routines shouldn't print to stdout or stderr, especially when
:  there is a function like kvm_geterr() for reporting errors.
:- no swap is not an error.
:- top still gets a SIGFPE (the bug is in top -- it divides by
:  swpary[0].ksw_total which may be 0).
:- pstat and systat have the same bug as top.
:- libkvm is still bloated with support for old swapping methods, despite
:  more important parts of libkvm not working with kernels more than a
:  few days old because the proc struct changed significantly.
:
:Bruce
:
:To Unsubscribe: send mail to majordomo@FreeBSD.org
:with "unsubscribe freebsd-current" in the body of the message
:

					Matthew Dillon 
					<dillon@backplane.com>

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199902060704.XAA06756>