task_io_accounting.h 927 B

12345678910111213141516171819202122232425262728293031323334353637
  1. /*
  2. * task_io_accounting: a structure which is used for recording a single task's
  3. * IO statistics.
  4. *
  5. * Don't include this header file directly - it is designed to be dragged in via
  6. * sched.h.
  7. *
  8. * Blame akpm@osdl.org for all this.
  9. */
  10. #ifdef CONFIG_TASK_IO_ACCOUNTING
  11. struct task_io_accounting {
  12. /*
  13. * The number of bytes which this task has caused to be read from
  14. * storage.
  15. */
  16. u64 read_bytes;
  17. /*
  18. * The number of bytes which this task has caused, or shall cause to be
  19. * written to disk.
  20. */
  21. u64 write_bytes;
  22. /*
  23. * A task can cause "negative" IO too. If this task truncates some
  24. * dirty pagecache, some IO which another task has been accounted for
  25. * (in its write_bytes) will not be happening. We _could_ just
  26. * subtract that from the truncating task's write_bytes, but there is
  27. * information loss in doing that.
  28. */
  29. u64 cancelled_write_bytes;
  30. };
  31. #else
  32. struct task_io_accounting {
  33. };
  34. #endif