Re: [AD] XIM patch for Allegro 4.1.x |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
- To: alleg-developers@xxxxxxxxxx
- Subject: Re: [AD] XIM patch for Allegro 4.1.x
- From: Elias Pschernig <allefant@xxxxxxxxxx>
- Date: Wed, 24 Nov 2004 03:18:50 +0100
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:references; b=VP//+NyNfnARuqR0isO4T/icXS28Bgu5rygxm0eUpWy7HkFIBtfOMHNZfacnplQKI3CgSda/BxSfW/7ikZBtA7XCr7JEMm2/UNb8j6V3VdkCkB931Fl3XYI48ujvv6CoJ3YsjA6ISX2AfdQuwD4S3W2CN1dFbQbjnQUwGOBCqr4=
On Wed, 2004-11-24 at 00:56 +0100, Julien Cugnière wrote:
> Well, I'm using a vanilla 2.6.9 kernel. The kernel is preemptible, if that
> matters. Anyway, attached is a *weird*, minimal test case.
>
Same kernel I'm using, then.
> It is highly unresponsive: it can sometime take more than a second before key
> presses/releases appear on screen. However, if at the beginning, "rest(1)" is
> replaced by "rest(0)", or removed altogether, then the program becomes
> perfectly responsive. The problem seems to be caused by the select() call
> inside rest, because if rest() is replaced by rest_callback(), which uses
> gettimeofday, then the program works fine.
>
> The question is, why would calling rest in the beginning of the program slow
> down a loop later on ?!? This is so weird that if nobody can reproduce it,
> I'll assume this is a problem with my system being somehow broken...
Your program is completely responsive here - so yes, I can't reproduce this.
I'm using XFree86 4.3.0.1.
When you call rest(0), it gets responsive, right? So I think, it is just
some scheduler setting. It sees the application is using 100% CPU, so it
increases the timeslice, making it unresponsive. If it calls rest(0),
the scheduler will break from the timeslice, and schedule it again at
once - so this makes it responsive. Or something like that. I believe
I remember from the kernel config that you can adjust the scheduler
behavior somehow.