aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/sys.c
diff options
context:
space:
mode:
authorJin Qian <jinqian@google.com>2017-01-10 16:10:35 -0800
committerJoonas Kylmälä <joonas.kylmala@iki.fi>2020-07-23 09:41:49 -0400
commit2709f5f654bc8b7a6ac1eaae918598f1c5db9079 (patch)
treedeb2098c1012b829687059ccf6612bdb69d25094 /kernel/sys.c
parent241e32ca450d4c296942be5cea0ea58e5ca19ad9 (diff)
downloadkernel_replicant_linux-2709f5f654bc8b7a6ac1eaae918598f1c5db9079.tar.gz
kernel_replicant_linux-2709f5f654bc8b7a6ac1eaae918598f1c5db9079.tar.bz2
kernel_replicant_linux-2709f5f654bc8b7a6ac1eaae918598f1c5db9079.zip
ANDROID: uid_cputime: add per-uid IO usage accounting
IO usages are accounted in foreground and background buckets. For each uid, io usage is calculated in two steps. delta = current total of all uid tasks - previus total current bucket += delta Bucket is determined by current uid stat. Userspace writes to /proc/uid_procstat/set <uid> <stat> when uid stat is updated. /proc/uid_io/stats shows IO usage in this format. <uid> <foreground IO> <background IO> Bug: 34198239 Bug: 120442023 Change-Id: Ib8bebda53e7a56f45ea3eb0ec9a3153d44188102 Signed-off-by: Jin Qian <jinqian@google.com> [connoro: Used by storaged.] [adelva: Note: this version does not track fsync syscalls; this is implemented in a follow up due to the fact it depends on modifications to the task_xacct feature.] [adelva: Folded in the following changes: e003a91d8f42 ("ANDROID: uid_sys_stats: allow writing same state") 89b984bf2efd ("ANDROID: uid_sys_stats: fix negative write bytes.") bb5ee21cc4dd ("ANDROID: uid_sys_stats: change to use rt_mutex") 9297d5a160c7 ("ANDROID: uid_sys_stats: reduce update_io_stats overhead") 89402d07fe91 ("ANDROID: uid_sys_stats: defer io stats calulation for dead tasks") 6dc5d8173a8c ("ANDROID: uid_sys_stats: check previous uid_entry before call find_or_register_uid") 0ca2ece8f7ec ("ANDROID: uid_sys_stats: log task io with a debug flag") c9c096ef0e67 ("ANDROID: uid_sys_stats: Copy task_struct comm field to bigger buffer")] Signed-off-by: Alistair Delva <adelva@google.com>
Diffstat (limited to 'kernel/sys.c')
0 files changed, 0 insertions, 0 deletions