[haiku-3rdparty-dev] Re: Problem with High Disk-IO Freezing GUI

  • From: Andrew Lindesay <apl@xxxxxxxxxxxxxx>
  • To: pete.goodeve@xxxxxxxxxxxx
  • Date: Thu, 14 Feb 2013 20:56:55 +1300

Hi Pete;

Thanks for the insight on that. I have two cores and I still seem to see the problem. It turns out that it unfortunately requires ~250ms minimum pause for it to keep functioning in this example; it will be quite a bit worse in my actual application. Do you happen to know if there is an existing ticket number for this issue; maybe I can attach my sample code to it to help.

Regards;

On 14/02/13 1:49 PM, Pete Goodeve wrote:
On Thu, Feb 14, 2013 at 10:29:11AM +1300, Andrew Lindesay wrote:

I have been working on a small Haiku application for a while.  A first
thing the user does with the application is to install some data.  The
data needs to be processed and this processing takes a while and is a
bit disk-IO intensive.  For this reason, I put up a progress bar so the
user can see something is happening.  Unfortunately, the heavy disk-IO
seems to render the 'GUI' unresponsive; even the mouse-pointer freezes.

(meanwhile; another person has checked and the problem doesn't seem to
be happening on real hardware; just on virtual hardware - VirtualBox.)

To demonstrate the problem, I have built a small Haiku application with
just this problem distilled out.  You can get this from;

http://www.silvereye.co.nz/tmp/maketrouble-1.0.0.tgz

I'd like to know if there's anything that can be done in Haiku to better
handle this in a future release or is there anything that I should be
doing differently in my application to better handle this?

I did a quick check with the above source, and yes, it happens
-- *if* you have only a single processor.  On my 4-processor machine
I normally don't see it, but if I turn off 3 of them I get a display freeze
while the disk is being accessed.

I suspect this is the same 'priority inversion' problem that has been
bugging a number of us!  It really shouldn't happen, but there may not
be much you can do about it until the glitch is fixed.  (It is being worked
on -- still, I hope!)  Maybe just a very short pause between I/O would
help without slowing things too much

        -- Pete --




--
Andrew Lindesay

Other related posts: