Bug #1180

Interactive performance regression since 2.0

Added by hasso over 5 years ago. Updated about 5 years ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:-
Target version:-

Description

Interactivity of desktop environment is significantly worse in current
master than it was in 2.0 due to scheduler changes:

http://leaf.dragonflybsd.org/mailarchive/commits/2008-09/msg00094.html

History

#1 Updated by dillon over 5 years ago

:Interactivity of desktop environment is significantly worse in current
:master than it was in 2.0 due to scheduler changes:
:
:http://leaf.dragonflybsd.org/mailarchive/commits/2008-09/msg00094.html
:
:--
:Hasso Tepper

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.

-Matt
Matthew Dillon
<>

#2 Updated by dillon over 5 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.

-Matt

#3 Updated by dillon over 5 years ago

Please try this patch, Hasso. This is not a complete solution but
it should help.

fetch http://apollo.backplane.com/DFlyMisc/sched01.patch

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.

-Matt

#4 Updated by hasso about 5 years ago

The fix is committed.

Also available in: Atom PDF