(no subject)

nitrogene_at_free.fr
Date: 11/02/03

  • Next message: Michael Buesch: "[2.6.0-test9 ALSA] ALSA-OSS-emulation unable to register"
    Date:	Sun,  2 Nov 2003 15:04:40 +0100
    To: linux-kernel@vger.kernel.org
    
    

    Hi,
    I'm developing a system accounting, which get informations about I/O in
    /proc/partitions.
    But, I've noticed that sometimes this system returns informations about negative
    I/O.
    I find this in in the kernel tree source :
    http://lxr.linux.no/source/include/linux/genhd.h?v=2.4.22#L61

    61 struct hd_struct {
    ...........
    69 /* Performance stats: */
    70 unsigned int ios_in_flight;
    71 unsigned int io_ticks;
    72 unsigned int last_idle_time;
    73 unsigned int last_queue_change;
    74 unsigned int aveq;
    75
    76 unsigned int rd_ios;
    77 unsigned int rd_merges;
    78 unsigned int rd_ticks;
    79 unsigned int rd_sectors;
    80 unsigned int wr_ios;
    81 unsigned int wr_merges;
    82 unsigned int wr_ticks;
    83 unsigned int wr_sectors;
    84 #endif /* CONFIG_BLK_STATS */
    85 };

    but in http://lxr.linux.no/source/drivers/block/genhd.c?v=2.4.22#L181

    static int part_show(struct seq_file *s, void *v)
    .............
    189 #ifdef CONFIG_BLK_STATS
    190 " rio rmerge rsect ruse wio wmerge "
    191 "wsect wuse running use aveq"
    ......
    203 seq_printf(s, "%4d %4d %10d %s "
                    <------
    204 "%d %d %d %d %d %d %d %d %d %d %d\n",
         <------
    205 gp->major, n, gp->sizes[n],
    206 disk_name(gp, n, buf),
    207 hd->rd_ios, hd->rd_merges,
    208 #define MSEC(x) ((x) * 1000 / HZ)
    209 hd->rd_sectors, MSEC(hd->rd_ticks),
    210 hd->wr_ios, hd->wr_merges,
    211 hd->wr_sectors, MSEC(hd->wr_ticks),
    212 hd->ios_in_flight, MSEC(hd->io_ticks),
    213 MSEC(hd->aveq));
    .....................
    223 }

    I think that negative I/O result of the usage of %d in seq_printf function for
    variable declared as unsigned int.
    Somebody could confirm me this

    Thank's

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


  • Next message: Michael Buesch: "[2.6.0-test9 ALSA] ALSA-OSS-emulation unable to register"

    Relevant Pages

    • Question about /proc/partitions
      ... I'm developing a system accounting, which get informations about I/O in ... I think that negative I/O result of the usage of %d in seq_printf function for ... variable declared as unsigned int. ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: swsusp problems [was Re: Your opinion on the merge?]
      ... used for doing I/O, but it is also used for some threads that aren't I/O ... in two parts and that the first part saved consists of LRU pages. ... Nigel Cunningham ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: [PATCH] O10int for interactivity
      ... I/O to a similar place on the disk soon. ... Waking up such tasks _may_ be important, ... the other hand if their dynamic priority is so low that they are ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: [PATCH/RFC] I/O-check interface for drivers error handling
      ... > Hmm, before we go async way could driver simply ... gracefully handle errors during that I/O. ... threads in a platform specific error handling thread or interrupt handler ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: Request: I/O request recording
      ... > Demand Loading unfortunately produces lots of random page I/O scattered ... - Reboot the system, wait until everything is steady-state (eg: ... pretty much a waste of time, gaining only 10% or so, from memory. ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)