RESOLVED FIXED 145791
[SOUP] Network Cache: Give more priority to reads over writes in IO WorkQueue
https://bugs.webkit.org/show_bug.cgi?id=145791
Summary [SOUP] Network Cache: Give more priority to reads over writes in IO WorkQueue
Carlos Garcia Campos
Reported 2015-06-09 01:04:43 PDT
We could keep the default priority for reads and use idle priority for writes.
Attachments
Patch (4.61 KB, patch)
2015-06-09 01:09 PDT, Carlos Garcia Campos
svillar: review+
Carlos Garcia Campos
Comment 1 2015-06-09 01:09:05 PDT
WebKit Commit Bot
Comment 2 2015-06-09 01:11:48 PDT
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.
Sergio Villar Senin
Comment 3 2015-06-09 01:15:27 PDT
Comment on attachment 254555 [details] Patch Seems like a good idea, hope it doesn't lead to starvation
Carlos Garcia Campos
Comment 4 2015-06-09 01:18:33 PDT
(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.
Zan Dobersek
Comment 5 2015-06-09 02:17:00 PDT
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?
Carlos Garcia Campos
Comment 6 2015-06-09 02:36:27 PDT
(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().
Carlos Garcia Campos
Comment 7 2015-06-09 10:12:29 PDT
Note You need to log in before you can comment on or make changes to this bug.