public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* vmstat
@ 2000-12-31 18:44 Mike Galbraith
  0 siblings, 0 replies; 3+ messages in thread
From: Mike Galbraith @ 2000-12-31 18:44 UTC (permalink / raw)
  To: linux-kernel

Hi,

Nobody watches vmstat any more? ;-)

--- linux-2.4.0-test13-pre7/drivers/block/ll_rw_blk.c.org	Sun Dec 31 08:41:47 2000
+++ linux-2.4.0-test13-pre7/drivers/block/ll_rw_blk.c	Sun Dec 31 08:49:21 2000
@@ -964,6 +964,15 @@
 	bh->b_rsector = bh->b_blocknr * (bh->b_size>>9);
 
 	generic_make_request(rw, bh);
+
+	switch (rw) {
+		case WRITE:
+			kstat.pgpgout++;
+			break;
+		default:
+			kstat.pgpgin++;
+			break;
+	}
 }
 
 /*
@@ -1057,7 +1066,6 @@
 				/* Hmmph! Nothing to write */
 				goto end_io;
 			__mark_buffer_clean(bh);
-			kstat.pgpgout++;
 			break;
 
 		case READA:
@@ -1065,7 +1073,6 @@
 			if (buffer_uptodate(bh))
 				/* Hmmph! Already have it */
 				goto end_io;
-			kstat.pgpgin++;
 			break;
 		default:
 			BUG();

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* vmstat
@ 2002-10-24  5:42 Albert D. Cahalan
  2002-10-27 21:02 ` vmstat Buddy Lumpkin
  0 siblings, 1 reply; 3+ messages in thread
From: Albert D. Cahalan @ 2002-10-24  5:42 UTC (permalink / raw)
  To: linux-kernel; +Cc: acahalan


While going over the vmstat man page, I spotted this:

       All linux blocks  are  currently  1k,  except  for  CD-ROM
       blocks which are 2k.

This doesn't seem to be true. I need help determining when
things changed so that I can update the documentation.
I've been checking kernels with commands like this:

dd bs=1024k count=1 if=/dev/cdrom of=/dev/null

Linux 2.4.16 and 2.5.42 both seem to use units of 1024 bytes.
Linux 2.2.18 does something weird, but NOT what is described in
the vmstat man page. With 2.2.18, non-CD blocks are 4096 (!!!)
bytes and CD blocks are indeed 2048 bytes.

I suppose there was an even older kernel, perhaps 2.0.xx,
that did the non-CD blocks in units of 1024 bytes. I can
no longer compile 2.0.xx, so I need some help testing that.

Also, am I right about 2.2.xx kernels? Are any of these
kernels affected by block size of a mounted filesystem?
Does it matter if I use a /dev/raw* device? Does any
kernel use different units for file bodies and metadata?

--
http://procps.sf.net/
http://procps.sf.net/procps-3.0.5.tar.gz

^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: vmstat
  2002-10-24  5:42 vmstat Albert D. Cahalan
@ 2002-10-27 21:02 ` Buddy Lumpkin
  0 siblings, 0 replies; 3+ messages in thread
From: Buddy Lumpkin @ 2002-10-27 21:02 UTC (permalink / raw)
  To: 'Albert D. Cahalan', linux-kernel


>Also, am I right about 2.2.xx kernels? Are any of these
>kernels affected by block size of a mounted filesystem?
>Does it matter if I use a /dev/raw* device? Does any
>kernel use different units for file bodies and metadata?

Raw devices are character special devices allowing arbitrary sized reads
and writes of 1 byte or more.

--Buddy



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2002-10-27 20:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-10-24  5:42 vmstat Albert D. Cahalan
2002-10-27 21:02 ` vmstat Buddy Lumpkin
  -- strict thread matches above, loose matches on Subject: below --
2000-12-31 18:44 vmstat Mike Galbraith

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox