Issue metadata
Sign in to add a comment
|
Need to be able to sequence tasks of different priority |
||||||||||||||||||||||||
Issue descriptionWith the task scheduler migration, we no longer have guarantees that threads like the FILE thread offered us. This means subsystems (e.g., extensions) have to coordinate themselves in order to ensure that no collisions occur (like two calls trying to access the same file). To achieve this, we can use a sequenced task runner that performs file operations for that system (as is done in issue 750122 ). However, certain file-related tasks may have higher priority than others, even if they potentially touch some of the same files. For instance, extension garbage collection is very low priority, whereas extension installation is usually very high priority, and both require file access. It would be great to be able to sequence tasks of different priority in order to ensure that high priority tasks are run sooner while not sacrificing the safety guarantees that sequencing provides. gab@, when we chatted in person, I think this was on your radar already (though perhaps not in the immediate future, since the concentration right now is on the migration).
,
Aug 10 2017
Yep! This isn't a regression, just a request to make it all even better. :) On a semi-related note, if we want to run all file-related work at "roughly what it was before" (i.e., to avoid slowing down user-blocking flows like extension installation and accepting that other flows like garbage collection will be no worse than they previously were), is there a preferred priority? Said differently, do tasks posted to a named thread (like FILE) run with an implied priority?
,
Aug 10 2017
USER_VISIBLE is the prefered default priority. BACKGROUND is actively throttled and USER_BLOCKING tries to jump ahead of everything else. Named threads pretty much all had USER_VISIBLE implied priority (weren't throttled at the OS level but couldn't preempt other work either) -- even BrowserThread::FILE_USER_BLOCKING was the exact same priority (just had fewer things in its queue...).
,
May 3 2018
What is needed here is Sequence Funnelling (a feature being considered by TaskScheduler) |
|||||||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||||||
Comment 1 by gab@chromium.org
, Aug 10 2017