From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id JAA16613; Tue, 13 Apr 2004 09:53:59 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id JAA17152 for ; Tue, 13 Apr 2004 09:53:58 +0200 (MET DST) Received: from post.bourget.univ-savoie.fr (post.bourget.univ-savoie.fr [193.48.120.73]) by nez-perce.inria.fr (8.12.10/8.12.10) with ESMTP id i3D7svjq017146 for ; Tue, 13 Apr 2004 09:54:57 +0200 Received: from univ-savoie.fr (d85.lama.univ-savoie.fr [193.48.123.85]) by post.bourget.univ-savoie.fr (8.12.3/jtpda-5.4) with ESMTP id i3D7vOKC003444 ; Tue, 13 Apr 2004 09:57:24 +0200 Message-ID: <407B9D6F.70800@univ-savoie.fr> Date: Tue, 13 Apr 2004 09:57:35 +0200 From: Christophe Raffalli User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040115 X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.os.linux.misc To: caml-list@inria.fr Subject: [Caml-list] Scheduling thread problem kernel 2.6 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.33 (www . roaringpenguin . com / mimedefang) X-Miltered: at nez-perce by Joe's j-chkmail ("http://j-chkmail.ensmp.fr")! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; raffalli:01 raffalli:01 univ-savoie:01 caml-list:01 threads:01 threads:01 mandrake:01 savoie:01 chablais:01 73376:01 univ-savoie:01 lama:01 enigmail:01 mutt:01 kernel:01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk X-Status: X-Keywords: X-UID: 268 Message posted to comp.os.linux.misc and caml-list. I am having a scheduling problem with a Caml program that uses two threads: - one CPU intensive thread - one interface thread (using Glut + OpenGL) and often doing nothing The problem is that the CPU intensive thread never gets more than 50% (near 100% expected) of the CPU (usually 20 to 30%). Moreover the thread only get less than 20% (near 50% expected) if another CPU intensive process is running. I suspect that the scheduling algorithm uses the behaviour of the interface thread to predict (wrongly) that both threads need little CPU. This seems confirmed by the fact that call to Thread.yield in the interface thread slow down the CPU intensive thread ! The problem exists with all versions of kernel 2.6 I tried (from 2.6.3 to 2.6.5 unpatched and the Mandrake 2.6.3). Everything is fine with a kernel 2.4. Playing with SCHEDULING_SCOPE_SYSTEM and SCHEDULING_SCOPE_PROCESS changes nothing. Any hint ? -- 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 --------------------------------------------- ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners