public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* solved (was Re: xterm scrolling speed - scheduling weirdness in 2.6 ?!)
@ 2004-04-03 20:53 Soeren Sonnenburg
  0 siblings, 0 replies; 5+ messages in thread
From: Soeren Sonnenburg @ 2004-04-03 20:53 UTC (permalink / raw)
  To: Linux Kernel; +Cc: jamie, tconnors+linuxkernel1080972247

Sorry for breaking up the thread... This is copy+paste work.

[...]
> > I fixed this issue in multi-gnome-terminal by using a buffer of 32kb.
> > It is filled as long as there is input comming in within 10ms.
> > If the buffer is full or 10ms passed the buffer is written out to the
> > screen. This makes it also 2-3 times faster on kernel 2.4.
> 
> A factor of 2 or 3 though?
> 
> In 2.4, to ls -lA my home directory with its 510 files, took less than
> 0.5 sec. Currently, buffering via cat in 2.6 takes 0.5 sec. Just
> straight ls -lA takes 6 seconds or so.
>
> Does your factor of 3 bring you up to what you were seeing in 2.4, or
> do you still have a regression?

Huh? Maybe you read the mail again. IT IS NOW 2-3 TIMES FASTER ON 2.4 !

And yes on kernel 2.6, ls -lA /usr/bin (~3200files) pops up 0.6s on this
667Mhz G4 powerbook here (which might be a little faster than your
machine).

To make it clear once again. There was a busy loop in the terminal doing
while ( (saveerrno == EAGAIN) && (count = read (fd, buffer, 4096)) > 0) 
{
    saveerrno = errno;

	output stuff
}

If the terminal process gets to much cpu for too long this will make the
terminal spit out characters one by one. This in turn will obviously
turn of any jumpscrolling. When I add a usleep of 5ms in this loop jump
scrolling is working nicely again (but it is still slower than the
solution I proposed). This again underlines that _this_ is not a kernel
schedulers bug.

And yes, since probably all other terminals have their roots in xterm
every terminal is affected!

The fix (see other mail) was for multi-gnome-terminal, which in turn has
its roots in the old gnome-terminal.

This fix is now in debian unstable/mgt cvs.

Wwwoffle might have other issues. Is your CPU to the max while this is
happening ? Which process eats up CPU then ? In the mgt/xterm case this
was easily observable - mgt eat up all cpu. If that is the case you
observe another polling bug triggered by this scheduler making your
process to get too high priority and thus via polling cpu time. 

Soeren

PS: Please CC me I am not subscribed, sometimes reading the archives
though.


^ permalink raw reply	[flat|nested] 5+ messages in thread
* Re: xterm scrolling speed - scheduling weirdness in 2.6 ?!
@ 2004-01-04 14:42 Martin Schlemmer
  2004-01-04 22:58 ` szonyi calin
  0 siblings, 1 reply; 5+ messages in thread
From: Martin Schlemmer @ 2004-01-04 14:42 UTC (permalink / raw)
  To: Con Kolivas
  Cc: Soeren Sonnenburg, Willy Tarreau, Mark Hahn,
	Linux Kernel Mailing Lists, gillb4

[-- Attachment #1: Type: text/plain, Size: 3611 bytes --]

On Sun, 2004-01-04 at 14:45, Con Kolivas wrote:
> On Sun, 4 Jan 2004 22:13, Martin Schlemmer wrote:
> > On Sun, 2004-01-04 at 10:49, Con Kolivas wrote:
> > > > I added a fprintf(stderr, "%d\n", amount); to that code and indeed
> > > > amount was *always* 1 no matter what I did (it even was 1 when the
> > > > (dmesg/...) output came in fast). And jump scrolling would take place
> > > > if amount > 59 in my case... can this still be not a schedulers issue ?
> > > >
> > > >
> > > > Looking at that how can it not be a scheduling problem ....
> > >
> > > Scheduling problem, yes; of a sort.
> > >
> > > Solution by altering the scheduler, no.
> > >
> > > My guess is that turning the xterm graphic candy up or down will change
> > > the balance. Trying to be both gui intensive and a console is where it's
> > > happening. On some hardware you are falling on both sides of the fence
> > > with 2.6 where previously you would be on one side.
> >
> > So its Ok for 'eye candy' to 'lag', but xmms should not skip?  Anyhow,
> > its xterm that he have issues with, not gnome-terminal or such with
> > transparency.  I smell something ...
> 
> Sigh... 
> 
> Xmms was a simple test case long forgotten but most still think all I did was 
> make an xmms scheduler. Deleting one character from sched.c before all of my 
> patches would make the scheduler ideal for xmms. Any braindead idiot can tune 
> a scheduler for just one application.

Well, its the favorite example 8)

>  An application that changes it's 
> behaviour dynamically well in the setting of a particular scheduler, though? 
> Should a scheduler be tuned to suit a coding style or quirk? 
> 

But the scheduler changes to a particular application?  I still am of
opinion that the current scheduler in mainline 'breaks' priorities ...
call it dynamic tuning or whatever you like.  Now something gets
priority while something else starves.

> I should go back to lurking before people start calling me names. This thread 
> has gone long enough for that. If I hadn't said anything it would have died 
> out by now.

Well, I have stayed out of this for months now, as its always 'they' at
fault - that app, or piece of code.  Sure, I am one of those whining
users, and I have no particular interest in the scheduler code - that
is if it behaves like it should.  But whatever is in now, just do not
behave as expected, and call it a feature or whatever you want, if it
deviates the definition, then what should we call it?  Or if its a
feature, can we have the weirdness in priorities disabled by default
with a sysctl or sysfs switch?

> Instead I'm drawing attention to my fundamentally flawed code.
> 

The scrolling is but one part.  Just starting an app, or running
'vim /etc/fstab' for example takes ages some times, even with
minimal load.  If xterm, gnome-term, aterm, multi-gnome-term,
etc is broken, how do we fix it then?  What about some of the
other issues?  If its a problem with those apps, why is it I still
wonder what they are doing wrong, and it not fixed?

Do not worry, _I_ will go back to lurking about this issue _again_,
but after _once_again_ seeing a issue about this being blown off
as being something wrong with 'it', and some facts (you did see
that the skipping code for the other user _never_ kicked in)
were just ignored, I just could not help myself - sorry.

At least I will not experience those issues of the others, and
hopefully Nick will not stop his work, or things change too much
to adapt his patch.


Thanks,

-- 
Martin Schlemmer

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2004-04-03 20:53 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-04-03 20:53 solved (was Re: xterm scrolling speed - scheduling weirdness in 2.6 ?!) Soeren Sonnenburg
  -- strict thread matches above, loose matches on Subject: below --
2004-01-04 14:42 xterm scrolling speed - scheduling weirdness in 2.6 ?! Martin Schlemmer
2004-01-04 22:58 ` szonyi calin
2004-01-04 23:33   ` Willy Tarreau
2004-01-04 23:47     ` Mike Fedyk
2004-01-05  9:50       ` Kenneth Johansson
2004-04-02 18:22         ` solved (was Re: xterm scrolling speed - scheduling weirdness in 2.6 ?!) Soeren Sonnenburg
2004-04-03  5:35           ` Tim Connors
2004-04-03  6:06             ` Tim Connors
2004-04-03 14:11               ` Jamie Lokier

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox