Determine whether TabManagerDelegate::MemoryStat functions need to run on a blocking sequence. |
||||
Issue descriptionTabManagerDelegate::MemoryStat provides functions to read the "low-memory margin" and current "available" memory levels from the OS kernel, via the /sys/kernel/... filesystem. Since we need these values synchronously, when asked to tab-discard, they are read in-line on the UI thread, on which filesystem I/O is normally disallowed, in case it blocks and causes jank. We should confirm whether these files (or the path resolution to reach them) can block, to decide whether the discard path can safely call them inline.
,
Oct 26 2017
Thanks for the detail, Luigi. If we can confirm that resolving paths under /sys is non-blocking then I would suggest that we add an explicit helper function in //base, which prefixes a supplied path with '/sys/kernel/' and applies ScopedAllowBlocking internally, so that any future call-sites can use /sys/kernel paths and not have to add further exceptions to the ScopedAllowBlocking rules.
,
Oct 26 2017
Yes I confirm that sysfs is implemented by kernelfs and all directories are in RAM.
There is a theoretical possibility of blocking on reading /, but when I ask other kernel folks if this can happen, they just laugh at me. So I think this is "proof by humiliation" that it won't happen :) ("proof by ridicule"?)
Maybe you can change the subject of this bug to reflect the proposed change in #2.
,
Oct 26 2017
Mmm I shouldn't have said that they laugh "at me". They really don't. They just laugh. We're a bunch of really fun-loving folks. http://dilbert.com/strip/1991-09-27
,
Oct 29
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue. Sorry for the inconvenience if the bug really should have been left as Available. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot |
||||
►
Sign in to add a comment |
||||
Comment 1 by semenzato@chromium.org
, Oct 26 2017