<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;">Iconic Modula-3 threads would be user-level transparent threads of machine threads, but then you would need threading system to cope with.<br>I believe that current system is OK respect PTHREADS as much as is, this is specially true if there isn't one application that use threads of machine-level likely easier than other application users of them (see for example cvsup), cvsup has strong reliance on network idle times to decompress and use disk files to continue downloading over a two channel communication space, if you have server-side SMP-threads, then it's not easier to use them accordingly, because you still may have lower latencies queuing them and proportionately them to your users (your system will queue them as FIFO), but while your threads might finish connection faster, other user-level threads might need them more time to finish so they will be
locked until (due network considerations and system dequeuing) clients get their messages off-time also, which is not fair if you are downloading small bits of code after other's longer chunks of code.<br>I learned this while downloading with user-level threads and faster than with network same conditions and same machine with p-threads'ed systems longer finish time. Now this is counter-wise effect, as I got this while downloading from user-level thread system.<br>Thanks in advance<br>Thanks in advance<br>http://modula3.elegosoft.com/cm3/<br><br>--- El <b>sáb, 28/4/12, Jay K <i><jay.krell@cornell.edu></i></b> escribió:<br><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"><br>De: Jay K <jay.krell@cornell.edu><br>Asunto: [M3devel] swaping user threads for kernel threads w/o rebuilding everything?<br>Para: "Mika Nystrom" <mika@async.caltech.edu>, dragisha@m3w.org<br>CC: "m3devel"
<m3devel@elegosoft.com><br>Fecha: sábado, 28 de abril, 2012 18:59<br><br><div id="yiv1170810010">
<style><!--
#yiv1170810010 .yiv1170810010hmmessage P
{
margin:0px;padding:0px;}
#yiv1170810010 body.yiv1170810010hmmessage
{
font-size:10pt;font-family:Tahoma;}
--></style><div><div dir="ltr">
To repeat myself: It'd be nice if both sets of code was compiled/linked together and the threading model was selectable via a command line switch and/or link-time option.<br>I understand that would inhibit inlining via function pointers/dynamic linking.<br>Inlining that we surely don't do anyway and whose analog doesn't occur in other C/C++ systems.<br>Taking/releasing a lock would always incur a function call through a pointer.<br><br><br>As it is, you can't even swap m3core.so out, because the types are too different. You have to recompile or at least relink everything.<br><br><br>I could do the work, but I believe so far that Tony doesn't want it.<br><br><br><br> - Jay<br><br><br><div><div id="yiv1170810010SkyDrivePlaceholder"></div>> To: dragisha@m3w.org<br>> Date: Sat, 28 Apr 2012 09:50:38 -0700<br>> From: mika@async.caltech.edu<br>> CC: m3devel@elegosoft.com<br>> Subject: Re: [M3devel] Mika's thread test, -tests read<br>>
<br>> <br>> Yes I have done it with user threads on CM3. <br>> <br>> (BTW, that is the configuration I always use on Darwin and Linux for "work".)<br>> <br>> There are a few ways of doing the configuration. The main thing is that the<br>> file <br>> <br>> m3-libs/m3core/src/thread/m3makefile<br>> <br>> contains the code >>><br>> <br>> include_dir ("Common")<br>> <br>> <br>> if equal (OS_TYPE, "WIN32") or equal(TARGET, "NT386")<br>> include_dir ("WIN32")<br>> else<br>> if (NO_USER_THREADS contains TARGET) or ((not defined("NOPTHREAD")) and USE_PTHREADS{TARGET})<br>> include_dir("PTHREAD")<br>> else<br>> include_dir (OS_TYPE)<br>> end<br>> end<br>> <br>> <<<<br>> <br>> NO_USER_THREADS and USE_PTHREADS come from the config file.<br>> <br>> Mika<br>> <br>> =?utf-8?Q?Dragi=C5=A1a_Duri=C4=87?= writes:<br>>
>Mika said it does not happen with user threads. But he also said he is =<br>> >using pm3 mostly=E2=80=A6 So question is - did he run it with cm3, any =<br>> >version, with user threads.<br>> ><br>> >What are build parameters for cm3 with user threads?=20<br>> ><br>> >On Apr 28, 2012, at 2:58 PM, Antony Hosking wrote:<br>> ><br>> >> That means it is even more serious.<br>> >> Can we verify that it only happens with pthread threading?<br>> >>=20<br>> >> Sent from my iPad<br>> >>=20<br>> >> On Apr 28, 2012, at 1:49 AM, Dragi=C5=A1a Duri=C4=87 =<br>> ><dragisha@m3w.org> wrote:<br>> >>=20<br>> >>> It's not only AMD64_* if it's any consolation: :)<br></div> </div></div>
</div></blockquote></td></tr></table>