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

  • From: Pete Goodeve <pete.goodeve@xxxxxxxxxxxx>
  • To: haiku-3rdparty-dev@xxxxxxxxxxxxx
  • Date: Wed, 13 Feb 2013 16:49:17 -0800

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 --

Other related posts: