[haiku-development] Re: Proposing kernel patch: mutexes/priorities

  • From: Julian Harnath <julian.harnath@xxxxxxxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Sat, 03 Mar 2012 01:20:00 +0100

Hey!

Here's an update to my work on ticket 8007 [1] (priority inheritance).

I've just attached a new, second version of my earlier patch to the 
ticket, and with it, the issue seems to be solved now! :)
The previous version of my patch had two bugs in it relating to 
unboosting threads back to their original priority. It didn't always do 
it in mutex_unlock, and I had forgotten to also unboost in 
mutex_destroy and mutex_transfer_lock. That way, priorites became 
messed up and caused further problems.

After fixing these issues, it works fine now, at least here :D The 
"sometimes freezing when booting"-problem I wrote about in the previous 
mail is now gone too. On my Atom singlecore-CPU netbook, with the patch 
applied, I can now open a large textfile in stylededit without freezing 
the entire system. Of course, StyledEdit itself still freezes and it 
also causes a slowdown of the rest of Haiku's GUI, because StyledEdit 
does a lot of processing in its GUI thread. However, the mouse doesn't 
freeze anymore (although I noticed that it can still have rare slight 
hiccups) and windows can be moved around smoothly as well. Without the 
patch, the entire system just remains frozen for a while.

On my desktop, which also has a singlecore CPU, there is still a 
problem with mouse cursor freezing etc, but that seems to be another 
issue, unrelated to priorities. I suspect it has to do with interrupt 
routing, this machine had severe problems with it on Haiku before... 
since the work on interrupt routing a while ago it became better, but 
it seems some problems remain.

Would be great if some other people who had the problem could test it 
out. Maybe it's also worth to make some benchmarks with/without, I will 
look into that, *maybe* it increases overall performance a little.

Also, as I said before, please take a close look at the patch to ensure 
I didn't break anything, since it's my first experience with working on 
the Haiku kernel :)

Greetings,
Julian

[1] https://dev.haiku-os.org/ticket/8007

Other related posts: