Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(59)

Issue 2849953003: Use the task scheduler for blocking tasks in the USB service on Linux (Closed)

Created:
3 years, 7 months ago by Reilly Grant (use Gerrit)
Modified:
3 years, 7 months ago
Reviewers:
robliao
CC:
chromium-reviews
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Use the task scheduler for blocking tasks in the USB service on Linux This patch switches UsbServiceLinux to being initialized with a SequencedTaskRunner that puts it on its own non-shutdown-blocking sequence. Individual device connections are also put on their own sequences because there is no dependency between them and the global service. As DeviceMonitorLinux is global and owned by the FILE thread a new UdevWatcher class has been added which can be owned by each service that needs to monitor udev and lives on its own sequence. This should resolve issue 694496 by allowing Chrome to exit even if a faulty driver or device has locked up the USB service. BUG=694496 Review-Url: https://codereview.chromium.org/2849953003 Cr-Commit-Position: refs/heads/master@{#468456} Committed: https://chromium.googlesource.com/chromium/src/+/221e92f4f397ace9c60dd7361c306e7f7a1c4851

Patch Set 1 #

Total comments: 2

Patch Set 2 : Add a shared CreateBlockingTaskRunner() method #

Patch Set 3 : Remove more passing of the SequencedTaskRunner #

Unified diffs Side-by-side diffs Delta from patch set Stats (+301 lines, -145 lines) Patch
M device/udev_linux/BUILD.gn View 1 chunk +2 lines, -0 lines 0 comments Download
A device/udev_linux/udev_watcher.h View 1 chunk +55 lines, -0 lines 0 comments Download
A device/udev_linux/udev_watcher.cc View 1 chunk +98 lines, -0 lines 0 comments Download
M device/usb/usb_device_android.h View 4 chunks +0 lines, -8 lines 0 comments Download
M device/usb/usb_device_android.cc View 1 2 5 chunks +2 lines, -7 lines 0 comments Download
M device/usb/usb_device_handle_android.h View 1 2 3 chunks +0 lines, -3 lines 0 comments Download
M device/usb/usb_device_handle_android.cc View 1 2 2 chunks +6 lines, -5 lines 0 comments Download
M device/usb/usb_device_handle_unittest.cc View 10 chunks +17 lines, -16 lines 0 comments Download
M device/usb/usb_device_linux.h View 3 chunks +10 lines, -9 lines 0 comments Download
M device/usb/usb_device_linux.cc View 1 7 chunks +30 lines, -24 lines 0 comments Download
M device/usb/usb_service.h View 1 1 chunk +3 lines, -0 lines 0 comments Download
M device/usb/usb_service.cc View 1 3 chunks +14 lines, -2 lines 0 comments Download
M device/usb/usb_service_android.h View 1 2 chunks +5 lines, -8 lines 0 comments Download
M device/usb/usb_service_android.cc View 1 3 chunks +6 lines, -7 lines 0 comments Download
M device/usb/usb_service_linux.h View 1 2 chunks +1 line, -6 lines 0 comments Download
M device/usb/usb_service_linux.cc View 1 6 chunks +40 lines, -41 lines 0 comments Download
M device/usb/usb_service_unittest.cc View 5 chunks +12 lines, -9 lines 0 comments Download

Messages

Total messages: 19 (12 generated)
Reilly Grant (use Gerrit)
Please take a look.
3 years, 7 months ago (2017-04-29 00:32:35 UTC) #3
robliao
Task API Usage lgtm. https://codereview.chromium.org/2849953003/diff/1/device/usb/usb_device_linux.cc File device/usb/usb_device_linux.cc (right): https://codereview.chromium.org/2849953003/diff/1/device/usb/usb_device_linux.cc#newcode33 device/usb/usb_device_linux.cc:33: scoped_refptr<base::SequencedTaskRunner> CreateBlockingTaskRunner() { It might ...
3 years, 7 months ago (2017-05-01 16:36:19 UTC) #8
Reilly Grant (use Gerrit)
Add a shared CreateBlockingTaskRunner() method
3 years, 7 months ago (2017-05-01 20:39:37 UTC) #9
Reilly Grant (use Gerrit)
Remove more passing of the SequencedTaskRunner
3 years, 7 months ago (2017-05-01 20:46:59 UTC) #12
Reilly Grant (use Gerrit)
https://codereview.chromium.org/2849953003/diff/1/device/usb/usb_device_linux.cc File device/usb/usb_device_linux.cc (right): https://codereview.chromium.org/2849953003/diff/1/device/usb/usb_device_linux.cc#newcode33 device/usb/usb_device_linux.cc:33: scoped_refptr<base::SequencedTaskRunner> CreateBlockingTaskRunner() { On 2017/05/01 16:36:19, robliao wrote: > ...
3 years, 7 months ago (2017-05-01 20:57:43 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2849953003/40001
3 years, 7 months ago (2017-05-01 20:58:39 UTC) #16
commit-bot: I haz the power
3 years, 7 months ago (2017-05-01 22:26:22 UTC) #19
Message was sent while issue was closed.
Committed patchset #3 (id:40001) as
https://chromium.googlesource.com/chromium/src/+/221e92f4f397ace9c60dd7361c30...

Powered by Google App Engine
This is Rietveld 408576698