From: Christophe Raffalli <Christophe.Raffalli@univ-savoie.fr>
To: caml-list@inria.fr
Subject: [Fwd: Re: [Caml-list] Scheduling thread problem kernel 2.6]
Date: Fri, 16 Apr 2004 12:22:45 +0200 [thread overview]
Message-ID: <407FB3F5.1060703@univ-savoie.fr> (raw)
[-- Attachment #1.1: Type: text/plain, Size: 1594 bytes --]
Here is the final picture:
I invistigated the following modifications:
A) let preempt = () instead of Thread.yield () in thread_posix.ml (modif
de OCaml)
B) adding proper enter/leaving_blocking_section in glut (file wrap_glut.c)
C) using a timer instead of an idle function for the interactive thread
(I need to redraw the surface when it is moving and I do it event when
it is not moving ;-).
Here are the time mesurments (+X means with modif X, -X means without
modif X):
+A+B+C : ~43s
+A-B+C : loop (never a chance to change thread)
-A+B+C : ~43s
-A-B+C : ~89s
-A+B-C : ~85s
So the real problem were
- a bug in glut (enter_blocking_section was really usefull before
entering the mainLoop !!)
- it is a bad idea to use an Idlefunc with lablGlut if another thread
needs some CPU. Better say I want 20 frames per seconds => I use a times
every 50ms.
- The periodic calls to yield from OCaml are not bad they allow a little
scheduling and did a partial fix of the lablGlut bug, but still this was
not enough to really "fix the bug" (see -A-B+C). But, may be I would
have prefer to discover the bug sooner ...
See my next post ...
--
Christophe Raffalli
Université de Savoie
Batiment Le Chablais, bureau 21
73376 Le Bourget-du-Lac Cedex
tél: (33) 4 79 75 81 03
fax: (33) 4 79 75 87 42
mail: Christophe.Raffalli@univ-savoie.fr
www: http://www.lama.univ-savoie.fr/~RAFFALLI
---------------------------------------------
IMPORTANT: this mail is signed using PGP/MIME
At least Enigmail/Mozilla, mutt or evolution
can check this signature
---------------------------------------------
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 253 bytes --]
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 252 bytes --]
next reply other threads:[~2004-04-16 10:19 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-04-16 10:22 Christophe Raffalli [this message]
2004-04-21 14:57 ` Christophe Raffalli
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=407FB3F5.1060703@univ-savoie.fr \
--to=christophe.raffalli@univ-savoie.fr \
--cc=caml-list@inria.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox