Interactive performance regression since 2.0
Interactivity of desktop environment is significantly worse in current
master than it was in 2.0 due to scheduler changes:
#1 Updated by dillon about 6 years ago
:Interactivity of desktop environment is significantly worse in current
:master than it was in 2.0 due to scheduler changes:
Yes, I'm definitely seeing issues.
If I do a 'while(1) end' in a csh then interactivity with e.g. Firefox
goes to hell. It isn't supposed to do that. I think the
non-interactive thread is interfering with the UI's heavily
interactive operations between the X server and the application.
I will try to track this down today. I thought I had fixed this by
allowing reschedules when the current user process has a low dynamic
priority but it doesn't seem to be working the way it is supposed to.
#2 Updated by dillon about 6 years ago
Ok, I tracked the problem down. Basically what is happening is that
a new current user lwp is selected while other user threads are
sitting in the LWKT run queue which have not yet had a chance to add
themselves back to the userland queue.
The problem is that I can't just cycle the run queue by calling
lwkt_switch(), because new user threads may pop onto it at any time.
I hope to be able to fix it tonight but it will require some
significant work and may extend into tomorrow.
#3 Updated by dillon about 6 years ago
Please try this patch, Hasso. This is not a complete solution but
it should help.
It muffs up some of the optimizations I made for the network stack and
depends way to heavily on the scheduler helper thread. I
need to make some significant changes to the way the scheduler
tracks the current process and create a generic priority field that
can be propogated in messages to clean those up.
Note that firefox screws up interactive performance even under the best
of circumstances. Half the sites I bring up cause it to spam the X
server at 100% for seconds on end for reasons beyond my understanding.
In anycase, if this patch works ok for you I will commit it as a
temporary bandaid while I work on something better.