解決策 1:
マニュアルから:
The `%I' and `%O' values are allegedly only `real'
input and output and do not include those supplied
by caching devices. The meaning of `real' I/O reported
by `%I' and `%O' may be muddled for workstations,
especially diskless ones.
したがって、単位は I/O です。おそらく、ソースコードはそれが何を意味するかを知っています。 time.c のサマライズ関数のドキュメントから:
...
I == file system inputs (ru_inblock)
...
O == file system outputs (ru_oublock)
...
ru_inblock と ru_oblock は getrusage から来ています。 getrusage マニュアルから:
ru_inblock (since Linux 2.6.22)
The number of times the filesystem had to perform input.
ru_oublock (since Linux 2.6.22)
The number of times the filesystem had to perform output.
それは特に有用ではありませんが、LKML は、ru_inblock と ru_oublock を追加するために議論されているパッチ (https://lkml.org/lkml/2007/3/19/100) を示しています:
As TASK_IO_ACCOUNTING currently counts bytes, we approximate blocks
count doing : nr_blocks = nr_bytes / 512
現在のカーネル ソース コード (https://github.com/spotify/linux/blob/master/include/linux/task_io_accounting_ops.h) を確認すると、次のように表示されます:
/*
* We approximate number of blocks, because we account bytes only.
* A 'block' is 512 bytes
*/
static inline unsigned long task_io_get_inblock(const struct task_struct *p)
{
return p->ioac.read_bytes >> 9;
}
そして
/*
* We approximate number of blocks, because we account bytes only.
* A 'block' is 512 bytes
*/
static inline unsigned long task_io_get_oublock(const struct task_struct *p)
{
return p->ioac.write_bytes >> 9;
}
つまり、ブロックはそれぞれ約 512 バイトです。
解決策 2:
推測 「ファイルシステムの入力/出力」はブロックサイズを意味するため、基になるファイルシステムが 512 バイトブロックでフォーマットされている場合はそれを返し、それ以外の場合はそれを返します。
しかし、これは単なる推測です。