diff options
author | Jens Axboe <axboe@suse.de> | 2005-11-01 03:26:16 -0500 |
---|---|---|
committer | Jens Axboe <axboe@suse.de> | 2005-11-01 03:26:16 -0500 |
commit | a362357b6cd62643d4dda3b152639303d78473da (patch) | |
tree | fe4ce823e638ded151edcb142f28a240860f0d33 /include | |
parent | d72d904a5367ad4ca3f2c9a2ce8c3a68f0b28bf0 (diff) |
[BLOCK] Unify the seperate read/write io stat fields into arrays
Instead of having ->read_sectors and ->write_sectors, combine the two
into ->sectors[2] and similar for the other fields. This saves a branch
several places in the io path, since we don't have to care for what the
actual io direction is. On my x86-64 box, that's 200 bytes less text in
just the core (not counting the various drivers).
Signed-off-by: Jens Axboe <axboe@suse.de>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/genhd.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/include/linux/genhd.h b/include/linux/genhd.h index eabdb5cce357..8eeaa53a68c9 100644 --- a/include/linux/genhd.h +++ b/include/linux/genhd.h | |||
@@ -78,7 +78,7 @@ struct hd_struct { | |||
78 | sector_t start_sect; | 78 | sector_t start_sect; |
79 | sector_t nr_sects; | 79 | sector_t nr_sects; |
80 | struct kobject kobj; | 80 | struct kobject kobj; |
81 | unsigned reads, read_sectors, writes, write_sectors; | 81 | unsigned ios[2], sectors[2]; |
82 | int policy, partno; | 82 | int policy, partno; |
83 | }; | 83 | }; |
84 | 84 | ||
@@ -89,10 +89,10 @@ struct hd_struct { | |||
89 | #define GENHD_FL_SUPPRESS_PARTITION_INFO 32 | 89 | #define GENHD_FL_SUPPRESS_PARTITION_INFO 32 |
90 | 90 | ||
91 | struct disk_stats { | 91 | struct disk_stats { |
92 | unsigned read_sectors, write_sectors; | 92 | unsigned sectors[2]; |
93 | unsigned reads, writes; | 93 | unsigned ios[2]; |
94 | unsigned read_merges, write_merges; | 94 | unsigned merges[2]; |
95 | unsigned read_ticks, write_ticks; | 95 | unsigned ticks[2]; |
96 | unsigned io_ticks; | 96 | unsigned io_ticks; |
97 | unsigned time_in_queue; | 97 | unsigned time_in_queue; |
98 | }; | 98 | }; |