Summary: | [SOUP] Network Cache: Give more priority to reads over writes in IO WorkQueue | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Carlos Garcia Campos <cgarcia> | ||||
Component: | WebKit2 | Assignee: | Nobody <webkit-unassigned> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | commit-queue, svillar, zan | ||||
Priority: | P2 | Keywords: | Gtk | ||||
Version: | 528+ (Nightly build) | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Attachments: |
|
Description
Carlos Garcia Campos
2015-06-09 01:04:43 PDT
Created attachment 254555 [details]
Patch
Attachment 254555 [details] did not pass style-queue:
ERROR: Source/WebKit2/NetworkProcess/cache/NetworkCacheIOChannelSoup.cpp:72: Extra space before ( in function call [whitespace/parens] [4]
Total errors found: 1 in 2 files
If any of these errors are false positives, please file a bug against check-webkit-style.
Comment on attachment 254555 [details]
Patch
Seems like a good idea, hope it doesn't lead to starvation
(In reply to comment #3) > Comment on attachment 254555 [details] > Patch > > Seems like a good idea, hope it doesn't lead to starvation Thanks. Well, this main loop only runs disk cache read/write tasks, so at some point it will finish reading resources from cache and writes will happen, I guess. Comment on attachment 254555 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=254555&action=review > Source/WebKit2/NetworkProcess/cache/NetworkCacheIOChannelSoup.cpp:268 > runTaskInQueue([channel, offset, data, completionHandler] { > channel->write(offset, data, completionHandler); > - }, queue); > + }, queue, G_PRIORITY_DEFAULT_IDLE); This is never called with a non-null WorkQueue, meaning it's always scheduled on the main context. The point being, is the WorkQueue priority scheduling necessary? (In reply to comment #5) > Comment on attachment 254555 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=254555&action=review > > > Source/WebKit2/NetworkProcess/cache/NetworkCacheIOChannelSoup.cpp:268 > > runTaskInQueue([channel, offset, data, completionHandler] { > > channel->write(offset, data, completionHandler); > > - }, queue); > > + }, queue, G_PRIORITY_DEFAULT_IDLE); > > This is never called with a non-null WorkQueue, meaning it's always > scheduled on the main context. The point being, is the WorkQueue priority > scheduling necessary? It's rather the opposite, since it always receives a work queue, it's never scheduled in the main context, but in the work queue main context, and we still want IOChannel::read() to happen before IOChannel::write(). Committed r185366: <http://trac.webkit.org/changeset/185366> |