|
|
DescriptionUse TaskScheduler instead of WorkerPool in navigation_entry_screenshot_manager.cc.
The following traits are used:
Priority: Inherited (default)
The priority is inherited from the calling context (i.e. TaskTraits
are initialized with the priority of the current task).
Shutdown behavior: CONTINUE_ON_SHUTDOWN
Tasks posted with this mode which have not started executing before
shutdown is initiated will never run. Tasks with this mode running at
shutdown will be ignored (the worker will not be joined).
Note: Tasks that were previously posted to base::WorkerPool should
use this shutdown behavior because this is how base::WorkerPool
handles all its tasks.
Does Not Block (default):
Tasks without the MayBlock() and WithBaseSyncPrimitives() traits
may not block.
BUG=659191
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_site_isolation
Committed: https://crrev.com/9b818f0b639e940db0167e82e0bc071852d30dc0
Cr-Commit-Position: refs/heads/master@{#441316}
Patch Set 1 #
Total comments: 4
Messages
Total messages: 18 (10 generated)
Description was changed from ========== Use TaskScheduler instead of WorkerPool in navigation_entry_screenshot_manager.cc. The following traits are used: Priority: Inherited (default) The priority is inherited from the calling context (i.e. TaskTraits are initialized with the priority of the current task). Shutdown behavior: CONTINUE_ON_SHUTDOWN Tasks posted with this mode which have not started executing before shutdown is initiated will never run. Tasks with this mode running at shutdown will be ignored (the worker will not be joined). Note: Tasks that were previously posted to base::WorkerPool should use this shutdown behavior because this is how base::WorkerPool handles all its tasks. Does Not Block (default): Tasks without the MayBlock() and WithBaseSyncPrimitives() traits may not block. BUG=659191 ========== to ========== Use TaskScheduler instead of WorkerPool in navigation_entry_screenshot_manager.cc. The following traits are used: Priority: Inherited (default) The priority is inherited from the calling context (i.e. TaskTraits are initialized with the priority of the current task). Shutdown behavior: CONTINUE_ON_SHUTDOWN Tasks posted with this mode which have not started executing before shutdown is initiated will never run. Tasks with this mode running at shutdown will be ignored (the worker will not be joined). Note: Tasks that were previously posted to base::WorkerPool should use this shutdown behavior because this is how base::WorkerPool handles all its tasks. Does Not Block (default): Tasks without the MayBlock() and WithBaseSyncPrimitives() traits may not block. BUG=659191 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_site_isolation ==========
The CQ bit was checked by fdoray@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
fdoray@chromium.org changed reviewers: + alexmos@chromium.org
PTAL. WorkerPool is being deprecated in favor of TaskScheduler.
https://codereview.chromium.org/2604343002/diff/1/content/browser/frame_host/... File content/browser/frame_host/navigation_entry_screenshot_manager.cc (left): https://codereview.chromium.org/2604343002/diff/1/content/browser/frame_host/... content/browser/frame_host/navigation_entry_screenshot_manager.cc:40: true)) { Is there's an equivalent to task_is_slow in TaskScheduler? I'm not too familiar with how important this is -- is it ok to lose it?
PTAnL https://codereview.chromium.org/2604343002/diff/1/content/browser/frame_host/... File content/browser/frame_host/navigation_entry_screenshot_manager.cc (left): https://codereview.chromium.org/2604343002/diff/1/content/browser/frame_host/... content/browser/frame_host/navigation_entry_screenshot_manager.cc:40: true)) { On 2017/01/03 19:19:06, alexmos wrote: > Is there's an equivalent to task_is_slow in TaskScheduler? I'm not too familiar > with how important this is -- is it ok to lose it? |task_is_slow| is ignored by WorkerPool and developers told us that they don't like the fact that there are no clear guidelines to determine whether a task is slow. There is no equivalent to |task_is_slow| in TaskScheduler. However, there is a MayBlock() trait for tasks that block (e.g. synchronously read a file from disk). When a MayBlock() task takes a long time to run, TaskScheduler may decide to create a new thread (note that TaskScheduler dynamically determines whether a task takes a long time to run). FWICT, ScreenshotData::EncodeOnWorker is CPU-bound. Therefore, it should not be posted with MayBlock().
LGTM https://codereview.chromium.org/2604343002/diff/1/content/browser/frame_host/... File content/browser/frame_host/navigation_entry_screenshot_manager.cc (left): https://codereview.chromium.org/2604343002/diff/1/content/browser/frame_host/... content/browser/frame_host/navigation_entry_screenshot_manager.cc:40: true)) { On 2017/01/04 00:27:09, fdoray wrote: > On 2017/01/03 19:19:06, alexmos wrote: > > Is there's an equivalent to task_is_slow in TaskScheduler? I'm not too > familiar > > with how important this is -- is it ok to lose it? > > |task_is_slow| is ignored by WorkerPool At least on Windows, it seems to be used to add WT_EXECUTELONGFUNCTION to QueueUserWorkItem flags, see https://cs.chromium.org/chromium/src/base/threading/worker_pool_win.cc?l=46 Losing that was mostly why I was curious about this. > and developers told us that they don't > like the fact that there are no clear guidelines to determine whether a task is > slow. > > There is no equivalent to |task_is_slow| in TaskScheduler. However, there is a > MayBlock() trait for tasks that block (e.g. synchronously read a file from > disk). When a MayBlock() task takes a long time to run, TaskScheduler may > decide to create a new thread (note that TaskScheduler dynamically determines > whether a task takes a long time to run). > > FWICT, ScreenshotData::EncodeOnWorker is CPU-bound. Therefore, it should not be > posted with MayBlock(). Acknowledged.
https://codereview.chromium.org/2604343002/diff/1/content/browser/frame_host/... File content/browser/frame_host/navigation_entry_screenshot_manager.cc (left): https://codereview.chromium.org/2604343002/diff/1/content/browser/frame_host/... content/browser/frame_host/navigation_entry_screenshot_manager.cc:40: true)) { On 2017/01/04 01:00:08, alexmos wrote: > On 2017/01/04 00:27:09, fdoray wrote: > > On 2017/01/03 19:19:06, alexmos wrote: > > > Is there's an equivalent to task_is_slow in TaskScheduler? I'm not too > > familiar > > > with how important this is -- is it ok to lose it? > > > > |task_is_slow| is ignored by WorkerPool > > At least on Windows, it seems to be used to add WT_EXECUTELONGFUNCTION to > QueueUserWorkItem flags, see > https://cs.chromium.org/chromium/src/base/threading/worker_pool_win.cc?l=46 > > Losing that was mostly why I was curious about this. > > > and developers told us that they don't > > like the fact that there are no clear guidelines to determine whether a task > is > > slow. > > > > There is no equivalent to |task_is_slow| in TaskScheduler. However, there is a > > MayBlock() trait for tasks that block (e.g. synchronously read a file from > > disk). When a MayBlock() task takes a long time to run, TaskScheduler may > > decide to create a new thread (note that TaskScheduler dynamically determines > > whether a task takes a long time to run). > > > > FWICT, ScreenshotData::EncodeOnWorker is CPU-bound. Therefore, it should not > be > > posted with MayBlock(). > > Acknowledged. Our experiments show that this flag is ignored on newer versions of Windows (it was used on XP).
The CQ bit was checked by fdoray@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
CQ is committing da patch. Bot data: {"patchset_id": 1, "attempt_start_ts": 1483496000519880, "parent_rev": "89317cd02aea67a6ce10de1ad55156a89984d8dd", "commit_rev": "7d8f0452363b5ec1af06dfc3b076801267632f85"}
Message was sent while issue was closed.
Description was changed from ========== Use TaskScheduler instead of WorkerPool in navigation_entry_screenshot_manager.cc. The following traits are used: Priority: Inherited (default) The priority is inherited from the calling context (i.e. TaskTraits are initialized with the priority of the current task). Shutdown behavior: CONTINUE_ON_SHUTDOWN Tasks posted with this mode which have not started executing before shutdown is initiated will never run. Tasks with this mode running at shutdown will be ignored (the worker will not be joined). Note: Tasks that were previously posted to base::WorkerPool should use this shutdown behavior because this is how base::WorkerPool handles all its tasks. Does Not Block (default): Tasks without the MayBlock() and WithBaseSyncPrimitives() traits may not block. BUG=659191 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_site_isolation ========== to ========== Use TaskScheduler instead of WorkerPool in navigation_entry_screenshot_manager.cc. The following traits are used: Priority: Inherited (default) The priority is inherited from the calling context (i.e. TaskTraits are initialized with the priority of the current task). Shutdown behavior: CONTINUE_ON_SHUTDOWN Tasks posted with this mode which have not started executing before shutdown is initiated will never run. Tasks with this mode running at shutdown will be ignored (the worker will not be joined). Note: Tasks that were previously posted to base::WorkerPool should use this shutdown behavior because this is how base::WorkerPool handles all its tasks. Does Not Block (default): Tasks without the MayBlock() and WithBaseSyncPrimitives() traits may not block. BUG=659191 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_site_isolation Review-Url: https://codereview.chromium.org/2604343002 ==========
Message was sent while issue was closed.
Committed patchset #1 (id:1)
Message was sent while issue was closed.
Description was changed from ========== Use TaskScheduler instead of WorkerPool in navigation_entry_screenshot_manager.cc. The following traits are used: Priority: Inherited (default) The priority is inherited from the calling context (i.e. TaskTraits are initialized with the priority of the current task). Shutdown behavior: CONTINUE_ON_SHUTDOWN Tasks posted with this mode which have not started executing before shutdown is initiated will never run. Tasks with this mode running at shutdown will be ignored (the worker will not be joined). Note: Tasks that were previously posted to base::WorkerPool should use this shutdown behavior because this is how base::WorkerPool handles all its tasks. Does Not Block (default): Tasks without the MayBlock() and WithBaseSyncPrimitives() traits may not block. BUG=659191 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_site_isolation Review-Url: https://codereview.chromium.org/2604343002 ========== to ========== Use TaskScheduler instead of WorkerPool in navigation_entry_screenshot_manager.cc. The following traits are used: Priority: Inherited (default) The priority is inherited from the calling context (i.e. TaskTraits are initialized with the priority of the current task). Shutdown behavior: CONTINUE_ON_SHUTDOWN Tasks posted with this mode which have not started executing before shutdown is initiated will never run. Tasks with this mode running at shutdown will be ignored (the worker will not be joined). Note: Tasks that were previously posted to base::WorkerPool should use this shutdown behavior because this is how base::WorkerPool handles all its tasks. Does Not Block (default): Tasks without the MayBlock() and WithBaseSyncPrimitives() traits may not block. BUG=659191 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_site_isolation Committed: https://crrev.com/9b818f0b639e940db0167e82e0bc071852d30dc0 Cr-Commit-Position: refs/heads/master@{#441316} ==========
Message was sent while issue was closed.
Patchset 1 (id:??) landed as https://crrev.com/9b818f0b639e940db0167e82e0bc071852d30dc0 Cr-Commit-Position: refs/heads/master@{#441316} |