)]}'
{
  "commit": "b3d6424aeb90ae338580d1323658ca1971652349",
  "tree": "981b65448f7d2c89d2e413941ce615f00d0d782c",
  "parents": [
    "3e5e6a82308b9c39f6dce7d8297ff31900fec689"
  ],
  "author": {
    "name": "Wei Wang",
    "email": "wvw@google.com",
    "time": "Wed Nov 18 19:51:44 2026 +0000"
  },
  "committer": {
    "name": "android-test-infra-autosubmit@system.gserviceaccount.com",
    "email": "android-test-infra-autosubmit@system.gserviceaccount.com",
    "time": "Fri Dec 04 10:28:28 2026 -0800"
  },
  "message": "ANDROID: uid_sys_stats: unlock I/O task walks\n\nuid_io_show() holds uid_lock[bkt], with preemption disabled, while\nupdate_io_stats_uid() walks every process and thread once per tracked\nUID in the bucket. uid_procstat_write() does the same walk under\nlock_uid() on every foreground/background transition. With U tracked\nUIDs and P tasks, each read of /proc/uid_io/stats does O(U * P)\nnon-preemptible work, which can delay runnable RT tasks for\nmilliseconds while storaged polls the file.\n\nMove all I/O task-list walks outside uid_lock:\n\n- Make hash_table RCU safe (hash_add_rcu(), hash_del_rcu(),\n  kfree_rcu()) and accumulate live task_io_accounting for all tracked\n  UIDs in a single rcu_read_lock() pass (preemptible under\n  CONFIG_PREEMPT_RCU), serialized among readers by a new uid_io_lock\n  mutex.\n- Commit each UID with compute_io_bucket_stats() in O(1) under\n  uid_lock[bkt]. Track exit_gen and a new per-UID io_gen commit counter\n  separately alongside the entry ID. If any of them changed during the\n  walk, recompute that UID with bounded retries: never commit stale I/O\n  across a concurrent commit or UID re-registration (preventing io_last\n  rewinds), and only commit on the final try after a pure task-exit\n  race, where any error is bounded by tasks exiting during the walk as\n  with the old in-lock walk. Pending work_usw exits are drained\n  synchronously before commits. No I/O path walks the task list under\n  uid_lock.\n- Readers blocked on uid_io_lock remain killable.\n- Size the seq_file buffer in uid_io_open() from the previous output\n  so that a high number of tracked UIDs does not overflow the default\n  single page buffer and force seq_read_iter() to run uid_io_show() a\n  second time.\n- Drop the unused \u003clinux/profile.h\u003e include left over from the earlier\n  tracepoint conversion.\n\nThe /proc/uid_io/stats output format and per-state accounting are\nunchanged (a state switch under repeated concurrent commit or\nre-registration races skips committing stale I/O instead of rewinding\nio_last, charging the small remaining delta to the new state).\n\nBug: 570877119\nTest: atest vts_kernel_proc_file_api_test\nTest: atest CtsDumpsysHostTestCases:android.dumpsys.cts.StoragedDumpsysTest\nTest: uid_io/uid_procstat stress and accounting parity, lockdep clean\nChange-Id: I7abe4e2ea990b41fc068942ec0696347b2de6917\nSigned-off-by: Wei Wang \u003cwvw@google.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "33e4fac0d157cacdf1fbda67bc5ffa0271580952",
      "old_mode": 33188,
      "old_path": "drivers/misc/uid_sys_stats.c",
      "new_id": "beba1b36ddd9069ebbbd6847d2eb57a476d30cb0",
      "new_mode": 33188,
      "new_path": "drivers/misc/uid_sys_stats.c"
    }
  ]
}
