Use io_prio as mainloop prio for async-emulation (#579449)
authorAlexander Larsson <alexl@redhat.com>
Thu, 18 Jun 2009 17:43:46 +0000 (19:43 +0200)
committerAlexander Larsson <alexl@redhat.com>
Thu, 18 Jun 2009 17:43:46 +0000 (19:43 +0200)
commit8cb481fd5ff44c7e82f59948567ad0b417297555
tree92fabee284195e9c844486da8f8a6ab36a112677
parent9fba81288424cd7ef45e28565fa878c93a962c17
Use io_prio as mainloop prio for async-emulation (#579449)

I'm not sure why we used the elaborate formula to convert the io-priority
to the priority of the mainloop idle when emulating async i/o with idles.
However, it causes the default io priority to be less than the normal
idle prio, so the i/o won't be scheduled if there is an idle outstanding.

There is really no great mapping to use here, doing blocking i/o in an
idle of any prio is generally bad and apps doing a lot of async i/o should
initialize threads. However, if we use the io-priority directly we at least
avoid the starvation problem above and make things easier to understand.
gio/gioscheduler.c