search for: part_stat_read

Displaying 2 results from an estimated 2 matches for "part_stat_read".

2011 Aug 16
1
[PATCH] virtio-blk: Add stats VQ to collect information about devices
...t;stats[idx].val = val; +} + +static void update_blk_stats(struct virtio_blk *vb) +{ + struct hd_struct *p = disk_get_part(vb->disk, 0); + int cpu; + int idx = 0; + + cpu = part_stat_lock(); + part_round_stats(cpu, p); + part_stat_unlock(); + + update_stat(vb, idx++, VIRTIO_BLK_S_READ_IO, + part_stat_read(p, ios[READ])); + update_stat(vb, idx++, VIRTIO_BLK_S_READ_MERGES, + part_stat_read(p, merges[READ])); + update_stat(vb, idx++, VIRTIO_BLK_S_READ_SECTORS, + part_stat_read(p, sectors[READ])); + update_stat(vb, idx++, VIRTIO_BLK_S_READ_TICKS, + jiffies_to_msecs(part_stat_read(p, ticks...
2011 Aug 16
1
[PATCH] virtio-blk: Add stats VQ to collect information about devices
...t;stats[idx].val = val; +} + +static void update_blk_stats(struct virtio_blk *vb) +{ + struct hd_struct *p = disk_get_part(vb->disk, 0); + int cpu; + int idx = 0; + + cpu = part_stat_lock(); + part_round_stats(cpu, p); + part_stat_unlock(); + + update_stat(vb, idx++, VIRTIO_BLK_S_READ_IO, + part_stat_read(p, ios[READ])); + update_stat(vb, idx++, VIRTIO_BLK_S_READ_MERGES, + part_stat_read(p, merges[READ])); + update_stat(vb, idx++, VIRTIO_BLK_S_READ_SECTORS, + part_stat_read(p, sectors[READ])); + update_stat(vb, idx++, VIRTIO_BLK_S_READ_TICKS, + jiffies_to_msecs(part_stat_read(p, ticks...