Update disk space utilization together with diskstats since we will
use free space size to co-relate disk performance.
Bug: 63629306
Change-Id: I4e5694aaff3b71aa56db451f1bc92ccfb07e5086
BatteryListener takes sp<> as parameter. Passing raw storaged_t ptr
to BatteryListener will cause the ptr to be freed when BatteryListener
releases the sp<>. Keep a refcount in storaged to prevent this from
happening.
Test: kill healthd while storaged is running
Bug: 36652060
Change-Id: I96bc45a3bedb39eb7158b8f6c86334b5b31c9346
Sysfs data is straightforward so we don't need parsing anymore.
Also removed periodical check since data is set only once during
driver initialization. Checking at every device boot or storaged
restart should be sufficient to monitor long term status change.
Test: adb logcat -d -b events | grep storaged_emmc_info
Bug: 36228467
Merged-In: I2a181f52c9f19de1e679a3a905aaebafe4d08227
Change-Id: Ic05e353f0af9363f3bcbe793ba0c351082e446ca
Remove storaged from system group.
Let init set priority based on rc file.
Test: adb shell dumpsys storaged --force
Bug: 35323867
Change-Id: I9d893ec69d9cc34a9e24f47166384efd7ef4d9d2
Register a listener to batteryproperties service for charger stats
change.
Aggregate IO usage based on charger stats in a collection window.
Bug: 33086174
Bug: 34198239
Change-Id: Ibe306c9c3ff8b8ada6be034aa8511268cb9a9b1c
1. Add a flag to report IO usage for last N hours.
2. Change interval back to 1 hour so that we have finer usage data.
3. Don't clear events after dumpsys call. Use a max buffer limit.
4. Clear old events if they're more than 5 days old or when no room
for new events.
5. Skip uids with no IO usage to save space.
6. Replace interval with a timestamp in event entry.
Test: adb shell dumpsys storaged --hours 2
Bug: 34198239
Bug: 33086174
Change-Id: I66e8fb6ec155584115fab817c3ed2c78e637ac40
Add properties to control event intervals.
Add a property to check time spent in event loop.
Bug: 34612341
Bug: 34198239
Change-Id: I01f64c84e17153377ece7ae530be106e3f55287e
Add uid_monitor class to query /proc/uid_io/stats periodically.
Add a log tag to record any UID that exceeds IO threshold.
Test: adb shell storaged -u
Bug: 34198239
Change-Id: I53568c30dbefe2f4bdb18054d3dedb30b4133d8b
Storaged periodically checks the devices' disk stats and eMMC lifetime.
This information is logged to both the kernel and event log. By event
logging, the data can be aggregated by the checkin service and then
sent to Sawmill.
It also periodically traverses /proc/[pid], maintaining the I/O usage of
all tasks (all sampled tasks). The task I/O data can be reported using
the --dump option.
Storaged is booted when the device boots up and requires the permission
for reading /proc/diskstats, /proc/[pid]/io and debugfs(eMMC ext_csd).
For detailed description, please refer to go/storaged.
Bug: 28826771
Change-Id: I774b1a44cc30092bac1bfcbc08bf487295e7cfed