Re: [PATCH 1/1] block: Add discard to stats.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, May 5, 2016 at 9:27 AM, Jeff Moyer <jmoyer@xxxxxxxxxx> wrote:
> Michael Callahan <michaelcallahan@xxxxxx> writes:
>
>> Separate out discards from writes counts in /block/diskstats as well as
>> the disk related /sys stat files.
>>
>> Sign-off-by: Michael Callahan <michaelcallahan@xxxxxx>
>> ---
>> The STAT_* macros might be better defined somewhere else.
>>
>> The part_*_in_flight macros should probably be per_cpu.  I mixed up a
>> patch to test that but they are used awkwardly in drivers/md/dm.c and
>> accumulating inflights on cpus would be susceptible to overflow errors
>> on 32 bit machines (increment on one cpu, complete on another, they sum
>> correctly until one overflows)
>>
>> This patch adds the new stats to the end of stat and diskstat for more
>> backwards compatibility.  However this patch breaks iostat which will
>> need to be updated to grab the additional fields.  iostat already has
>> cases for 4 and 11 entries in stat so adding another for 15 should be
>> easy enough and it's likely that adding these to the end of the file
>> rather than right after the write stats is unnecessary.
>
> You can't just break iostat.  Split the fields out into another file.
>
> Cheers,
> Jeff

Would it be better to make a new stat2 file, make discard_stats, or to
patch iostat.c
to handle the new format?  It appears that iostat.c already checks for 4 or 11
stat fields and should be easy to extend to check for 15.

  Michael
--
To unsubscribe from this list: send the line "unsubscribe linux-block" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux