DragonFly kernel List (threaded) for 2007-06
DragonFly BSD
DragonFly kernel List (threaded) for 2007-06
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: Decision time.... should NATA become the default for this release?


From: YONETANI Tomokazu <qhwt+dfly@xxxxxxxxxx>
Date: Fri, 1 Jun 2007 18:08:57 +0900

On Thu, May 31, 2007 at 05:35:49PM -0700, Matthew Dillon wrote:
>     We need to make a decision on the next release as to whether NATA
>     should become the default.  I would really like to make it the default,
>     but to do so we need some assurance that it won't break things that
>     currently work.
> 
>     So I'm asking all developers running HEAD who have not already started
>     using the NATA driver to start using it instead of the ATA driver. 
>     Lets give it a good whack!

I gave NATA a try on my notebook PC, and now it boots into single-user mode!
This is a progress, as it used to just get stuck somewhere in init(8) (BTW
I tried to add debug print's in init, but somehow it didn't work), and
all I could do then was to drop in to DDB or reboot.

However, core dumping of random processes still remains, so it's still not
usable in multi-user mode.  Sometimes, it panics on umount, after some
read-only disk activities:
  # mount -r /home
  # find /home >/dev/null
  # umount /home
  panic: unmount: dangling vnode

Another weird thing with NATA is that I'm seeing odd interrupt counts
from `vmstat -i'; with old-ATA, it looks like this:
  # vmstat -iv
  interrupt                   total       rate
  irq0: clk                  402493        277
  irq1: atkbd0                    4          0
  irq9: acpi0                    54          0
  irq11: fxp0                  2649          1
  irq12: psm0                     0          0
  irq14: ata0                  1634          1
  irq15: ata1                     0          0
  irq68: swi_vm                   0          0
  irq69: swi_taskq                0          0
  Total                      406834        280

with NATA, it looks like this(in single-user mode):
  # vmstat -iv
  interrupt                   total       rate
  irq0: clk                    1236        176
  irq1: atkbd0                   24          3
  irq9: acpi0                     1          0
  irq11: fxp0                     0          1
  irq12: psm0                     0          0
  irq14: ata0                    99         14
  irq15: ata1                     0          0
  irq21                          98         14
  irq68: swi_vm                   0          0
  irq69: swi_taskq                0          0
  Total                        1458        208

irq21 has almost the same number as ata0 does and the number raises
as the disk activity occurs.

Cheers.
Index: vmstat.c
===================================================================
RCS file: /home/source/dragonfly/cvs/src/usr.bin/vmstat/vmstat.c,v
retrieving revision 1.20
diff -u -p -r1.20 vmstat.c
--- vmstat.c	28 Jan 2006 17:18:48 -0000	1.20
+++ vmstat.c	1 Jun 2007 08:53:50 -0000
@@ -112,6 +112,7 @@ struct	vmstats vms, ovms;
 
 int	winlines = 20;
 int	nflag = 0;
+int	verbose = 0;
 
 kvm_t *kd;
 
@@ -157,7 +158,7 @@ main(int argc, char **argv)
 	memf = nlistf = NULL;
 	interval = reps = todo = 0;
 	maxshowdevs = 2;
-	while ((c = getopt(argc, argv, "c:fiM:mN:n:p:stw:z")) != -1) {
+	while ((c = getopt(argc, argv, "c:fiM:mN:n:p:stvw:z")) != -1) {
 		switch (c) {
 		case 'c':
 			reps = atoi(optarg);
@@ -202,6 +203,9 @@ main(int argc, char **argv)
 			errx(EX_USAGE, "sorry, -t is not (re)implemented yet");
 #endif
 			break;
+		case 'v':
+			++verbose;
+			break;
 		case 'w':
 			interval = atoi(optarg);
 			break;
@@ -744,7 +748,7 @@ dointr(void)
 		err(1, "malloc");
 	sysctlbyname("hw.intrcnt", intrcnt, &size, NULL, 0);
 
-	nwidth = 8;
+	nwidth = 21;
 	for (i = 0; i < nintr; ++i) {
 		if (nwidth < (int)strlen(intrname[i]))
 			nwidth = (int)strlen(intrname[i]);
@@ -753,10 +757,26 @@ dointr(void)
 	printf("interrupt                   total       rate\n");
 	inttotal = 0;
 	for (i = 0; i < nintr; ++i) {
-		if (intrcnt[i] || strncmp(intrname[i], "irq", 3) != 0) {
-			printf("%-*.*s %11lu %10lu\n", 
-				nwidth, nwidth, intrname[i],
-				intrcnt[i], intrcnt[i] / uptime);
+		int named = 0;
+		char irqinfo[32], *infop;
+
+		if ((named = strncmp(intrname[i], "irq", 3)) != 0 ||
+		    verbose > 1 || intrcnt[i]) {
+			if (verbose) {
+				if (named) {
+					snprintf(irqinfo, sizeof(irqinfo),
+						 "irq%d: %s", i, intrname[i]);
+					infop = irqinfo;
+				} else
+					infop = intrname[i];
+				printf("%-*.*s %11lu %10lu\n", 
+					nwidth, nwidth, infop,
+					intrcnt[i], intrcnt[i] / uptime);
+			} else {
+				printf("%-*.*s %11lu %10lu\n", 
+					nwidth, nwidth, intrname[i],
+					intrcnt[i], intrcnt[i] / uptime);
+			}
 		}
 		inttotal += intrcnt[i];
 	}


[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]