caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Christophe Raffalli <christophe.raffalli@univ-savoie.fr>
To: Xavier Leroy <Xavier.Leroy@inria.fr>
Cc: caml-list <caml-list@inria.fr>
Subject: Re: [Caml-list] Thread and kernel 2.6 pb still there in CVS
Date: Mon, 28 Jun 2004 22:26:20 -0400	[thread overview]
Message-ID: <40E0D34C.2040808@univ-savoie.fr> (raw)
In-Reply-To: <20040628150805.GC7353@yquem.inria.fr>

Xavier Leroy wrote:
>>I tried to submit a change in vouillon's entry in the bug tracking 
>>system (classed as not a bug because can not reproduce), but as I am not 
>>sure it worked, So I also post this here
> 
> 
> You should be grateful to Olivier Andrieu, who actually cared to
> submit a bug report along with useful info on 2.6 kernels.
> 

Sorry, but I thought continuing an entry in the bug tracking was better 
than adding one (but I was unable tu actually make a comment in that 
entry !)


> The question I'm currently investigating is whether the call to
> sched_yield() can be omitted, as it's just a scheduling hint.  Initial
> experiments suggested that this would hurt fairness (in Caml thread
> scheduling) quite a lot on all platforms other than Linux 2.6.
> More careful experiments that I'm currently conducting suggest that it
> might not be so bad.  One can also play games where sched_yield()
> isn't called if there are no other Caml threads waiting for the global
> Caml mutex.

Someone (I do not remember who) suggested a call to select in place of 
sched_yield.

My thought about semantics in that
- a system call saying schedule just now or later (like the semantics of 
sched_yield in 2.4) only lower the percentage of CPU a thread get, 
except if you manage to have your thread "in phase" (I do not know if 
this is proper english) with the scheduler.

Then to lower your % of CPU you should use renice (but I do not know if 
the semantics of renice is per thread or per processus).

However a system call saying "I do not not need CPU for a while" could 
be usefull ... but it should have another name not to break existing 
program ... and should have an (optional ?) argument saying how long is 
this while.

So I think the 2.6 developper are right, but should have created a new 
system call. and let sched yield unchanged.

Any one can feel free to forward my post to a kernel developpers list :-)

> In summary, a solution will eventually be found, but please be
> patient, and submit a bug report next time.
> 
> - Xavier Leroy

-- 
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


  parent reply	other threads:[~2004-06-28 20:26 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-06-22 22:41 [Caml-list] Why must types be always defined at the top level? Richard Jones
2004-06-22 22:53 ` Markus Mottl
2004-06-22 23:32   ` skaller
2004-06-23 12:01     ` Andreas Rossberg
2004-06-23 14:45       ` skaller
2004-06-23 16:28         ` Andreas Rossberg
2004-06-23 20:21           ` skaller
2004-06-23 20:52             ` skaller
2004-06-24 14:27               ` John Hughes
2004-06-24 16:47                 ` Andreas Rossberg
2004-06-24 17:30                   ` Markus Mottl
2004-06-24 17:45                 ` Xavier Leroy
2004-06-24 19:46                   ` John Hughes
2004-06-24 19:56                     ` David Brown
2004-06-24 19:57                     ` William D. Neumann
2004-06-24 20:13                       ` Olivier Andrieu
2004-06-24 23:26                     ` Brian Hurt
2004-06-25 10:20                     ` skaller
2004-06-25 11:07                       ` Basile Starynkevitch [local]
2004-06-25 12:30                         ` skaller
2004-06-25 14:38                           ` [Caml-list] Thread and kernel 2.6 pb still there in CVS Christophe Raffalli
2004-06-25 16:08                             ` [Caml-list] " Marco Maggesi
2004-06-25 16:32                               ` Markus Mottl
2004-06-28 15:08                             ` [Caml-list] " Xavier Leroy
2004-06-28 18:50                               ` Benjamin Geer
2004-06-29  2:26                               ` Christophe Raffalli [this message]
     [not found]                                 ` <7AFB5F64-C944-11D8-975C-00039310CAE8@inria.fr>
     [not found]                                   ` <40E11621.3050709@univ-savoie.fr>
2004-07-05 15:14                                     ` Christophe Raffalli
2004-07-05 16:34                                       ` Xavier Leroy
2004-07-06  9:33                                         ` Alex Baretta
2004-07-08 13:51                                           ` Christophe Raffalli
2004-07-08 15:03                                             ` Xavier Leroy
2004-07-09 23:21                               ` Donald Wakefield
2004-07-10 10:56                                 ` Damien Doligez
2004-06-24 23:23                   ` [Caml-list] Why must types be always defined at the top level? Brian Hurt
     [not found]                     ` <Pine.LNX.4.44.0406241813370.4202-100000@localhost.localdom ain>
2004-06-26 23:08                       ` Dave Berry
2004-06-25  1:59                   ` Yaron Minsky
2004-06-24 23:08                 ` Brian Hurt

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=40E0D34C.2040808@univ-savoie.fr \
    --to=christophe.raffalli@univ-savoie.fr \
    --cc=Xavier.Leroy@inria.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;
as well as URLs for NNTP newsgroup(s).