QUESTION: 2.5 adds 1 to systats even for non I/O operations

QUESTION: 2.5 adds 1 to systats even for non I/O operations

Post by Ricardo Gall » Thu, 08 May 2003 22:40:11



I'm working in a daemon to control cpufreq and devices
(http://freshmeat.net/projects/cpudyn/)

I've just noticed that kernel 2.5 always add one (1) to /proc/diskstats
and /sys/block/hdX/stat "reads" field for ioctl's requests that don't
generate data I/O.

For example for checking the status of the disk (standby, active, sleep)
or putting the disk in standby.

Is that correct? Do I have to take it in account always?

Thanks in advance.

--
  ricardo galli       GPG id C8114D34
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

 
 
 

1. remove mixture of non-atomic operations with page->flags which requires atomic operations to access

page->flags is effectively a lock word as its various bits are updatable
and accessible only by atomic operations. This patch removes the update
of page->flags in __free_pages_ok() with non-atomic operations in favor
of using atomic bit operations to update the bits to be cleared.

Against 2.5.19.

Cheers,
Bill

diff -Nru a/include/linux/page-flags.h b/include/linux/page-flags.h
--- a/include/linux/page-flags.h        Sun Jun  2 15:42:49 2002

 #define PageChecked(page)      test_bit(PG_checked, &(page)->flags)
 #define SetPageChecked(page)   set_bit(PG_checked, &(page)->flags)
+#define ClearPageChecked(page) clear_bit(PG_checked, &(page)->flags)

 #define PageReserved(page)     test_bit(PG_reserved, &(page)->flags)
 #define SetPageReserved(page)  set_bit(PG_reserved, &(page)->flags)
diff -Nru a/mm/page_alloc.c b/mm/page_alloc.c
--- a/mm/page_alloc.c   Sun Jun  2 15:42:49 2002

        BUG_ON(PageLRU(page));
        BUG_ON(PageActive(page));
        BUG_ON(PageWriteback(page));
+
        ClearPageDirty(page);
-       page->flags &= ~(1<<PG_referenced);
+       ClearPageUptodate(page);
+       ClearPageSlab(page);
+       ClearPageNosave(page);
+       ClearPageChecked(page);

        if (current->flags & PF_FREE_PAGES)
                goto local_freelist;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

2. Creating PCLoutput from an ascii file...

3. VxVM 2.5: Adding disks: DMP question

4. Msg Queue Libraries/Examples

5. Is it possible to make a file undeletable (even by root) in Solaris 2.5?

6. d2Mac on sparc with redhat 6.2

7. "rm: Operation not permitted", even as root

8. ftp can't not login?

9. Will 2.5 for X86 run on non-P&P systems?

10. Solaris 2.5/x86 and non-Solaris fdisk partitions

11. Any non-BS VM work queued for 2.5?

12. [2.5] Non-blocking write can block

13. Converting networked Solaris 2.5 to non-networked standalone...