From sdiris@gmail.com Sat Dec 01 20:48:13 2012
Received: from ppsw-51.csi.cam.ac.uk ([131.111.8.151])
	by lists-2.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25)
	with esmtp id 1Tetyv-0005Bu-1P (Exim 4.70) for
	cl-mirage@lists.cam.ac.uk
	(return-path <sdiris@gmail.com>); Sat, 01 Dec 2012 20:48:13 +0000
X-Cam-AntiVirus: no malware found
X-Cam-SpamDetails: score -0.8 from SpamAssassin-3.3.2-1415545 
	* -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/,
	low *      trust
	*      [74.125.82.53 listed in list.dnswl.dnsbl.ja.net]
	* 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail
	provider *       (sdiris[at]gmail.com)
	*  0.0 HTML_MESSAGE BODY: HTML included in message
	* -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from
	*      author's domain
	*  0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily
	*      valid
	* -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature
X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/
Received: from mail-wg0-f53.google.com ([74.125.82.53]:59094)
	by ppsw-51.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.148]:25)
	with esmtp id 1Tetyu-0005J4-WZ (Exim 4.72) for
	cl-mirage@lists.cam.ac.uk
	(return-path <sdiris@gmail.com>); Sat, 01 Dec 2012 20:48:12 +0000
Received: by mail-wg0-f53.google.com with SMTP id ei8so642555wgb.20
	for <cl-mirage@lists.cam.ac.uk>; Sat, 01 Dec 2012 12:48:11 -0800 (PST)
Received: by 10.216.73.11 with SMTP id u11mr1727142wed.221.1354394891844;
	Sat, 01 Dec 2012 12:48:11 -0800 (PST)
Received: from yimingwin7 (c188.al.cl.cam.ac.uk. [128.232.110.188])
	by mx.google.com with ESMTPS id fq6sm4413078wib.7.2012.12.01.12.48.09
	(version=TLSv1/SSLv3 cipher=OTHER);
	Sat, 01 Dec 2012 12:48:10 -0800 (PST)
From: "Yiming Zhang" <sdiris@gmail.com>
To: <cl-mirage@lists.cam.ac.uk>
Subject: tuareg mode in emacs
Date: Sat, 1 Dec 2012 20:48:11 -0000
Message-ID: <007b01cdd005$2e32d6b0$8a988410$@gmail.com>
MIME-Version: 1.0
Content-Type: multipart/alternative;
	boundary="----=_NextPart_000_007C_01CDD005.2E33C110"
X-Mailer: Microsoft Outlook 14.0
Thread-Index: Ac3QA4ReSQmzEblARN6a3urg7lWIig==
Content-Language: zh-cn
X-BeenThere: cl-mirage@lists.cam.ac.uk
X-Mailman-Version: 2.1.8
Precedence: list
List-Id: MirageOS development <cl-mirage.lists.cam.ac.uk>
List-Unsubscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=unsubscribe>
List-Archive: <https://lists.cam.ac.uk/pipermail/cl-mirage>
List-Post: <mailto:cl-mirage@lists.cam.ac.uk>
List-Help: <mailto:cl-mirage-request@lists.cam.ac.uk?subject=help>
List-Subscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=subscribe>
X-List-Received-Date: Sat, 01 Dec 2012 20:48:13 -0000
Content-Length: 4791
Lines: 137

This is a multipart message in MIME format.

------=_NextPart_000_007C_01CDD005.2E33C110
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: 7bit

Hi,

 

I am studying how to use tuareg mode in emacs for ocaml program development.
I think most ocaml programmers use it, right? Currently I meet several
problems, including:

 

(1) how to make emacs support lwt? Currently the keywords of lwt cannot be
parsed, and during debug when I want to "next" a lwt statement it reports
"No source file for lwt" L

 

(2) how to make emacs (or is it possible to) show several windows at the
same time? For example, I might want to click on a file name in the left
window to open a .ml file in the right-top window, to click a variable name
in the top window to show its definition in the bottom window, like what I
can do in "source insight" and "visual studio"?

 

Thank you very much!

Yiming


------=_NextPart_000_007C_01CDD005.2E33C110
Content-Type: text/html;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

<html xmlns:v=3D"urn:schemas-microsoft-com:vml" =
xmlns:o=3D"urn:schemas-microsoft-com:office:office" =
xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns:m=3D"http://schemas.microsoft.com/office/2004/12/omml" =
xmlns=3D"http://www.w3.org/TR/REC-html40"><head><meta =
http-equiv=3DContent-Type content=3D"text/html; =
charset=3Dus-ascii"><meta name=3DGenerator content=3D"Microsoft Word 14 =
(filtered medium)"><style><!--
/* Font Definitions */
@font-face
	{font-family:Wingdings;
	panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
	{font-family:SimSun;
	panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
	{font-family:SimSun;
	panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
	{font-family:Calibri;
	panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
	{font-family:SimSun;
	panose-1:2 1 6 0 3 1 1 1 1 1;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0cm;
	margin-bottom:.0001pt;
	text-align:justify;
	text-justify:inter-ideograph;
	font-size:10.5pt;
	font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
	{mso-style-priority:99;
	color:blue;
	text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
	{mso-style-priority:99;
	color:purple;
	text-decoration:underline;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
	{mso-style-priority:34;
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:justify;
	text-justify:inter-ideograph;
	text-indent:21.0pt;
	font-size:10.5pt;
	font-family:"Calibri","sans-serif";}
span.EmailStyle17
	{mso-style-type:personal-compose;
	font-family:"Calibri","sans-serif";
	color:windowtext;}
.MsoChpDefault
	{mso-style-type:export-only;
	font-family:"Calibri","sans-serif";}
/* Page Definitions */
@page WordSection1
	{size:612.0pt 792.0pt;
	margin:72.0pt 90.0pt 72.0pt 90.0pt;}
div.WordSection1
	{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext=3D"edit" spidmax=3D"1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext=3D"edit">
<o:idmap v:ext=3D"edit" data=3D"1" />
</o:shapelayout></xml><![endif]--></head><body lang=3DZH-CN link=3Dblue =
vlink=3Dpurple style=3D'text-justify-trim:punctuation'><div =
class=3DWordSection1><p class=3DMsoNormal><span =
lang=3DEN-US>Hi,<o:p></o:p></span></p><p class=3DMsoNormal><span =
lang=3DEN-US><o:p>&nbsp;</o:p></span></p><p class=3DMsoNormal><span =
lang=3DEN-US>I am studying how to use tuareg mode in emacs for ocaml =
program development. I think most ocaml programmers use it, right? =
Currently I meet several problems, including:<o:p></o:p></span></p><p =
class=3DMsoNormal><span lang=3DEN-US><o:p>&nbsp;</o:p></span></p><p =
class=3DMsoNormal><span lang=3DEN-US>(1) how to make emacs support lwt? =
Currently the keywords of lwt cannot be parsed, and during debug when I =
want to &#8220;next&#8221; a lwt statement it reports &#8220;No source =
file for lwt&#8221; </span><span lang=3DEN-US =
style=3D'font-family:Wingdings'>L</span><span =
lang=3DEN-US><o:p></o:p></span></p><p class=3DMsoNormal><span =
lang=3DEN-US><o:p>&nbsp;</o:p></span></p><p class=3DMsoNormal><span =
lang=3DEN-US>(2) how to make emacs (or is it possible to) show several =
windows at the same time? For example, I might want to click on a file =
name in the left window to open a .ml file in the right-top window, to =
click a variable name in the top window to show its definition in the =
bottom window, like what I can do in &#8220;source insight&#8221; and =
&#8220;visual studio&#8221;?<o:p></o:p></span></p><p =
class=3DMsoNormal><span lang=3DEN-US><o:p>&nbsp;</o:p></span></p><p =
class=3DMsoNormal><span lang=3DEN-US>Thank you very =
much!<o:p></o:p></span></p><p class=3DMsoNormal><span =
lang=3DEN-US>Yiming<o:p></o:p></span></p></div></body></html>
------=_NextPart_000_007C_01CDD005.2E33C110--



From avsm@dark.recoil.org Sun Dec 02 11:44:11 2012
Received: from ppsw-43.csi.cam.ac.uk ([131.111.8.143])
	by lists-2.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25)
	with esmtp id 1Tf7xz-0004ni-Kw (Exim 4.70) for
	cl-mirage@lists.cam.ac.uk
	(return-path <avsm@dark.recoil.org>); Sun, 02 Dec 2012 11:44:11 +0000
X-Cam-AntiVirus: no malware found
X-Cam-SpamDetails: score 0.0 from SpamAssassin-3.3.2-1415949
X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/
Received: from recoil.dh.bytemark.co.uk ([89.16.177.154]:6153
	helo=dark.recoil.org)
	by ppsw-43.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.149]:25)
	with smtp id 1Tf7xx-0002ez-pJ (Exim 4.72) for cl-mirage@lists.cam.ac.uk
	(return-path <avsm@dark.recoil.org>); Sun, 02 Dec 2012 11:44:11 +0000
Received: (qmail 22202 invoked by uid 10000); 2 Dec 2012 11:44:08 -0000
Date: Sun, 2 Dec 2012 11:44:08 +0000
From: Anil Madhavapeddy <anil@recoil.org>
To: Yiming Zhang <sdiris@gmail.com>
Subject: Re: tuareg mode in emacs
Message-ID: <20121202114408.GB12654@dark.recoil.org>
References: <007b01cdd005$2e32d6b0$8a988410$@gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <007b01cdd005$2e32d6b0$8a988410$@gmail.com>
User-Agent: Mutt/1.5.21 (2010-09-15)
Cc: cl-mirage@lists.cam.ac.uk
X-BeenThere: cl-mirage@lists.cam.ac.uk
X-Mailman-Version: 2.1.8
Precedence: list
List-Id: MirageOS development <cl-mirage.lists.cam.ac.uk>
List-Unsubscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=unsubscribe>
List-Archive: <https://lists.cam.ac.uk/pipermail/cl-mirage>
List-Post: <mailto:cl-mirage@lists.cam.ac.uk>
List-Help: <mailto:cl-mirage-request@lists.cam.ac.uk?subject=help>
List-Subscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=subscribe>
X-List-Received-Date: Sun, 02 Dec 2012 11:44:11 -0000
Content-Length: 1114
Lines: 30

Alas, I am no help here.  I use almost no editor support beyond
annotations [1] and syntax highlighting with vi.  Any Emacs users on the
list? I seem to remember Mort uses it, but he's travelling in the US and
so response may be delayed.

[1] http://github.com/avsm/ocaml-annot

-anil

On Sat, Dec 01, 2012 at 08:48:11PM -0000, Yiming Zhang wrote:
> Hi,
> 
> I am studying how to use tuareg mode in emacs for ocaml program development.
> I think most ocaml programmers use it, right? Currently I meet several
> problems, including:
> 
> (1) how to make emacs support lwt? Currently the keywords of lwt cannot be
> parsed, and during debug when I want to "next" a lwt statement it reports
> "No source file for lwt" L
> 
> (2) how to make emacs (or is it possible to) show several windows at the
> same time? For example, I might want to click on a file name in the left
> window to open a .ml file in the right-top window, to click a variable name
> in the top window to show its definition in the bottom window, like what I
> can do in "source insight" and "visual studio"?
> 
> Thank you very much!
> 
> Yiming


From agarwal1975@gmail.com Sun Dec 02 16:57:09 2012
Received: from ppsw-50.csi.cam.ac.uk ([131.111.8.150])
	by lists-2.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25)
	with esmtp id 1TfCqr-0000LV-2r (Exim 4.70) for
	cl-mirage@lists.cam.ac.uk
	(return-path <agarwal1975@gmail.com>); Sun, 02 Dec 2012 16:57:09 +0000
X-Cam-AntiVirus: no malware found
X-Cam-SpamDetails: score 0.9 from SpamAssassin-3.3.2-1415949 
	* -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/,
	low *      trust
	*      [209.85.223.173 listed in list.dnswl.dnsbl.ja.net]
	* 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail
	provider *       (agarwal1975[at]gmail.com)
	*  0.0 DKIM_ADSP_CUSTOM_MED No valid author signature, adsp_override is
	*      CUSTOM_MED
	* 0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends
	in *      digit (agarwal1975[at]gmail.com)
	*  0.0 HTML_MESSAGE BODY: HTML included in message
	*  0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily
	*      valid
	*  0.0 T_DKIM_INVALID DKIM-Signature header exists but is not valid
	*  1.2 NML_ADSP_CUSTOM_MED ADSP custom_med hit, and not from a mailing
	*      list
X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/
Received: from mail-ie0-f173.google.com ([209.85.223.173]:51476)
	by ppsw-50.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.147]:25)
	with esmtp id 1TfCqp-0005wT-rE (Exim 4.72) for
	cl-mirage@lists.cam.ac.uk
	(return-path <agarwal1975@gmail.com>); Sun, 02 Dec 2012 16:57:09 +0000
Received: by mail-ie0-f173.google.com with SMTP id e13so2883178iej.4
	for <cl-mirage@lists.cam.ac.uk>; Sun, 02 Dec 2012 08:57:06 -0800 (PST)
Received: by 10.50.106.227 with SMTP id gx3mr3878008igb.10.1354467426718; Sun,
	02 Dec 2012 08:57:06 -0800 (PST)
MIME-Version: 1.0
Received: by 10.64.47.229 with HTTP; Sun, 2 Dec 2012 08:56:45 -0800 (PST)
In-Reply-To: <20121202114408.GB12654@dark.recoil.org>
References: <007b01cdd005$2e32d6b0$8a988410$@gmail.com>
	<20121202114408.GB12654@dark.recoil.org>
From: Ashish Agarwal <agarwal1975@gmail.com>
Date: Sun, 2 Dec 2012 11:56:45 -0500
Message-ID: <CAMu2m2+RUnGsnst6qq7GU0KO-NyX3JKggUEVWXLVKq3zLGeaLw@mail.gmail.com>
Subject: Re: tuareg mode in emacs
To: Anil Madhavapeddy <anil@recoil.org>
Content-Type: multipart/alternative; boundary=e89a8f2351afd4557804cfe185a0
Cc: cl-mirage@lists.cam.ac.uk, Yiming Zhang <sdiris@gmail.com>
X-BeenThere: cl-mirage@lists.cam.ac.uk
X-Mailman-Version: 2.1.8
Precedence: list
List-Id: MirageOS development <cl-mirage.lists.cam.ac.uk>
List-Unsubscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=unsubscribe>
List-Archive: <https://lists.cam.ac.uk/pipermail/cl-mirage>
List-Post: <mailto:cl-mirage@lists.cam.ac.uk>
List-Help: <mailto:cl-mirage-request@lists.cam.ac.uk?subject=help>
List-Subscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=subscribe>
X-List-Received-Date: Sun, 02 Dec 2012 16:57:09 -0000
Content-Length: 2517
Lines: 68

--e89a8f2351afd4557804cfe185a0
Content-Type: text/plain; charset=ISO-8859-1

On Sun, Dec 2, 2012 at 6:44 AM, Anil Madhavapeddy <anil@recoil.org> wrote:


>  > (2) how to make emacs (or is it possible to) show several windows at the
> > same time?
>

C-x 2 splits pane into two horizontal panes
C-x 3 splits pane into two vertical panes
C-x 0 closes the current pane
C-x 1 keeps just the current pane
C-x 5 2 opens new window



> For example, I might want to click on a file name in the left
> > window to open a .ml file in the right-top window, to click a variable
> name
> > in the top window to show its definition in the bottom window, like what
> I
> > can do in "source insight" and "visual studio"?
>

Don't know how to do this. I haven't explored
typerex<https://github.com/OCamlPro/typerex>too much yet. maybe it
supports additional things you'll like.

--e89a8f2351afd4557804cfe185a0
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

On Sun, Dec 2, 2012 at 6:44 AM, Anil Madhavapeddy <span dir=3D"ltr">&lt;<a =
href=3D"mailto:anil@recoil.org" target=3D"_blank">anil@recoil.org</a>&gt;</=
span> wrote:<br><div class=3D"gmail_quote"><div>=A0</div><blockquote class=
=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padd=
ing-left:1ex">

<div class=3D"HOEnZb"><div class=3D"h5">
&gt; (2) how to make emacs (or is it possible to) show several windows at t=
he<br>
&gt; same time?</div></div></blockquote><div><br></div><div>C-x 2 splits pa=
ne into two horizontal panes</div><div>C-x 3 splits pane into two vertical =
panes</div><div>C-x 0 closes the current pane</div><div>C-x 1 keeps just th=
e current pane</div>

<div>C-x 5 2 opens new window</div><div><br></div><div>=A0</div><blockquote=
 class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc soli=
d;padding-left:1ex"><div class=3D"HOEnZb"><div class=3D"h5"> For example, I=
 might want to click on a file name in the left<br>


&gt; window to open a .ml file in the right-top window, to click a variable=
 name<br>
&gt; in the top window to show its definition in the bottom window, like wh=
at I<br>
&gt; can do in &quot;source insight&quot; and &quot;visual studio&quot;?<br=
></div></div></blockquote><div><br></div><div>Don&#39;t know how to do this=
. I haven&#39;t explored <a href=3D"https://github.com/OCamlPro/typerex">ty=
perex</a> too much yet. maybe it supports additional things you&#39;ll like=
.</div>

<div><br></div></div>

--e89a8f2351afd4557804cfe185a0--


From sdiris@gmail.com Sun Dec 02 17:52:06 2012
Received: from ppsw-51.csi.cam.ac.uk ([131.111.8.151])
	by lists-2.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25)
	with esmtp id 1TfDi2-0001BU-BZ (Exim 4.70) for
	cl-mirage@lists.cam.ac.uk
	(return-path <sdiris@gmail.com>); Sun, 02 Dec 2012 17:52:06 +0000
X-Cam-AntiVirus: no malware found
X-Cam-SpamDetails: score -0.8 from SpamAssassin-3.3.2-1415949 
	* -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/,
	low *      trust
	*      [74.125.82.179 listed in list.dnswl.dnsbl.ja.net]
	* 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail
	provider *       (sdiris[at]gmail.com)
	* -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from
	*      author's domain
	*  0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily
	*      valid
	* -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature
X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/
Received: from mail-we0-f179.google.com ([74.125.82.179]:41621)
	by ppsw-51.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.148]:25)
	with esmtp id 1TfDi0-000894-ZF (Exim 4.72) for
	cl-mirage@lists.cam.ac.uk
	(return-path <sdiris@gmail.com>); Sun, 02 Dec 2012 17:52:06 +0000
Received: by mail-we0-f179.google.com with SMTP id r6so767760wey.38
	for <cl-mirage@lists.cam.ac.uk>; Sun, 02 Dec 2012 09:52:04 -0800 (PST)
Received: by 10.180.94.169 with SMTP id dd9mr5977664wib.14.1354470724731;
	Sun, 02 Dec 2012 09:52:04 -0800 (PST)
Received: from yimingwin7 (c188.al.cl.cam.ac.uk. [128.232.110.188])
	by mx.google.com with ESMTPS id i2sm7771370wiw.3.2012.12.02.09.52.03
	(version=TLSv1/SSLv3 cipher=OTHER);
	Sun, 02 Dec 2012 09:52:03 -0800 (PST)
From: "Yiming Zhang" <sdiris@gmail.com>
To: "'Anil Madhavapeddy'" <anil@recoil.org>
References: <007b01cdd005$2e32d6b0$8a988410$@gmail.com>
	<20121202114408.GB12654@dark.recoil.org>
In-Reply-To: <20121202114408.GB12654@dark.recoil.org>
Subject: =?gb2312?B?tPC4tDogdHVhcmVnIG1vZGUgaW4gZW1hY3M=?=
Date: Sun, 2 Dec 2012 17:52:02 -0000
Message-ID: <000a01cdd0b5$bcb0e520$3612af60$@gmail.com>
MIME-Version: 1.0
Content-Type: text/plain;
	charset="gb2312"
Content-Transfer-Encoding: quoted-printable
X-Mailer: Microsoft Outlook 14.0
Thread-Index: AQFU8rd7IdjdxX+ULJGEPjATnhtY8wI301ThmOXHTYA=
Content-Language: zh-cn
Cc: cl-mirage@lists.cam.ac.uk
X-BeenThere: cl-mirage@lists.cam.ac.uk
X-Mailman-Version: 2.1.8
Precedence: list
List-Id: MirageOS development <cl-mirage.lists.cam.ac.uk>
List-Unsubscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=unsubscribe>
List-Archive: <https://lists.cam.ac.uk/pipermail/cl-mirage>
List-Post: <mailto:cl-mirage@lists.cam.ac.uk>
List-Help: <mailto:cl-mirage-request@lists.cam.ac.uk?subject=help>
List-Subscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=subscribe>
X-List-Received-Date: Sun, 02 Dec 2012 17:52:06 -0000
Content-Length: 1455
Lines: 48

Many thanks to Anil!

-yiming

-----=D3=CA=BC=FE=D4=AD=BC=FE-----
=B7=A2=BC=FE=C8=CB: Anil Madhavapeddy [mailto:anil@recoil.org]=20
=B7=A2=CB=CD=CA=B1=BC=E4: 2012=C4=EA12=D4=C22=C8=D5 11:44
=CA=D5=BC=FE=C8=CB: Yiming Zhang
=B3=AD=CB=CD: cl-mirage@lists.cam.ac.uk
=D6=F7=CC=E2: Re: tuareg mode in emacs

Alas, I am no help here.  I use almost no editor support beyond =
annotations
[1] and syntax highlighting with vi.  Any Emacs users on the list? I =
seem to
remember Mort uses it, but he's travelling in the US and so response may =
be
delayed.

[1] http://github.com/avsm/ocaml-annot

-anil

On Sat, Dec 01, 2012 at 08:48:11PM -0000, Yiming Zhang wrote:
> Hi,
>=20
> I am studying how to use tuareg mode in emacs for ocaml program
development.
> I think most ocaml programmers use it, right? Currently I meet several =

> problems, including:
>=20
> (1) how to make emacs support lwt? Currently the keywords of lwt=20
> cannot be parsed, and during debug when I want to "next" a lwt=20
> statement it reports "No source file for lwt" L
>=20
> (2) how to make emacs (or is it possible to) show several windows at=20
> the same time? For example, I might want to click on a file name in=20
> the left window to open a .ml file in the right-top window, to click a =

> variable name in the top window to show its definition in the bottom=20
> window, like what I can do in "source insight" and "visual studio"?
>=20
> Thank you very much!
>=20
> Yiming



From Richard.Mortier@nottingham.ac.uk Sun Dec 02 18:14:17 2012
Received: from ppsw-43.csi.cam.ac.uk ([131.111.8.143])
	by lists-2.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25)
	with esmtp id 1TfE3V-0001R8-U5 (Exim 4.70) for
	cl-mirage@lists.cam.ac.uk
	(return-path <Richard.Mortier@nottingham.ac.uk>);
	Sun, 02 Dec 2012 18:14:17 +0000
X-Cam-AntiVirus: no malware found
X-Cam-SpamDetails: score 0.0 from SpamAssassin-3.3.2-1415949 
	* 0.0 MIME_QP_LONG_LINE RAW: Quoted-printable line longer than 76 chars
X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/
Received: from engine06-20433-6.icritical.com ([195.62.217.150]:33314)
	by ppsw-43.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.149]:25)
	with smtp id 1TfE3U-0008Oe-oN (Exim 4.72) for cl-mirage@lists.cam.ac.uk
	(return-path <Richard.Mortier@nottingham.ac.uk>);
	Sun, 02 Dec 2012 18:14:17 +0000
Received: (qmail 28880 invoked from network); 2 Dec 2012 18:13:24 -0000
Received: from localhost (127.0.0.1)
	by engine06-20433-6.icritical.com with SMTP; 2 Dec 2012 18:13:24 -0000
Received: from engine06-20433-6.icritical.com ([127.0.0.1])
	by localhost (engine06-20433-6.icritical.com [127.0.0.1]) (amavisd-new,
	port 10024) with SMTP id 27632-03 for <cl-mirage@lists.cam.ac.uk>;
	Sun,  2 Dec 2012 18:13:15 +0000 (GMT)
Received: (qmail 28864 invoked by uid 599); 2 Dec 2012 18:13:15 -0000
Received: from unknown (HELO smtp4.nottingham.ac.uk) (128.243.220.65)
	by engine06-20433-6.icritical.com (qpsmtpd/0.28) with ESMTP;
	Sun, 02 Dec 2012 18:13:15 +0000
Received: from uiwexhub01.ad.nottingham.ac.uk ([128.243.15.133])
	by smtp4.nottingham.ac.uk with esmtps (TLSv1:AES128-SHA:128)
	(Exim 4.77) (envelope-from <Richard.Mortier@nottingham.ac.uk>)
	id 1TfE2W-0004ev-0N
	for cl-mirage@lists.cam.ac.uk; Sun, 02 Dec 2012 18:13:16 +0000
Received: from EXCHANGE1.ad.nottingham.ac.uk ([fe80::7962:f868:e6ee:6267]) by
	UIWEXHUB01.ad.nottingham.ac.uk ([2002:80f3:f85::80f3:f85]) with mapi;
	Sun, 2 Dec 2012 18:13:15 +0000
From: Richard Mortier <Richard.Mortier@nottingham.ac.uk>
To: Anil Madhavapeddy <anil@recoil.org>, Yiming Zhang <sdiris@gmail.com>
Date: Sun, 2 Dec 2012 18:13:14 +0000
Subject: Re: tuareg mode in emacs
Thread-Topic: tuareg mode in emacs
Thread-Index: Ac3QuLJcKlUpygfETPKJgfhZoos8ug==
Message-ID: <27CAC0E7-D671-46EA-8741-3CD8DFEF5162@nottingham.ac.uk>
References: <007b01cdd005$2e32d6b0$8a988410$@gmail.com>
	<20121202114408.GB12654@dark.recoil.org>
In-Reply-To: <20121202114408.GB12654@dark.recoil.org>
Accept-Language: en-US, en-GB
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
acceptlanguage: en-US, en-GB
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-Virus-Scanned: by iCritical at engine06-20433-6.icritical.com
Cc: "cl-mirage@lists.cam.ac.uk List" <cl-mirage@lists.cam.ac.uk>
X-BeenThere: cl-mirage@lists.cam.ac.uk
X-Mailman-Version: 2.1.8
Precedence: list
List-Id: MirageOS development <cl-mirage.lists.cam.ac.uk>
List-Unsubscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=unsubscribe>
List-Archive: <https://lists.cam.ac.uk/pipermail/cl-mirage>
List-Post: <mailto:cl-mirage@lists.cam.ac.uk>
List-Help: <mailto:cl-mirage-request@lists.cam.ac.uk?subject=help>
List-Subscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=subscribe>
X-List-Received-Date: Sun, 02 Dec 2012 18:14:18 -0000
Content-Length: 2334
Lines: 60

yes, use emacs; no, haven't solved the Lwt syntax extension problem. i did =
look at it, to try to mash some extra regexes in, but it didn't work the ob=
vious way and i didn't have time to fix properly. i believe thomas said tha=
t they would fix it eventually with typerex but weren't interested in patch=
ing up tuareg-mode...

On 2 Dec 2012, at 03:44, Anil Madhavapeddy wrote:

> Alas, I am no help here.  I use almost no editor support beyond
> annotations [1] and syntax highlighting with vi.  Any Emacs users on the
> list? I seem to remember Mort uses it, but he's travelling in the US and
> so response may be delayed.
>=20
> [1] http://github.com/avsm/ocaml-annot
>=20
> -anil
>=20
> On Sat, Dec 01, 2012 at 08:48:11PM -0000, Yiming Zhang wrote:
>> Hi,
>>=20
>> I am studying how to use tuareg mode in emacs for ocaml program developm=
ent.
>> I think most ocaml programmers use it, right? Currently I meet several
>> problems, including:
>>=20
>> (1) how to make emacs support lwt? Currently the keywords of lwt cannot =
be
>> parsed, and during debug when I want to "next" a lwt statement it report=
s
>> "No source file for lwt" L
>>=20
>> (2) how to make emacs (or is it possible to) show several windows at the
>> same time? For example, I might want to click on a file name in the left
>> window to open a .ml file in the right-top window, to click a variable n=
ame
>> in the top window to show its definition in the bottom window, like what=
 I
>> can do in "source insight" and "visual studio"?
>>=20
>> Thank you very much!
>>=20
>> Yiming
>=20


--=20
Cheers,

R.




This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it.   Please do not use, copy or disclose the information contained in this message or in any attachment.  Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham.

This message has been checked for viruses but the contents of an attachment
may still contain software viruses which could damage your computer system:
you are advised to perform your own checks. Email communications with the
University of Nottingham may be monitored as permitted by UK legislation.


From anil@recoil.org Sun Dec 02 18:16:24 2012
Received: from ppsw-50.csi.cam.ac.uk ([131.111.8.150])
	by lists-2.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25)
	with esmtp id 1TfE5Y-0001Ry-Jl (Exim 4.70) for
	cl-mirage@lists.cam.ac.uk
	(return-path <anil@recoil.org>); Sun, 02 Dec 2012 18:16:24 +0000
X-Cam-AntiVirus: no malware found
X-Cam-SpamDetails: score 0.0 from SpamAssassin-3.3.2-1415949
X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/
Received: from recoil.dh.bytemark.co.uk ([89.16.177.154]:34303
	helo=dark.recoil.org)
	by ppsw-50.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.147]:25)
	with smtp id 1TfE5X-0004A1-q1 (Exim 4.72) for cl-mirage@lists.cam.ac.uk
	(return-path <anil@recoil.org>); Sun, 02 Dec 2012 18:16:24 +0000
Received: (qmail 8867 invoked by uid 634); 2 Dec 2012 18:16:23 -0000
X-Spam-Level: *
X-Spam-Status: No, hits=-1.0 required=5.0
	tests=ALL_TRUSTED
X-Spam-Check-By: dark.recoil.org
Received: from host86-129-95-50.range86-129.btcentralplus.com (HELO
	clink.home) (86.129.95.50)
	(smtp-auth username remote@recoil.org, mechanism cram-md5)
	by dark.recoil.org (qpsmtpd/0.84) with ESMTPA;
	Sun, 02 Dec 2012 18:16:22 +0000
Content-Type: text/plain; charset=us-ascii
Mime-Version: 1.0 (Mac OS X Mail 6.1 \(1498\))
Subject: Re: tuareg mode in emacs
From: Anil Madhavapeddy <anil@recoil.org>
In-Reply-To: <27CAC0E7-D671-46EA-8741-3CD8DFEF5162@nottingham.ac.uk>
Date: Sun, 2 Dec 2012 18:16:20 +0000
Content-Transfer-Encoding: quoted-printable
Message-Id: <EE28D0DD-AC87-4B76-A972-0E904943359C@recoil.org>
References: <007b01cdd005$2e32d6b0$8a988410$@gmail.com>
	<20121202114408.GB12654@dark.recoil.org>
	<27CAC0E7-D671-46EA-8741-3CD8DFEF5162@nottingham.ac.uk>
To: Richard Mortier <Richard.Mortier@nottingham.ac.uk>
X-Mailer: Apple Mail (2.1498)
X-Virus-Checked: Checked by ClamAV on dark.recoil.org
Cc: "cl-mirage@lists.cam.ac.uk List" <cl-mirage@lists.cam.ac.uk>,
	Yiming Zhang <sdiris@gmail.com>
X-BeenThere: cl-mirage@lists.cam.ac.uk
X-Mailman-Version: 2.1.8
Precedence: list
List-Id: MirageOS development <cl-mirage.lists.cam.ac.uk>
List-Unsubscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=unsubscribe>
List-Archive: <https://lists.cam.ac.uk/pipermail/cl-mirage>
List-Post: <mailto:cl-mirage@lists.cam.ac.uk>
List-Help: <mailto:cl-mirage-request@lists.cam.ac.uk?subject=help>
List-Subscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=subscribe>
X-List-Received-Date: Sun, 02 Dec 2012 18:16:24 -0000
Content-Length: 2681
Lines: 86

A scan of the Lwt sources reveals several Tuareg patches that may be of =
use...
https://github.com/avsm/lwt/tree/master/utils

-anil

On 2 Dec 2012, at 18:13, Richard Mortier =
<Richard.Mortier@nottingham.ac.uk> wrote:

> yes, use emacs; no, haven't solved the Lwt syntax extension problem. i =
did look at it, to try to mash some extra regexes in, but it didn't work =
the obvious way and i didn't have time to fix properly. i believe thomas =
said that they would fix it eventually with typerex but weren't =
interested in patching up tuareg-mode...
>=20
> On 2 Dec 2012, at 03:44, Anil Madhavapeddy wrote:
>=20
>> Alas, I am no help here.  I use almost no editor support beyond
>> annotations [1] and syntax highlighting with vi.  Any Emacs users on =
the
>> list? I seem to remember Mort uses it, but he's travelling in the US =
and
>> so response may be delayed.
>>=20
>> [1] http://github.com/avsm/ocaml-annot
>>=20
>> -anil
>>=20
>> On Sat, Dec 01, 2012 at 08:48:11PM -0000, Yiming Zhang wrote:
>>> Hi,
>>>=20
>>> I am studying how to use tuareg mode in emacs for ocaml program =
development.
>>> I think most ocaml programmers use it, right? Currently I meet =
several
>>> problems, including:
>>>=20
>>> (1) how to make emacs support lwt? Currently the keywords of lwt =
cannot be
>>> parsed, and during debug when I want to "next" a lwt statement it =
reports
>>> "No source file for lwt" L
>>>=20
>>> (2) how to make emacs (or is it possible to) show several windows at =
the
>>> same time? For example, I might want to click on a file name in the =
left
>>> window to open a .ml file in the right-top window, to click a =
variable name
>>> in the top window to show its definition in the bottom window, like =
what I
>>> can do in "source insight" and "visual studio"?
>>>=20
>>> Thank you very much!
>>>=20
>>> Yiming
>>=20
>=20
>=20
> --=20
> Cheers,
>=20
> R.
>=20
>=20
>=20
>=20
> This message and any attachment are intended solely for the addressee =
and may contain confidential information. If you have received this =
message in error, please send it back to me, and immediately delete it.  =
 Please do not use, copy or disclose the information contained in this =
message or in any attachment.  Any views or opinions expressed by the =
author of this email do not necessarily reflect the views of the =
University of Nottingham.
>=20
> This message has been checked for viruses but the contents of an =
attachment
> may still contain software viruses which could damage your computer =
system:
> you are advised to perform your own checks. Email communications with =
the
> University of Nottingham may be monitored as permitted by UK =
legislation.
>=20



From sdiris@gmail.com Sun Dec 02 21:22:11 2012
Received: from ppsw-43.csi.cam.ac.uk ([131.111.8.143])
	by lists-2.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25)
	with esmtp id 1TfGzL-0003Z6-P2 (Exim 4.70) for
	cl-mirage@lists.cam.ac.uk
	(return-path <sdiris@gmail.com>); Sun, 02 Dec 2012 21:22:11 +0000
X-Cam-AntiVirus: no malware found
X-Cam-SpamScore: s
X-Cam-SpamDetails: score 1.6 from SpamAssassin-3.3.2-1415949 
	* -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/,
	low *      trust
	*      [74.125.82.53 listed in list.dnswl.dnsbl.ja.net]
	* 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail
	provider *       (sdiris[at]gmail.com)
	*  0.0 DKIM_ADSP_CUSTOM_MED No valid author signature, adsp_override is
	*      CUSTOM_MED
	*  0.0 HTML_MESSAGE BODY: HTML included in message
	*  0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily
	*      valid
	*  0.0 T_DKIM_INVALID DKIM-Signature header exists but is not valid
	*  1.0 FREEMAIL_REPLY From and body contain different freemails
	*  1.2 NML_ADSP_CUSTOM_MED ADSP custom_med hit, and not from a mailing
	*      list
X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/
Received: from mail-wg0-f53.google.com ([74.125.82.53]:44292)
	by ppsw-43.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.149]:25)
	with esmtp id 1TfGzK-0000rP-nN (Exim 4.72) for
	cl-mirage@lists.cam.ac.uk
	(return-path <sdiris@gmail.com>); Sun, 02 Dec 2012 21:22:11 +0000
Received: by mail-wg0-f53.google.com with SMTP id ei8so959580wgb.20
	for <cl-mirage@lists.cam.ac.uk>; Sun, 02 Dec 2012 13:22:10 -0800 (PST)
Received: by 10.216.211.73 with SMTP id v51mr2742766weo.74.1354483330105;
	Sun, 02 Dec 2012 13:22:10 -0800 (PST)
Received: from yimingwin7 (c188.al.cl.cam.ac.uk. [128.232.110.188])
	by mx.google.com with ESMTPS id p3sm8473111wic.8.2012.12.02.13.22.08
	(version=TLSv1/SSLv3 cipher=OTHER);
	Sun, 02 Dec 2012 13:22:08 -0800 (PST)
From: "Yiming Zhang" <sdiris@gmail.com>
To: "'Ashish Agarwal'" <agarwal1975@gmail.com>
References: <007b01cdd005$2e32d6b0$8a988410$@gmail.com>
	<20121202114408.GB12654@dark.recoil.org>
	<CAMu2m2+RUnGsnst6qq7GU0KO-NyX3JKggUEVWXLVKq3zLGeaLw@mail.gmail.com>
In-Reply-To: <CAMu2m2+RUnGsnst6qq7GU0KO-NyX3JKggUEVWXLVKq3zLGeaLw@mail.gmail.com>
Subject: =?gb2312?B?tPC4tDogdHVhcmVnIG1vZGUgaW4gZW1hY3M=?=
Date: Sun, 2 Dec 2012 21:22:07 -0000
Message-ID: <001101cdd0d3$160a8f00$421fad00$@gmail.com>
MIME-Version: 1.0
Content-Type: multipart/alternative;
	boundary="----=_NextPart_000_0012_01CDD0D3.160BA070"
X-Mailer: Microsoft Outlook 14.0
Thread-Index: AQFU8rd7IdjdxX+ULJGEPjATnhtY8wI301ThAR14gSqY3RYq4A==
Content-Language: zh-cn
Cc: cl-mirage@lists.cam.ac.uk
X-BeenThere: cl-mirage@lists.cam.ac.uk
X-Mailman-Version: 2.1.8
Precedence: list
List-Id: MirageOS development <cl-mirage.lists.cam.ac.uk>
List-Unsubscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=unsubscribe>
List-Archive: <https://lists.cam.ac.uk/pipermail/cl-mirage>
List-Post: <mailto:cl-mirage@lists.cam.ac.uk>
List-Help: <mailto:cl-mirage-request@lists.cam.ac.uk?subject=help>
List-Subscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=subscribe>
X-List-Received-Date: Sun, 02 Dec 2012 21:22:11 -0000
Content-Length: 7226
Lines: 194

This is a multipart message in MIME format.

------=_NextPart_000_0012_01CDD0D3.160BA070
Content-Type: text/plain;
	charset="gb2312"
Content-Transfer-Encoding: quoted-printable

Thanks, Ashish!

=20

yiming

=20

=B7=A2=BC=FE=C8=CB: Ashish Agarwal [mailto:agarwal1975@gmail.com]=20
=B7=A2=CB=CD=CA=B1=BC=E4: 2012=C4=EA12=D4=C22=C8=D5 16:57
=CA=D5=BC=FE=C8=CB: Anil Madhavapeddy
=B3=AD=CB=CD: Yiming Zhang; cl-mirage@lists.cam.ac.uk
=D6=F7=CC=E2: Re: tuareg mode in emacs

=20

On Sun, Dec 2, 2012 at 6:44 AM, Anil Madhavapeddy <anil@recoil.org> =
wrote:

=20

> (2) how to make emacs (or is it possible to) show several windows at =
the
> same time?

=20

C-x 2 splits pane into two horizontal panes

C-x 3 splits pane into two vertical panes

C-x 0 closes the current pane

C-x 1 keeps just the current pane

C-x 5 2 opens new window

=20

=20

For example, I might want to click on a file name in the left
> window to open a .ml file in the right-top window, to click a variable
name
> in the top window to show its definition in the bottom window, like =
what I
> can do in "source insight" and "visual studio"?

=20

Don't know how to do this. I haven't explored typerex
<https://github.com/OCamlPro/typerex>  too much yet. maybe it supports
additional things you'll like.

=20


------=_NextPart_000_0012_01CDD0D3.160BA070
Content-Type: text/html;
	charset="gb2312"
Content-Transfer-Encoding: quoted-printable

<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Dgb2312">
<html xmlns:v=3D"urn:schemas-microsoft-com:vml" =
xmlns:o=3D"urn:schemas-microsoft-com:office:office" =
xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns:m=3D"http://schemas.microsoft.com/office/2004/12/omml" =
xmlns=3D"http://www.w3.org/TR/REC-html40"><head><meta name=3DGenerator =
content=3D"Microsoft Word 14 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
	{font-family:SimSun;
	panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
	{font-family:SimSun;
	panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
	{font-family:Calibri;
	panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
	{font-family:SimSun;
	panose-1:2 1 6 0 3 1 1 1 1 1;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0cm;
	margin-bottom:.0001pt;
	font-size:12.0pt;
	font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
	{mso-style-priority:99;
	color:blue;
	text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
	{mso-style-priority:99;
	color:purple;
	text-decoration:underline;}
span.EmailStyle17
	{mso-style-type:personal-reply;
	font-family:"Calibri","sans-serif";
	color:#1F497D;}
.MsoChpDefault
	{mso-style-type:export-only;
	font-family:"Calibri","sans-serif";}
@page WordSection1
	{size:612.0pt 792.0pt;
	margin:72.0pt 90.0pt 72.0pt 90.0pt;}
div.WordSection1
	{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext=3D"edit" spidmax=3D"1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext=3D"edit">
<o:idmap v:ext=3D"edit" data=3D"1" />
</o:shapelayout></xml><![endif]--></head><body lang=3DZH-CN link=3Dblue =
vlink=3Dpurple><div class=3DWordSection1><p class=3DMsoNormal><span =
lang=3DEN-US =
style=3D'font-size:10.5pt;font-family:"Calibri","sans-serif";color:#1F497=
D'>Thanks, Ashish!<o:p></o:p></span></p><p class=3DMsoNormal><span =
lang=3DEN-US =
style=3D'font-size:10.5pt;font-family:"Calibri","sans-serif";color:#1F497=
D'><o:p>&nbsp;</o:p></span></p><p class=3DMsoNormal><span lang=3DEN-US =
style=3D'font-size:10.5pt;font-family:"Calibri","sans-serif";color:#1F497=
D'>yiming<o:p></o:p></span></p><p class=3DMsoNormal><span lang=3DEN-US =
style=3D'font-size:10.5pt;font-family:"Calibri","sans-serif";color:#1F497=
D'><o:p>&nbsp;</o:p></span></p><p class=3DMsoNormal><b><span =
style=3D'font-size:10.0pt;font-family:SimSun'>=B7=A2=BC=FE=C8=CB<span =
lang=3DEN-US>:</span></span></b><span lang=3DEN-US =
style=3D'font-size:10.0pt;font-family:SimSun'> Ashish Agarwal =
[mailto:agarwal1975@gmail.com] <br></span><b><span =
style=3D'font-size:10.0pt;font-family:SimSun'>=B7=A2=CB=CD=CA=B1=BC=E4<sp=
an lang=3DEN-US>:</span></span></b><span lang=3DEN-US =
style=3D'font-size:10.0pt;font-family:SimSun'> 2012</span><span =
style=3D'font-size:10.0pt;font-family:SimSun'>=C4=EA<span =
lang=3DEN-US>12</span>=D4=C2<span lang=3DEN-US>2</span>=C8=D5<span =
lang=3DEN-US> 16:57<br></span><b>=CA=D5=BC=FE=C8=CB<span =
lang=3DEN-US>:</span></b><span lang=3DEN-US> Anil =
Madhavapeddy<br></span><b>=B3=AD=CB=CD<span =
lang=3DEN-US>:</span></b><span lang=3DEN-US> Yiming Zhang; =
cl-mirage@lists.cam.ac.uk<br></span><b>=D6=F7=CC=E2<span =
lang=3DEN-US>:</span></b><span lang=3DEN-US> Re: tuareg mode in =
emacs<o:p></o:p></span></span></p><p class=3DMsoNormal><span =
lang=3DEN-US><o:p>&nbsp;</o:p></span></p><p class=3DMsoNormal><span =
lang=3DEN-US>On Sun, Dec 2, 2012 at 6:44 AM, Anil Madhavapeddy &lt;<a =
href=3D"mailto:anil@recoil.org" =
target=3D"_blank">anil@recoil.org</a>&gt; =
wrote:<o:p></o:p></span></p><div><div><p class=3DMsoNormal><span =
lang=3DEN-US>&nbsp;<o:p></o:p></span></p></div><blockquote =
style=3D'border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm =
6.0pt;margin-left:4.8pt;margin-right:0cm'><div><div><p =
class=3DMsoNormal><span lang=3DEN-US>&gt; (2) how to make emacs (or is =
it possible to) show several windows at the<br>&gt; same =
time?<o:p></o:p></span></p></div></div></blockquote><div><p =
class=3DMsoNormal><span =
lang=3DEN-US><o:p>&nbsp;</o:p></span></p></div><div><p =
class=3DMsoNormal><span lang=3DEN-US>C-x 2 splits pane into two =
horizontal panes<o:p></o:p></span></p></div><div><p =
class=3DMsoNormal><span lang=3DEN-US>C-x 3 splits pane into two vertical =
panes<o:p></o:p></span></p></div><div><p class=3DMsoNormal><span =
lang=3DEN-US>C-x 0 closes the current =
pane<o:p></o:p></span></p></div><div><p class=3DMsoNormal><span =
lang=3DEN-US>C-x 1 keeps just the current =
pane<o:p></o:p></span></p></div><div><p class=3DMsoNormal><span =
lang=3DEN-US>C-x 5 2 opens new window<o:p></o:p></span></p></div><div><p =
class=3DMsoNormal><span =
lang=3DEN-US><o:p>&nbsp;</o:p></span></p></div><div><p =
class=3DMsoNormal><span =
lang=3DEN-US>&nbsp;<o:p></o:p></span></p></div><blockquote =
style=3D'border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm =
6.0pt;margin-left:4.8pt;margin-right:0cm'><div><div><p =
class=3DMsoNormal><span lang=3DEN-US>For example, I might want to click =
on a file name in the left<br>&gt; window to open a .ml file in the =
right-top window, to click a variable name<br>&gt; in the top window to =
show its definition in the bottom window, like what I<br>&gt; can do in =
&quot;source insight&quot; and &quot;visual =
studio&quot;?<o:p></o:p></span></p></div></div></blockquote><div><p =
class=3DMsoNormal><span =
lang=3DEN-US><o:p>&nbsp;</o:p></span></p></div><div><p =
class=3DMsoNormal><span lang=3DEN-US>Don't know how to do this. I =
haven't explored <a =
href=3D"https://github.com/OCamlPro/typerex">typerex</a> too much yet. =
maybe it supports additional things you'll =
like.<o:p></o:p></span></p></div><div><p class=3DMsoNormal><span =
lang=3DEN-US><o:p>&nbsp;</o:p></span></p></div></div></div></body></html>
------=_NextPart_000_0012_01CDD0D3.160BA070--



From sdiris@gmail.com Sun Dec 02 21:50:28 2012
Received: from ppsw-43.csi.cam.ac.uk ([131.111.8.143])
	by lists-2.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25)
	with esmtp id 1TfHQi-0003pr-Ng (Exim 4.70) for
	cl-mirage@lists.cam.ac.uk
	(return-path <sdiris@gmail.com>); Sun, 02 Dec 2012 21:50:28 +0000
X-Cam-AntiVirus: no malware found
X-Cam-SpamDetails: score 0.6 from SpamAssassin-3.3.2-1415949 
	* -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/,
	low *      trust
	*      [74.125.82.53 listed in list.dnswl.dnsbl.ja.net]
	* 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail
	provider *       (sdiris[at]gmail.com)
	*  0.0 DKIM_ADSP_CUSTOM_MED No valid author signature, adsp_override is
	*      CUSTOM_MED
	*  0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily
	*      valid
	*  0.0 T_DKIM_INVALID DKIM-Signature header exists but is not valid
	*  1.2 NML_ADSP_CUSTOM_MED ADSP custom_med hit, and not from a mailing
	*      list
X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/
Received: from mail-wg0-f53.google.com ([74.125.82.53]:42640)
	by ppsw-43.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.149]:25)
	with esmtp id 1TfHQh-00065g-nJ (Exim 4.72) for
	cl-mirage@lists.cam.ac.uk
	(return-path <sdiris@gmail.com>); Sun, 02 Dec 2012 21:50:28 +0000
Received: by mail-wg0-f53.google.com with SMTP id ei8so967502wgb.20
	for <cl-mirage@lists.cam.ac.uk>; Sun, 02 Dec 2012 13:50:27 -0800 (PST)
Received: by 10.180.81.232 with SMTP id d8mr6520278wiy.14.1354485027109;
	Sun, 02 Dec 2012 13:50:27 -0800 (PST)
Received: from yimingwin7 (c188.al.cl.cam.ac.uk. [128.232.110.188])
	by mx.google.com with ESMTPS id dm3sm8560723wib.9.2012.12.02.13.50.25
	(version=TLSv1/SSLv3 cipher=OTHER);
	Sun, 02 Dec 2012 13:50:26 -0800 (PST)
From: "Yiming Zhang" <sdiris@gmail.com>
To: "'Anil Madhavapeddy'" <anil@recoil.org>
Subject: lwt patch for tuareg works
Date: Sun, 2 Dec 2012 21:50:24 -0000
Message-ID: <001601cdd0d7$0997c5e0$1cc751a0$@gmail.com>
MIME-Version: 1.0
Content-Type: text/plain;
	charset="gb2312"
Content-Transfer-Encoding: quoted-printable
X-Mailer: Microsoft Outlook 14.0
Thread-Index: Ac3Q1acRc5E75govQ9i93E2T1SpSRw==
Content-Language: zh-cn
Cc: cl-mirage@lists.cam.ac.uk
X-BeenThere: cl-mirage@lists.cam.ac.uk
X-Mailman-Version: 2.1.8
Precedence: list
List-Id: MirageOS development <cl-mirage.lists.cam.ac.uk>
List-Unsubscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=unsubscribe>
List-Archive: <https://lists.cam.ac.uk/pipermail/cl-mirage>
List-Post: <mailto:cl-mirage@lists.cam.ac.uk>
List-Help: <mailto:cl-mirage-request@lists.cam.ac.uk?subject=help>
List-Subscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=subscribe>
X-List-Received-Date: Sun, 02 Dec 2012 21:50:28 -0000
Content-Length: 3307
Lines: 105

Thanks to everyone. After apply lwt's patch to tuareg, now lwt keywords =
can
be parsed correctly.

Another problem was that during debug when I "next" a lwt statement it
reported "No source file for lwt". My workaround is to download lwt =
source
files and use ocamldebug's "directory" command to add the path.=20

Thank you!
yiming

-----=D3=CA=BC=FE=D4=AD=BC=FE-----
=B7=A2=BC=FE=C8=CB: Anil Madhavapeddy [mailto:anil@recoil.org]=20
=B7=A2=CB=CD=CA=B1=BC=E4: 2012=C4=EA12=D4=C22=C8=D5 18:16
=CA=D5=BC=FE=C8=CB: Richard Mortier
=B3=AD=CB=CD: Yiming Zhang; cl-mirage@lists.cam.ac.uk List
=D6=F7=CC=E2: Re: tuareg mode in emacs

A scan of the Lwt sources reveals several Tuareg patches that may be of
use...
https://github.com/avsm/lwt/tree/master/utils

-anil

On 2 Dec 2012, at 18:13, Richard Mortier =
<Richard.Mortier@nottingham.ac.uk>
wrote:

> yes, use emacs; no, haven't solved the Lwt syntax extension problem. i =
did
look at it, to try to mash some extra regexes in, but it didn't work the
obvious way and i didn't have time to fix properly. i believe thomas =
said
that they would fix it eventually with typerex but weren't interested in
patching up tuareg-mode...
>=20
> On 2 Dec 2012, at 03:44, Anil Madhavapeddy wrote:
>=20
>> Alas, I am no help here.  I use almost no editor support beyond=20
>> annotations [1] and syntax highlighting with vi.  Any Emacs users on=20
>> the list? I seem to remember Mort uses it, but he's travelling in the =

>> US and so response may be delayed.
>>=20
>> [1] http://github.com/avsm/ocaml-annot
>>=20
>> -anil
>>=20
>> On Sat, Dec 01, 2012 at 08:48:11PM -0000, Yiming Zhang wrote:
>>> Hi,
>>>=20
>>> I am studying how to use tuareg mode in emacs for ocaml program
development.
>>> I think most ocaml programmers use it, right? Currently I meet=20
>>> several problems, including:
>>>=20
>>> (1) how to make emacs support lwt? Currently the keywords of lwt=20
>>> cannot be parsed, and during debug when I want to "next" a lwt=20
>>> statement it reports "No source file for lwt" L
>>>=20
>>> (2) how to make emacs (or is it possible to) show several windows at =

>>> the same time? For example, I might want to click on a file name in=20
>>> the left window to open a .ml file in the right-top window, to click =

>>> a variable name in the top window to show its definition in the=20
>>> bottom window, like what I can do in "source insight" and "visual
studio"?
>>>=20
>>> Thank you very much!
>>>=20
>>> Yiming
>>=20
>=20
>=20
> --
> Cheers,
>=20
> R.
>=20
>=20
>=20
>=20
> This message and any attachment are intended solely for the addressee =
and
may contain confidential information. If you have received this message =
in
error, please send it back to me, and immediately delete it.   Please do =
not
use, copy or disclose the information contained in this message or in =
any
attachment.  Any views or opinions expressed by the author of this email =
do
not necessarily reflect the views of the University of Nottingham.
>=20
> This message has been checked for viruses but the contents of an=20
> attachment may still contain software viruses which could damage your
computer system:
> you are advised to perform your own checks. Email communications with=20
> the University of Nottingham may be monitored as permitted by UK
legislation.
>=20



From avsm@dark.recoil.org Sun Dec 02 23:16:03 2012
Received: from ppsw-43.csi.cam.ac.uk ([131.111.8.143])
	by lists-2.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25)
	with esmtp id 1TfIlW-0004wK-VG (Exim 4.70) for
	cl-mirage@lists.cam.ac.uk
	(return-path <avsm@dark.recoil.org>); Sun, 02 Dec 2012 23:16:02 +0000
X-Cam-AntiVirus: no malware found
X-Cam-SpamDetails: score 0.0 from SpamAssassin-3.3.2-1415949
X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/
Received: from recoil.dh.bytemark.co.uk ([89.16.177.154]:20492
	helo=dark.recoil.org)
	by ppsw-43.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.149]:25)
	with smtp id 1TfIlV-0003Yj-nq (Exim 4.72) for cl-mirage@lists.cam.ac.uk
	(return-path <avsm@dark.recoil.org>); Sun, 02 Dec 2012 23:16:02 +0000
Received: (qmail 21550 invoked by uid 10000); 2 Dec 2012 23:16:01 -0000
Date: Sun, 2 Dec 2012 23:16:01 +0000
From: Anil Madhavapeddy <anil@recoil.org>
To: Balraj Singh <balraj.singh@cl.cam.ac.uk>
Subject: Re: [Xen-devel] Initialising MXCSR in PV guests
Message-ID: <20121202231600.GA14113@dark.recoil.org>
References: <47152122-2636-48ED-BD08-B8C69B7F2D18@recoil.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <47152122-2636-48ED-BD08-B8C69B7F2D18@recoil.org>
User-Agent: Mutt/1.5.21 (2010-09-15)
Cc: cl-mirage@lists.cam.ac.uk
X-BeenThere: cl-mirage@lists.cam.ac.uk
X-Mailman-Version: 2.1.8
Precedence: list
List-Id: MirageOS development <cl-mirage.lists.cam.ac.uk>
List-Unsubscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=unsubscribe>
List-Archive: <https://lists.cam.ac.uk/pipermail/cl-mirage>
List-Post: <mailto:cl-mirage@lists.cam.ac.uk>
List-Help: <mailto:cl-mirage-request@lists.cam.ac.uk?subject=help>
List-Subscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=subscribe>
X-List-Received-Date: Sun, 02 Dec 2012 23:16:03 -0000
Content-Length: 3540
Lines: 119

Balraj,

No reply to my query on the Xen list, but I committed the change to
explicitly initialise MXCSR to the latest mirage-platform. Can you confirm
that your errant i7 now successfully boots the kernel that failed before
with this change?

I'm still not entirely sure why the register happens to not be to set on
that one machine though...

cheers
Anil

On Fri, Nov 30, 2012 at 05:14:01PM +0000, Anil Madhavapeddy wrote:
> We're seeing floating point exceptions on some (but not all) machines
> when doing FP operations inside MiniOS.
> 
> It looks like the FPU and SSE control registers are not set to good
> default values (which by default mask various FP exceptions) when MiniOS
> is started as a PV guest. If the call to fpu_init below is not made, the
> division generates a precision error and fails.  
> 
> Do PV guests all need to explicitly initialise MXCSR, or has something
> changed in Xen to trigger this now?  It seems to have been set in the
> past, and only happens on some hosts.
> 
> --- extras/mini-os/kernelorig.c    2012-11-30 15:59:46.308837388 +0000
> +++ extras/mini-os/kernel.c    2012-11-30 16:02:12.532408020 +0000
> @@ -64,10 +64,32 @@
>      }
>  }
>  
> +#define MXCSR_DEFAULT 0x1f80
> +
> +static void fpu_init(void)
> +{
> +  unsigned long val = MXCSR_DEFAULT;
> +  asm volatile ( "fninit; ldmxcsr %0" : : "m" (val) );
> +}
> +
>  /* This should be overridden by the application we are linked against. */
>  __attribute__((weak)) int app_main(start_info_t *si)
>  {
>      printk("Dummy main: start_info=%p\n", si);
> +
> +    double x = 10.0;
> +    double y = 3.0;
> +
> +    /* This division only works when the fpu_init call is made.
> +     * The call sets the fpu and sse control registers to default values,
> +     * which mask various exceptions including the precision exception.
> +     * When the fpu_init call is not made the division below fails with
> +     * a precision exception.
> +     */
> +    double z = x/y;
> +
> +    printk("x = %d, y = %d, z = %d\n", (int) x, (int) y, (int) z);
> +
>      return 0;
>  }
>  
> @@ -98,6 +120,9 @@
>      printk("    cmd_line: %s\n",  
>             si->cmd_line ? (const char *)si->cmd_line : "NULL");
>  
> +    /* Initialize fpu and sse */
> +    fpu_init();
> +
>      /* Set up events. */
>      init_events();
>      
> 
> 
> 
> The offending host is:
> 
> $ uname -a
> Linux Monday 3.6.2 #1 SMP PREEMPT Wed Oct 17 22:22:30 BST 2012 x86_64 GNU/Linux
> 
> $ cat /proc/cpuinfo 
> processor	: 0
> vendor_id	: GenuineIntel
> cpu family	: 6
> model	 : 58
> model name	: Intel(R) Core(TM) i7-3770 CPU @ 3.40GHz
> stepping	: 9
> microcode	: 0x12
> cpu MHz	 : 3392.428
> cache size	: 8192 KB
> physical id	: 0
> siblings	: 8
> core id	 : 0
> cpu cores	: 4
> apicid	 : 0
> initial apicid	: 0
> fpu	 : yes
> fpu_exception	: yes
> cpuid level	: 13
> wp	 : yes
> flags	 : fpu de tsc msr pae mce cx8 apic sep mca cmov pat clflush acpi mmx fxsr sse sse2 ss ht syscall nx lm constant_tsc rep_good nopl nonstop_tsc pni pclmulqdq est ssse3 cx16 sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm ida arat epb xsaveopt pln pts dtherm fsgsbase erms
> bogomips	: 6784.85
> clflush size	: 64
> cache_alignment	: 64
> address sizes	: 36 bits physical, 48 bits virtual
> power management:
> 
> 
> 
> 
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xen.org
> http://lists.xen.org/xen-devel
> 

-- 
Anil Madhavapeddy                                 http://anil.recoil.org


From anil@recoil.org Mon Dec 10 14:10:44 2012
Received: from ppsw-51.csi.cam.ac.uk ([131.111.8.151])
	by lists-2.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25)
	with esmtp id 1Ti44C-0003As-O9 (Exim 4.70) for
	cl-mirage@lists.cam.ac.uk
	(return-path <anil@recoil.org>); Mon, 10 Dec 2012 14:10:44 +0000
X-Cam-AntiVirus: no malware found
X-Cam-SpamDetails: score 0.0 from SpamAssassin-3.3.2-1418219
X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/
Received: from recoil.dh.bytemark.co.uk ([89.16.177.154]:10586
	helo=dark.recoil.org)
	by ppsw-51.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.148]:25)
	with smtp id 1Ti44C-0003Gf-XZ (Exim 4.72) for cl-mirage@lists.cam.ac.uk
	(return-path <anil@recoil.org>); Mon, 10 Dec 2012 14:10:44 +0000
Received: (qmail 19274 invoked by uid 634); 10 Dec 2012 14:10:44 -0000
X-Spam-Level: *
X-Spam-Status: No, hits=-1.0 required=5.0
	tests=ALL_TRUSTED
X-Spam-Check-By: dark.recoil.org
Received: from volstagg-0.srg.cl.cam.ac.uk (HELO [10.0.0.83]) (128.232.32.232)
	(smtp-auth username remote@recoil.org, mechanism cram-md5)
	by dark.recoil.org (qpsmtpd/0.84) with ESMTPA;
	Mon, 10 Dec 2012 14:10:44 +0000
From: Anil Madhavapeddy <anil@recoil.org>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: quoted-printable
Subject: heads up: mirage-platform moving to ocaml-4.0 snapshot
Message-Id: <CAA29F24-C83F-41EB-9128-AB2A18ADA2F5@recoil.org>
Date: Mon, 10 Dec 2012 14:10:43 +0000
To: "cl-mirage@lists.cam.ac.uk List" <cl-mirage@lists.cam.ac.uk>
Mime-Version: 1.0 (Mac OS X Mail 6.1 \(1498\))
X-Mailer: Apple Mail (2.1498)
X-Virus-Checked: Checked by ClamAV on dark.recoil.org
X-BeenThere: cl-mirage@lists.cam.ac.uk
X-Mailman-Version: 2.1.8
Precedence: list
List-Id: MirageOS development <cl-mirage.lists.cam.ac.uk>
List-Unsubscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=unsubscribe>
List-Archive: <https://lists.cam.ac.uk/pipermail/cl-mirage>
List-Post: <mailto:cl-mirage@lists.cam.ac.uk>
List-Help: <mailto:cl-mirage-request@lists.cam.ac.uk?subject=help>
List-Subscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=subscribe>
X-List-Received-Date: Mon, 10 Dec 2012 14:10:44 -0000
Content-Length: 365
Lines: 10

Just a heads up: I'm updating the new Mirage platform Xen runtime up =
from 3.12.1 to a 4.00.1 snapshot.  Thomas and OCamlPro have some =
significant performance improvements that make this worthwhile, so it =
makes sense to move.

I'll send out a mail when it's done, but it should be mostly invisible =
beyond requiring an OPAM switch to a new compiler.

-anil=


From Dave.Scott@eu.citrix.com Mon Dec 10 17:44:54 2012
Received: from ppsw-43.csi.cam.ac.uk ([131.111.8.143])
	by lists-2.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25)
	with esmtp id 1Ti7PS-0002Ak-Et (Exim 4.70) for
	cl-mirage@lists.cam.ac.uk (return-path <Dave.Scott@eu.citrix.com>);
	Mon, 10 Dec 2012 17:44:54 +0000
X-Cam-AntiVirus: no malware found
X-Cam-SpamDetails: score -0.0 from SpamAssassin-3.3.2-1418219 
	* -0.0 RP_MATCHES_RCVD Envelope sender domain matches handover relay
	*      domain
X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/
Received: from smtp.eu.citrix.com ([46.33.159.39]:57333)
	by ppsw-43.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.149]:25)
	with esmtp id 1Ti7PR-0007Fn-ns (Exim 4.72) for
	cl-mirage@lists.cam.ac.uk (return-path <Dave.Scott@eu.citrix.com>);
	Mon, 10 Dec 2012 17:44:54 +0000
X-IronPort-AV: E=Sophos;i="4.84,252,1355097600"; 
   d="scan'208";a="40765"
Received: from lonpmailmx01.citrite.net ([10.30.203.162])
	by LONPIPO01.EU.CITRIX.COM with ESMTP/TLS/RC4-MD5;
	10 Dec 2012 17:44:53 +0000
Received: from LONPMAILBOX01.citrite.net ([10.30.224.161]) by
	LONPMAILMX01.citrite.net ([10.30.203.162]) with mapi; Mon, 10 Dec 2012
	17:44:52 +0000
From: Dave Scott <Dave.Scott@eu.citrix.com>
To: "cl-mirage@lists.cam.ac.uk" <cl-mirage@lists.cam.ac.uk>
Date: Mon, 10 Dec 2012 17:44:51 +0000
Subject: mirage xen shared memory rings
Thread-Topic: mirage xen shared memory rings
Thread-Index: Ac3W/g/dKcjuNHhDSNehyxAT2RuzLQ==
Message-ID: <81A73678E76EA642801C8F2E4823AD21012F0D72EBAC@LONPMAILBOX01.citrite.net>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
acceptlanguage: en-US
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-BeenThere: cl-mirage@lists.cam.ac.uk
X-Mailman-Version: 2.1.8
Precedence: list
List-Id: MirageOS development <cl-mirage.lists.cam.ac.uk>
List-Unsubscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=unsubscribe>
List-Archive: <https://lists.cam.ac.uk/pipermail/cl-mirage>
List-Post: <mailto:cl-mirage@lists.cam.ac.uk>
List-Help: <mailto:cl-mirage-request@lists.cam.ac.uk?subject=help>
List-Subscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=subscribe>
X-List-Received-Date: Mon, 10 Dec 2012 17:44:54 -0000
Content-Length: 1629
Lines: 40

Hi,

I've recently been hacking on the mirage xen shared memory ring code. This =
code is the foundation for the virtual devices, in particular
* disks
* network interfaces
* console (critical for debugging)
* xenstore (critical for attaching other devices)

I've created a standalone library here:

https://github.com/djs55/shared-memory-ring

I've added a set of simple unit tests and fixed a bug where console output =
was being silently dropped (!) I think this explains the loss of debug mess=
ages that Balraj and I saw while investigating the TCP problem. The console=
 and xenstore rings are now also lots faster since they use Bigarray.blit r=
ather than a hand-coded copy-one-byte-at-a-time-while-loop.

My next steps are:
1. to make this library a dependency of the mirage-platform (rather than ha=
ving the code inline)
2. to extract the xen disk and network interface support from mirage-platfo=
rm and make these into separate libraries too
3. to define a shared-memory transport for logging / stats collecting

(2) should be interesting because the same xen disk and network interface s=
upport code should "just work" from userspace as well as kernelspace, if we=
 add ocaml bindings for the xen "gntdev" library which allows userspace acc=
ess to memory pages "granted" by a VM. It should be possible to:

a. "opam install gntdev blkback vhd" to install the relevant libraries and =
then
b. instantiate the blkback functor with the gntdev interface and the vhd-wr=
iting code to make a fully-functional xen virtual disk device from a toplev=
el... how cool would that be?! (Maybe it's just me...)

Cheers,
Dave


From anil@recoil.org Tue Dec 11 09:41:04 2012
Received: from ppsw-51.csi.cam.ac.uk ([131.111.8.151])
	by lists-2.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25)
	with esmtp id 1TiMKm-0000BR-UG (Exim 4.70) for
	cl-mirage@lists.cam.ac.uk
	(return-path <anil@recoil.org>); Tue, 11 Dec 2012 09:41:04 +0000
X-Cam-AntiVirus: no malware found
X-Cam-SpamDetails: score 0.0 from SpamAssassin-3.3.2-1418219
X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/
Received: from recoil.dh.bytemark.co.uk ([89.16.177.154]:7560
	helo=dark.recoil.org)
	by ppsw-51.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.148]:25)
	with smtp id 1TiMKm-0006MC-XG (Exim 4.72) for cl-mirage@lists.cam.ac.uk
	(return-path <anil@recoil.org>); Tue, 11 Dec 2012 09:41:04 +0000
Received: (qmail 19900 invoked by uid 634); 11 Dec 2012 09:41:04 -0000
X-Spam-Level: *
X-Spam-Status: No, hits=-1.0 required=5.0
	tests=ALL_TRUSTED
X-Spam-Check-By: dark.recoil.org
Received: from volstagg-0.srg.cl.cam.ac.uk (HELO [10.0.0.83]) (128.232.32.232)
	(smtp-auth username remote@recoil.org, mechanism cram-md5)
	by dark.recoil.org (qpsmtpd/0.84) with ESMTPA;
	Tue, 11 Dec 2012 09:41:03 +0000
From: Anil Madhavapeddy <anil@recoil.org>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: quoted-printable
Subject: synching with minios
Date: Tue, 11 Dec 2012 09:41:04 +0000
Message-Id: <4304D3F4-B645-4A14-A913-878DFC73E9F9@recoil.org>
To: Balraj Singh <balraj.singh@cl.cam.ac.uk>,
	Steven Smith <steven.smith@cl.cam.ac.uk>
Mime-Version: 1.0 (Mac OS X Mail 6.1 \(1498\))
X-Mailer: Apple Mail (2.1498)
X-Virus-Checked: Checked by ClamAV on dark.recoil.org
Cc: "cl-mirage@lists.cam.ac.uk List" <cl-mirage@lists.cam.ac.uk>
X-BeenThere: cl-mirage@lists.cam.ac.uk
X-Mailman-Version: 2.1.8
Precedence: list
List-Id: MirageOS development <cl-mirage.lists.cam.ac.uk>
List-Unsubscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=unsubscribe>
List-Archive: <https://lists.cam.ac.uk/pipermail/cl-mirage>
List-Post: <mailto:cl-mirage@lists.cam.ac.uk>
List-Help: <mailto:cl-mirage-request@lists.cam.ac.uk?subject=help>
List-Subscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=subscribe>
X-List-Received-Date: Tue, 11 Dec 2012 09:41:05 -0000
Content-Length: 655
Lines: 16

While updating the OCaml runtime to 4.00 (which now boots!), I also =
looked at recent MiniOS changes, and found this:
http://xenbits.xen.org/hg/xen-unstable.hg/rev/c9f621893a05

...which adds floating point initialisation to MiniOS also.  This was =
the root cause of the floating point exceptions that Balraj was seeing =
when running Xen 4.2 on i7 CPUs.  Always worth checking upstream first =
:)

I'm doing a quick sync of the MiniOS tree with ours too, while I'm here. =
 It's not quite so "mini" upstream anymore, with many many new drivers =
that we don't need, but there are some useful cleanups in the memory =
management layer as well.

-anil=


From robert.watson@cl.cam.ac.uk Tue Dec 11 10:03:03 2012
Received: from ppsw-41.csi.cam.ac.uk ([131.111.8.141])
	by lists-2.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25)
	with esmtp id 1TiMg3-0001Ji-CY (Exim 4.70) for
	cl-mirage@lists.cam.ac.uk (return-path <robert.watson@cl.cam.ac.uk>);
	Tue, 11 Dec 2012 10:03:03 +0000
X-Cam-AntiVirus: no malware found
X-Cam-SpamDetails: score 0.0 from SpamAssassin-3.3.2-1418219
X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/
Received: from cyrus.watson.org ([65.122.17.42]:20063)
	by ppsw-41.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.146]:25)
	with esmtp id 1TiMg2-0007mA-RY (Exim 4.72) for
	cl-mirage@lists.cam.ac.uk (return-path <robert.watson@cl.cam.ac.uk>);
	Tue, 11 Dec 2012 10:03:03 +0000
Received: from [192.168.2.115] (host86-129-88-139.range86-129.btcentralplus.com
	[86.129.88.139])
	by cyrus.watson.org (Postfix) with ESMTPSA id E510346B06;
	Tue, 11 Dec 2012 05:03:01 -0500 (EST)
References: <4304D3F4-B645-4A14-A913-878DFC73E9F9@recoil.org>
Mime-Version: 1.0 (1.0)
In-Reply-To: <4304D3F4-B645-4A14-A913-878DFC73E9F9@recoil.org>
Content-Type: text/plain;
	charset=us-ascii
Content-Transfer-Encoding: quoted-printable
Message-Id: <5ADC76E8-33D5-4DE2-A51F-03F984DF8EC8@cl.cam.ac.uk>
X-Mailer: iPad Mail (10A403)
From: "Robert N. M. Watson" <robert.watson@cl.cam.ac.uk>
Subject: Re: synching with minios
Date: Tue, 11 Dec 2012 10:03:03 +0000
To: Anil Madhavapeddy <anil@recoil.org>
Cc: Balraj Singh <balraj.singh@cl.cam.ac.uk>,
	Steven Smith <steven.smith@cl.cam.ac.uk>,
	"cl-mirage@lists.cam.ac.uk List" <cl-mirage@lists.cam.ac.uk>
X-BeenThere: cl-mirage@lists.cam.ac.uk
X-Mailman-Version: 2.1.8
Precedence: list
List-Id: MirageOS development <cl-mirage.lists.cam.ac.uk>
List-Unsubscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=unsubscribe>
List-Archive: <https://lists.cam.ac.uk/pipermail/cl-mirage>
List-Post: <mailto:cl-mirage@lists.cam.ac.uk>
List-Help: <mailto:cl-mirage-request@lists.cam.ac.uk?subject=help>
List-Subscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=subscribe>
X-List-Received-Date: Tue, 11 Dec 2012 10:03:03 -0000
Content-Length: 1188
Lines: 26

It's probably worth observing that unconditional dependence on floating poin=
t also caused problems for Mirage running within the FreeBSD kernel, and wou=
ld also be a problem for embedded microcontroller/etc systems, should the sm=
allness and potential verifiability properties of Mirage become appealing th=
ere. It would be lovely to see Mirage, and by implication the OCaml runtime,=
 make dependence on floating point optional.

Robert

On 11 Dec 2012, at 09:41, Anil Madhavapeddy <anil@recoil.org> wrote:

> While updating the OCaml runtime to 4.00 (which now boots!), I also looked=
 at recent MiniOS changes, and found this:
> http://xenbits.xen.org/hg/xen-unstable.hg/rev/c9f621893a05
>=20
> ...which adds floating point initialisation to MiniOS also.  This was the r=
oot cause of the floating point exceptions that Balraj was seeing when runni=
ng Xen 4.2 on i7 CPUs.  Always worth checking upstream first :)
>=20
> I'm doing a quick sync of the MiniOS tree with ours too, while I'm here.  I=
t's not quite so "mini" upstream anymore, with many many new drivers that we=
 don't need, but there are some useful cleanups in the memory management lay=
er as well.
>=20
> -anil


From anil@recoil.org Tue Dec 11 10:25:17 2012
Received: from ppsw-51.csi.cam.ac.uk ([131.111.8.151])
	by lists-2.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25)
	with esmtp id 1TiN1Z-00027G-3F (Exim 4.70) for
	cl-mirage@lists.cam.ac.uk
	(return-path <anil@recoil.org>); Tue, 11 Dec 2012 10:25:17 +0000
X-Cam-AntiVirus: no malware found
X-Cam-SpamDetails: score 0.0 from SpamAssassin-3.3.2-1418219
X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/
Received: from recoil.dh.bytemark.co.uk ([89.16.177.154]:35250
	helo=dark.recoil.org)
	by ppsw-51.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.148]:25)
	with smtp id 1TiN1Y-0008C2-XW (Exim 4.72) for cl-mirage@lists.cam.ac.uk
	(return-path <anil@recoil.org>); Tue, 11 Dec 2012 10:25:17 +0000
Received: (qmail 26053 invoked by uid 634); 11 Dec 2012 10:25:16 -0000
X-Spam-Level: *
X-Spam-Status: No, hits=-1.0 required=5.0
	tests=ALL_TRUSTED
X-Spam-Check-By: dark.recoil.org
Received: from volstagg-0.srg.cl.cam.ac.uk (HELO [10.0.0.83]) (128.232.32.232)
	(smtp-auth username remote@recoil.org, mechanism cram-md5)
	by dark.recoil.org (qpsmtpd/0.84) with ESMTPA;
	Tue, 11 Dec 2012 10:25:15 +0000
Content-Type: text/plain; charset=us-ascii
Mime-Version: 1.0 (Mac OS X Mail 6.1 \(1498\))
Subject: Re: synching with minios
From: Anil Madhavapeddy <anil@recoil.org>
In-Reply-To: <5ADC76E8-33D5-4DE2-A51F-03F984DF8EC8@cl.cam.ac.uk>
Date: Tue, 11 Dec 2012 10:25:16 +0000
Content-Transfer-Encoding: quoted-printable
Message-Id: <469BDF7A-7291-4589-9FCE-0D4602C3D897@recoil.org>
References: <4304D3F4-B645-4A14-A913-878DFC73E9F9@recoil.org>
	<5ADC76E8-33D5-4DE2-A51F-03F984DF8EC8@cl.cam.ac.uk>
To: "Robert N. M. Watson" <robert.watson@cl.cam.ac.uk>
X-Mailer: Apple Mail (2.1498)
X-Virus-Checked: Checked by ClamAV on dark.recoil.org
Cc: Balraj Singh <balraj.singh@cl.cam.ac.uk>,
	Steven Smith <steven.smith@cl.cam.ac.uk>,
	"cl-mirage@lists.cam.ac.uk List" <cl-mirage@lists.cam.ac.uk>
X-BeenThere: cl-mirage@lists.cam.ac.uk
X-Mailman-Version: 2.1.8
Precedence: list
List-Id: MirageOS development <cl-mirage.lists.cam.ac.uk>
List-Unsubscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=unsubscribe>
List-Archive: <https://lists.cam.ac.uk/pipermail/cl-mirage>
List-Post: <mailto:cl-mirage@lists.cam.ac.uk>
List-Help: <mailto:cl-mirage-request@lists.cam.ac.uk?subject=help>
List-Subscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=subscribe>
X-List-Received-Date: Tue, 11 Dec 2012 10:25:17 -0000
Content-Length: 1828
Lines: 45

Absolutely. It just requires soft floating point support instead of =
hardware calls.  This is available in the ARM backend already, but is an =
unusual requirement for x86.

However, it's a requirement before we can merge Gabor Pali's FreeBSD =
kernel backend into the main tree, so it's on the TODO list to sort out. =
Note that most of the libraries we use only make occasional use of =
floating point (unless they're explicit numerical computation =
libraries), so this won't be a performance hit either.

-anil

On 11 Dec 2012, at 10:03, "Robert N. M. Watson" =
<robert.watson@cl.cam.ac.uk> wrote:

> It's probably worth observing that unconditional dependence on =
floating point also caused problems for Mirage running within the =
FreeBSD kernel, and would also be a problem for embedded =
microcontroller/etc systems, should the smallness and potential =
verifiability properties of Mirage become appealing there. It would be =
lovely to see Mirage, and by implication the OCaml runtime, make =
dependence on floating point optional.
>=20
> Robert
>=20
> On 11 Dec 2012, at 09:41, Anil Madhavapeddy <anil@recoil.org> wrote:
>=20
>> While updating the OCaml runtime to 4.00 (which now boots!), I also =
looked at recent MiniOS changes, and found this:
>> http://xenbits.xen.org/hg/xen-unstable.hg/rev/c9f621893a05
>>=20
>> ...which adds floating point initialisation to MiniOS also.  This was =
the root cause of the floating point exceptions that Balraj was seeing =
when running Xen 4.2 on i7 CPUs.  Always worth checking upstream first =
:)
>>=20
>> I'm doing a quick sync of the MiniOS tree with ours too, while I'm =
here.  It's not quite so "mini" upstream anymore, with many many new =
drivers that we don't need, but there are some useful cleanups in the =
memory management layer as well.
>>=20
>> -anil
>=20



From robert.watson@cl.cam.ac.uk Tue Dec 11 11:07:01 2012
Received: from ppsw-51.csi.cam.ac.uk ([131.111.8.151])
	by lists-2.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25)
	with esmtp id 1TiNfw-0004Ub-V3 (Exim 4.70) for
	cl-mirage@lists.cam.ac.uk (return-path <robert.watson@cl.cam.ac.uk>);
	Tue, 11 Dec 2012 11:07:00 +0000
X-Cam-AntiVirus: no malware found
X-Cam-SpamDetails: score 0.0 from SpamAssassin-3.3.2-1418219
X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/
Received: from cyrus.watson.org ([65.122.17.42]:35100)
	by ppsw-51.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.148]:25)
	with esmtp id 1TiNfw-0001NO-Xf (Exim 4.72) for
	cl-mirage@lists.cam.ac.uk (return-path <robert.watson@cl.cam.ac.uk>);
	Tue, 11 Dec 2012 11:07:00 +0000
Received: from [192.168.2.119] (host86-129-88-139.range86-129.btcentralplus.com
	[86.129.88.139])
	by cyrus.watson.org (Postfix) with ESMTPSA id F2F5946B1A;
	Tue, 11 Dec 2012 06:06:58 -0500 (EST)
Subject: Re: synching with minios
Mime-Version: 1.0 (Apple Message framework v1283)
Content-Type: text/plain; charset=us-ascii
From: "Robert N. M. Watson" <robert.watson@cl.cam.ac.uk>
In-Reply-To: <469BDF7A-7291-4589-9FCE-0D4602C3D897@recoil.org>
Date: Tue, 11 Dec 2012 11:06:57 +0000
Content-Transfer-Encoding: quoted-printable
Message-Id: <357752B8-FCCE-4BD3-A79C-36308C1EDD71@cl.cam.ac.uk>
References: <4304D3F4-B645-4A14-A913-878DFC73E9F9@recoil.org>
	<5ADC76E8-33D5-4DE2-A51F-03F984DF8EC8@cl.cam.ac.uk>
	<469BDF7A-7291-4589-9FCE-0D4602C3D897@recoil.org>
To: Anil Madhavapeddy <anil@recoil.org>
X-Mailer: Apple Mail (2.1283)
Cc: Balraj Singh <balraj.singh@cl.cam.ac.uk>,
	Steven Smith <steven.smith@cl.cam.ac.uk>,
	"cl-mirage@lists.cam.ac.uk List" <cl-mirage@lists.cam.ac.uk>
X-BeenThere: cl-mirage@lists.cam.ac.uk
X-Mailman-Version: 2.1.8
Precedence: list
List-Id: MirageOS development <cl-mirage.lists.cam.ac.uk>
List-Unsubscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=unsubscribe>
List-Archive: <https://lists.cam.ac.uk/pipermail/cl-mirage>
List-Post: <mailto:cl-mirage@lists.cam.ac.uk>
List-Help: <mailto:cl-mirage-request@lists.cam.ac.uk?subject=help>
List-Subscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=subscribe>
X-List-Received-Date: Tue, 11 Dec 2012 11:07:01 -0000
Content-Length: 1061
Lines: 23


On 11 Dec 2012, at 10:25, Anil Madhavapeddy wrote:

> Absolutely. It just requires soft floating point support instead of =
hardware calls.  This is available in the ARM backend already, but is an =
unusual requirement for x86.
>=20
> However, it's a requirement before we can merge Gabor Pali's FreeBSD =
kernel backend into the main tree, so it's on the TODO list to sort out. =
Note that most of the libraries we use only make occasional use of =
floating point (unless they're explicit numerical computation =
libraries), so this won't be a performance hit either.

The usual in-kernel workaround is to use a very small amount of =
fixed-point rather than depend on the presence of floating point -- not =
just to avoid the functional footprint, but for performance reasons. =
This is not the ideal solution for everyone, but I do find myself =
slightly surprised that the base OCaml runtime *must* use FP. You should =
be able to measure the additional cost on VM/OS context switching with =
FP enabled as a result. (At least, I would surmise.)

Robert=


From anil@recoil.org Tue Dec 11 11:37:31 2012
Received: from ppsw-51.csi.cam.ac.uk ([131.111.8.151])
	by lists-2.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25)
	with esmtp id 1TiO9T-0005gK-47 (Exim 4.70) for
	cl-mirage@lists.cam.ac.uk
	(return-path <anil@recoil.org>); Tue, 11 Dec 2012 11:37:31 +0000
X-Cam-AntiVirus: no malware found
X-Cam-SpamDetails: score 0.0 from SpamAssassin-3.3.2-1418219
X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/
Received: from recoil.dh.bytemark.co.uk ([89.16.177.154]:46399
	helo=dark.recoil.org)
	by ppsw-51.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.148]:25)
	with smtp id 1TiO9S-0006SN-YA (Exim 4.72) for cl-mirage@lists.cam.ac.uk
	(return-path <anil@recoil.org>); Tue, 11 Dec 2012 11:37:30 +0000
Received: (qmail 23261 invoked by uid 634); 11 Dec 2012 11:37:30 -0000
X-Spam-Level: *
X-Spam-Status: No, hits=-1.0 required=5.0
	tests=ALL_TRUSTED
X-Spam-Check-By: dark.recoil.org
Received: from volstagg-0.srg.cl.cam.ac.uk (HELO [10.0.0.83]) (128.232.32.232)
	(smtp-auth username remote@recoil.org, mechanism cram-md5)
	by dark.recoil.org (qpsmtpd/0.84) with ESMTPA;
	Tue, 11 Dec 2012 11:37:29 +0000
Content-Type: text/plain; charset=us-ascii
Mime-Version: 1.0 (Mac OS X Mail 6.1 \(1498\))
Subject: Re: synching with minios
From: Anil Madhavapeddy <anil@recoil.org>
In-Reply-To: <357752B8-FCCE-4BD3-A79C-36308C1EDD71@cl.cam.ac.uk>
Date: Tue, 11 Dec 2012 11:37:30 +0000
Content-Transfer-Encoding: quoted-printable
Message-Id: <AB98175C-1768-406A-8DAB-4CF97B3BB866@recoil.org>
References: <4304D3F4-B645-4A14-A913-878DFC73E9F9@recoil.org>
	<5ADC76E8-33D5-4DE2-A51F-03F984DF8EC8@cl.cam.ac.uk>
	<469BDF7A-7291-4589-9FCE-0D4602C3D897@recoil.org>
	<357752B8-FCCE-4BD3-A79C-36308C1EDD71@cl.cam.ac.uk>
To: "Robert N. M. Watson" <robert.watson@cl.cam.ac.uk>
X-Mailer: Apple Mail (2.1498)
X-Virus-Checked: Checked by ClamAV on dark.recoil.org
Cc: Balraj Singh <balraj.singh@cl.cam.ac.uk>,
	Steven Smith <steven.smith@cl.cam.ac.uk>,
	"cl-mirage@lists.cam.ac.uk List" <cl-mirage@lists.cam.ac.uk>
X-BeenThere: cl-mirage@lists.cam.ac.uk
X-Mailman-Version: 2.1.8
Precedence: list
List-Id: MirageOS development <cl-mirage.lists.cam.ac.uk>
List-Unsubscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=unsubscribe>
List-Archive: <https://lists.cam.ac.uk/pipermail/cl-mirage>
List-Post: <mailto:cl-mirage@lists.cam.ac.uk>
List-Help: <mailto:cl-mirage-request@lists.cam.ac.uk?subject=help>
List-Subscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=subscribe>
X-List-Received-Date: Tue, 11 Dec 2012 11:37:31 -0000
Content-Length: 1731
Lines: 37

On 11 Dec 2012, at 11:06, "Robert N. M. Watson" =
<robert.watson@cl.cam.ac.uk> wrote:

>=20
> On 11 Dec 2012, at 10:25, Anil Madhavapeddy wrote:
>=20
>> Absolutely. It just requires soft floating point support instead of =
hardware calls.  This is available in the ARM backend already, but is an =
unusual requirement for x86.
>>=20
>> However, it's a requirement before we can merge Gabor Pali's FreeBSD =
kernel backend into the main tree, so it's on the TODO list to sort out. =
Note that most of the libraries we use only make occasional use of =
floating point (unless they're explicit numerical computation =
libraries), so this won't be a performance hit either.
>=20
> The usual in-kernel workaround is to use a very small amount of =
fixed-point rather than depend on the presence of floating point -- not =
just to avoid the functional footprint, but for performance reasons. =
This is not the ideal solution for everyone, but I do find myself =
slightly surprised that the base OCaml runtime *must* use FP. You should =
be able to measure the additional cost on VM/OS context switching with =
FP enabled as a result. (At least, I would surmise.)

The OCaml runtime doesn't require floating point, but recall that we =
don't control what libraries that are linked in to the final kernel =
binary.

Many of the OCaml libraries use floating point here and there, and it's =
easier to emulate this as soft floating point than it is to forbid the =
use of FP by modifying the compiler.  It's actually exceptionally easy =
to forbid floating point, as we just need to remove a few functions from =
the Pervasives module such as the (+.) and (-.) operators (OCaml has =
separate floating point and integer operators).

-anil=


From pgj@caesar.elte.hu Tue Dec 11 11:59:33 2012
Received: from ppsw-41.csi.cam.ac.uk ([131.111.8.141])
	by lists-2.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25)
	with esmtp id 1TiOUn-0006P5-R4 (Exim 4.70) for
	cl-mirage@lists.cam.ac.uk
	(return-path <pgj@caesar.elte.hu>); Tue, 11 Dec 2012 11:59:33 +0000
X-Cam-AntiVirus: no malware found
X-Cam-SpamDetails: score -0.7 from SpamAssassin-3.3.2-1418219 
	* -0.0 RP_MATCHES_RCVD Envelope sender domain matches handover relay
	*      domain
	* -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/,
	low *      trust
	*      [157.181.151.9 listed in list.dnswl.dnsbl.ja.net]
X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/
Received: from mx2.mail.elte.hu ([157.181.151.9]:57524)
	by ppsw-41.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.146]:25)
	with esmtp id 1TiOUm-0008UF-S3 (Exim 4.72)
	(return-path <pgj@caesar.elte.hu>); Tue, 11 Dec 2012 11:59:33 +0000
Received: from login01.caesar.elte.hu ([157.181.151.130])
	by mx2.mail.elte.hu with esmtp (Exim) id 1TiOUh-0006zu-15
	from <pgj@caesar.elte.hu>; Tue, 11 Dec 2012 12:59:28 +0100
Received: (Authenticated sender: pgj)
	by login01.caesar.elte.hu with local (Exim 4.72)
	(envelope-from <pgj@caesar.elte.hu>)
	id 1TiOUf-0001TG-LP; Tue, 11 Dec 2012 12:59:25 +0100
Date: Tue, 11 Dec 2012 12:59:25 +0100
From: PALI Gabor Janos <pgj@elte.hu>
To: Anil Madhavapeddy <anil@recoil.org>
Subject: Re: synching with minios
Message-ID: <20121211115925.GD3796@caesar.elte.hu>
References: <4304D3F4-B645-4A14-A913-878DFC73E9F9@recoil.org>
	<5ADC76E8-33D5-4DE2-A51F-03F984DF8EC8@cl.cam.ac.uk>
	<469BDF7A-7291-4589-9FCE-0D4602C3D897@recoil.org>
	<357752B8-FCCE-4BD3-A79C-36308C1EDD71@cl.cam.ac.uk>
	<AB98175C-1768-406A-8DAB-4CF97B3BB866@recoil.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <AB98175C-1768-406A-8DAB-4CF97B3BB866@recoil.org>
User-Agent: Mutt/1.5.20 (2009-06-14)
Sender: Pali Gabor Janos <pgj@login01.caesar.elte.hu>
X-ELTE-SpamScore: -2.0
X-ELTE-SpamLevel: 
X-ELTE-SpamCheck: no
X-ELTE-SpamVersion: ELTE 2.0 
X-ELTE-SpamCheck-Details: score=-2.0 required=5.9 tests=AWL,
	BAYES_00 autolearn=no SpamAssassin version=3.3.1
	-2.0 BAYES_00               BODY: Bayes spam probability is 0 to 1%
	[score: 0.0000]
	0.0 AWL AWL: From: address is in the auto white-list
Cc: Balraj Singh <balraj.singh@cl.cam.ac.uk>,
	Steven Smith <steven.smith@cl.cam.ac.uk>,
	"Robert N. M. Watson" <robert.watson@cl.cam.ac.uk>,
	"cl-mirage@lists.cam.ac.uk List" <cl-mirage@lists.cam.ac.uk>
X-BeenThere: cl-mirage@lists.cam.ac.uk
X-Mailman-Version: 2.1.8
Precedence: list
List-Id: MirageOS development <cl-mirage.lists.cam.ac.uk>
List-Unsubscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=unsubscribe>
List-Archive: <https://lists.cam.ac.uk/pipermail/cl-mirage>
List-Post: <mailto:cl-mirage@lists.cam.ac.uk>
List-Help: <mailto:cl-mirage-request@lists.cam.ac.uk?subject=help>
List-Subscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=subscribe>
X-List-Received-Date: Tue, 11 Dec 2012 11:59:33 -0000
Content-Length: 916
Lines: 15

On Tue, Dec 11, 2012 at 11:37:30AM +0000, Anil Madhavapeddy wrote:
> The OCaml runtime doesn't require floating point, but recall that we don't control what libraries that are linked in to the final kernel binary.

Perhaps my recollections are wrong, but the runtime uses floating-pointing numbers
even to operate the garbage collector (see my fix you have even referenced on one
of the OCaml mailing lists), not speaking of measuring the time as real value, i.e.
by aid of floating-point numbers.  Because of that my backend actually breaks the
interface of others.

This is one of the main reasons why I could not get the mirage-www page building,
because I was trying to stick to the FPU-less mirage-platform version of mine,
while reworking all the dependent packages, e.g. mirage-net, cohttp, etc. to
adapt to this change -- but I stuck somewhere in the forest of tricky type errors
and lack of spare time :-)


From balraj885@gmail.com Tue Dec 11 12:00:53 2012
Received: from ppsw-51.csi.cam.ac.uk ([131.111.8.151])
	by lists-2.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25)
	with esmtp id 1TiOW5-0006TI-Ca (Exim 4.70) for
	cl-mirage@lists.cam.ac.uk
	(return-path <balraj885@gmail.com>); Tue, 11 Dec 2012 12:00:53 +0000
X-Cam-AntiVirus: no malware found
X-Cam-SpamDetails: score -0.4 from SpamAssassin-3.3.2-1418219 
	* -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/,
	low *      trust
	*      [209.85.210.182 listed in list.dnswl.dnsbl.ja.net]
	* 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail
	provider *       (balraj885[at]gmail.com)
	* 0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends
	in *      digit (balraj885[at]gmail.com)
	*  0.0 HTML_MESSAGE BODY: HTML included in message
	*  0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily
	*      valid
	* -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature
X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/
Received: from mail-ia0-f182.google.com ([209.85.210.182]:40988)
	by ppsw-51.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.148]:25)
	with esmtp id 1TiOW4-00088g-YV (Exim 4.72) for
	cl-mirage@lists.cam.ac.uk
	(return-path <balraj885@gmail.com>); Tue, 11 Dec 2012 12:00:53 +0000
Received: by mail-ia0-f182.google.com with SMTP id x2so9308025iad.27
	for <cl-mirage@lists.cam.ac.uk>; Tue, 11 Dec 2012 04:00:51 -0800 (PST)
MIME-Version: 1.0
Received: by 10.50.57.200 with SMTP id k8mr9707711igq.29.1355227251790; Tue,
	11 Dec 2012 04:00:51 -0800 (PST)
Sender: balraj885@gmail.com
Received: by 10.64.9.1 with HTTP; Tue, 11 Dec 2012 04:00:51 -0800 (PST)
In-Reply-To: <AB98175C-1768-406A-8DAB-4CF97B3BB866@recoil.org>
References: <4304D3F4-B645-4A14-A913-878DFC73E9F9@recoil.org>
	<5ADC76E8-33D5-4DE2-A51F-03F984DF8EC8@cl.cam.ac.uk>
	<469BDF7A-7291-4589-9FCE-0D4602C3D897@recoil.org>
	<357752B8-FCCE-4BD3-A79C-36308C1EDD71@cl.cam.ac.uk>
	<AB98175C-1768-406A-8DAB-4CF97B3BB866@recoil.org>
Date: Tue, 11 Dec 2012 12:00:51 +0000
X-Google-Sender-Auth: VOfpvIF0jZ9x_BMMmjRuOSSMm2s
Message-ID: <CANeYhgHHzCWCEW3FeXEeFsrpiXLA=9U-jk0-iDwtVxnhVSxQ_w@mail.gmail.com>
Subject: Re: synching with minios
From: Balraj Singh <balraj.singh@cl.cam.ac.uk>
To: Anil Madhavapeddy <anil@recoil.org>
Content-Type: multipart/alternative; boundary=14dae9340f8beed41704d0926e13
Cc: Steven Smith <steven.smith@cl.cam.ac.uk>,
	"Robert N. M. Watson" <robert.watson@cl.cam.ac.uk>,
	"cl-mirage@lists.cam.ac.uk List" <cl-mirage@lists.cam.ac.uk>
X-BeenThere: cl-mirage@lists.cam.ac.uk
X-Mailman-Version: 2.1.8
Precedence: list
List-Id: MirageOS development <cl-mirage.lists.cam.ac.uk>
List-Unsubscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=unsubscribe>
List-Archive: <https://lists.cam.ac.uk/pipermail/cl-mirage>
List-Post: <mailto:cl-mirage@lists.cam.ac.uk>
List-Help: <mailto:cl-mirage-request@lists.cam.ac.uk?subject=help>
List-Subscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=subscribe>
X-List-Received-Date: Tue, 11 Dec 2012 12:00:53 -0000
Content-Length: 5232
Lines: 114

--14dae9340f8beed41704d0926e13
Content-Type: text/plain; charset=ISO-8859-1

Here and there, like Anil says is right.  Other than +., *., conversions
and of course the maths functions, the only places that I found floating
point (and sse) instructions when cursorily scanning the assembly was in
the garbage collector and much of that use was for gc stats.  There is also
a bit in sys.time.  I think that soft FP will not impact performance much
if at all.

Balraj


On Tue, Dec 11, 2012 at 11:37 AM, Anil Madhavapeddy <anil@recoil.org> wrote:

> On 11 Dec 2012, at 11:06, "Robert N. M. Watson" <
> robert.watson@cl.cam.ac.uk> wrote:
>
> >
> > On 11 Dec 2012, at 10:25, Anil Madhavapeddy wrote:
> >
> >> Absolutely. It just requires soft floating point support instead of
> hardware calls.  This is available in the ARM backend already, but is an
> unusual requirement for x86.
> >>
> >> However, it's a requirement before we can merge Gabor Pali's FreeBSD
> kernel backend into the main tree, so it's on the TODO list to sort out.
> Note that most of the libraries we use only make occasional use of floating
> point (unless they're explicit numerical computation libraries), so this
> won't be a performance hit either.
> >
> > The usual in-kernel workaround is to use a very small amount of
> fixed-point rather than depend on the presence of floating point -- not
> just to avoid the functional footprint, but for performance reasons. This
> is not the ideal solution for everyone, but I do find myself slightly
> surprised that the base OCaml runtime *must* use FP. You should be able to
> measure the additional cost on VM/OS context switching with FP enabled as a
> result. (At least, I would surmise.)
>
> The OCaml runtime doesn't require floating point, but recall that we don't
> control what libraries that are linked in to the final kernel binary.
>
> Many of the OCaml libraries use floating point here and there, and it's
> easier to emulate this as soft floating point than it is to forbid the use
> of FP by modifying the compiler.  It's actually exceptionally easy to
> forbid floating point, as we just need to remove a few functions from the
> Pervasives module such as the (+.) and (-.) operators (OCaml has separate
> floating point and integer operators).
>
> -anil

--14dae9340f8beed41704d0926e13
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

Here and there, like Anil says is right. =A0Other than +., *., conversions =
and of course the maths functions, the only places that I found floating po=
int (and sse) instructions when cursorily scanning the assembly was in the =
garbage collector and much of that use was for gc stats. =A0There is also a=
 bit in sys.time. =A0I think that soft FP will not impact performance much =
if at all. =A0<div>

<br></div><div>Balraj<br><br><br><div class=3D"gmail_quote">On Tue, Dec 11,=
 2012 at 11:37 AM, Anil Madhavapeddy <span dir=3D"ltr">&lt;<a href=3D"mailt=
o:anil@recoil.org" target=3D"_blank">anil@recoil.org</a>&gt;</span> wrote:<=
br>
<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex">
<div><div>On 11 Dec 2012, at 11:06, &quot;Robert N. M. Watson&quot; &lt;<a =
href=3D"mailto:robert.watson@cl.cam.ac.uk" target=3D"_blank">robert.watson@=
cl.cam.ac.uk</a>&gt; wrote:<br>
<br>
&gt;<br>
&gt; On 11 Dec 2012, at 10:25, Anil Madhavapeddy wrote:<br>
&gt;<br>
&gt;&gt; Absolutely. It just requires soft floating point support instead o=
f hardware calls. =A0This is available in the ARM backend already, but is a=
n unusual requirement for x86.<br>
&gt;&gt;<br>
&gt;&gt; However, it&#39;s a requirement before we can merge Gabor Pali&#39=
;s FreeBSD kernel backend into the main tree, so it&#39;s on the TODO list =
to sort out. Note that most of the libraries we use only make occasional us=
e of floating point (unless they&#39;re explicit numerical computation libr=
aries), so this won&#39;t be a performance hit either.<br>


&gt;<br>
&gt; The usual in-kernel workaround is to use a very small amount of fixed-=
point rather than depend on the presence of floating point -- not just to a=
void the functional footprint, but for performance reasons. This is not the=
 ideal solution for everyone, but I do find myself slightly surprised that =
the base OCaml runtime *must* use FP. You should be able to measure the add=
itional cost on VM/OS context switching with FP enabled as a result. (At le=
ast, I would surmise.)<br>


<br>
</div></div>The OCaml runtime doesn&#39;t require floating point, but recal=
l that we don&#39;t control what libraries that are linked in to the final =
kernel binary.<br>
<br>
Many of the OCaml libraries use floating point here and there, and it&#39;s=
 easier to emulate this as soft floating point than it is to forbid the use=
 of FP by modifying the compiler. =A0It&#39;s actually exceptionally easy t=
o forbid floating point, as we just need to remove a few functions from the=
 Pervasives module such as the (+.) and (-.) operators (OCaml has separate =
floating point and integer operators).<br>


<span><font color=3D"#888888"><br>
-anil</font></span></blockquote></div><br></div>

--14dae9340f8beed41704d0926e13--


From robert.watson@cl.cam.ac.uk Tue Dec 11 12:37:18 2012
Received: from ppsw-51.csi.cam.ac.uk ([131.111.8.151])
	by lists-2.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25)
	with esmtp id 1TiP5K-0007k9-Ck (Exim 4.70) for
	cl-mirage@lists.cam.ac.uk (return-path <robert.watson@cl.cam.ac.uk>);
	Tue, 11 Dec 2012 12:37:18 +0000
X-Cam-AntiVirus: no malware found
X-Cam-SpamDetails: score 0.0 from SpamAssassin-3.3.2-1418219
X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/
Received: from cyrus.watson.org ([65.122.17.42]:54360)
	by ppsw-51.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.148]:25)
	with esmtp id 1TiP5J-0007C5-Yi (Exim 4.72) for
	cl-mirage@lists.cam.ac.uk (return-path <robert.watson@cl.cam.ac.uk>);
	Tue, 11 Dec 2012 12:37:18 +0000
Received: from fell28n62.joh.private.cam.ac.uk (global-1-82.nat.csx.cam.ac.uk
	[131.111.184.82])
	by cyrus.watson.org (Postfix) with ESMTPSA id C65F946B1A;
	Tue, 11 Dec 2012 07:37:15 -0500 (EST)
Subject: Re: synching with minios
Mime-Version: 1.0 (Apple Message framework v1283)
Content-Type: text/plain; charset=iso-8859-1
From: "Robert N. M. Watson" <robert.watson@cl.cam.ac.uk>
In-Reply-To: <CANeYhgHHzCWCEW3FeXEeFsrpiXLA=9U-jk0-iDwtVxnhVSxQ_w@mail.gmail.com>
Date: Tue, 11 Dec 2012 12:37:14 +0000
Content-Transfer-Encoding: quoted-printable
Message-Id: <870095F1-7301-400A-8085-F02D699BD3FF@cl.cam.ac.uk>
References: <4304D3F4-B645-4A14-A913-878DFC73E9F9@recoil.org>
	<5ADC76E8-33D5-4DE2-A51F-03F984DF8EC8@cl.cam.ac.uk>
	<469BDF7A-7291-4589-9FCE-0D4602C3D897@recoil.org>
	<357752B8-FCCE-4BD3-A79C-36308C1EDD71@cl.cam.ac.uk>
	<AB98175C-1768-406A-8DAB-4CF97B3BB866@recoil.org>
	<CANeYhgHHzCWCEW3FeXEeFsrpiXLA=9U-jk0-iDwtVxnhVSxQ_w@mail.gmail.com>
To: Balraj Singh <balraj.singh@cl.cam.ac.uk>
X-Mailer: Apple Mail (2.1283)
Cc: Steven Smith <steven.smith@cl.cam.ac.uk>,
	"cl-mirage@lists.cam.ac.uk List" <cl-mirage@lists.cam.ac.uk>,
	Anil Madhavapeddy <anil@recoil.org>
X-BeenThere: cl-mirage@lists.cam.ac.uk
X-Mailman-Version: 2.1.8
Precedence: list
List-Id: MirageOS development <cl-mirage.lists.cam.ac.uk>
List-Unsubscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=unsubscribe>
List-Archive: <https://lists.cam.ac.uk/pipermail/cl-mirage>
List-Post: <mailto:cl-mirage@lists.cam.ac.uk>
List-Help: <mailto:cl-mirage-request@lists.cam.ac.uk?subject=help>
List-Subscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=subscribe>
X-List-Received-Date: Tue, 11 Dec 2012 12:37:18 -0000
Content-Length: 1158
Lines: 28


On 11 Dec 2012, at 12:00, Balraj Singh wrote:

> Here and there, like Anil says is right.  Other than +., *., =
conversions and of course the maths functions, the only places that I =
found floating point (and sse) instructions when cursorily scanning the =
assembly was in the garbage collector and much of that use was for gc =
stats.  There is also a bit in sys.time.  I think that soft FP will not =
impact performance much if at all. =20

However, I think what you might want is:

(1) Mirage parts don't require floating point -- ideally a compiler flag =
combination for those portions to say "If it implies FP code generation, =
fail"
(2) Runtime and core OCaml libraries that can be linked against soft FP =
if desired, but can also use native FP if desired
(3) The ability for applications linked against Mirage to use FP =
natively for performance reason ... if desired.

That is: reduce or eliminate dependence on FP at the lowest levels of =
the system, but permit its use higher up if applications want it. If =
you're doing some FP-exploiting thing at the application level, =
definitely don't want to forbid its use of hardware FP!

Robert



From anil@recoil.org Tue Dec 11 12:57:07 2012
Received: from ppsw-51.csi.cam.ac.uk ([131.111.8.151])
	by lists-2.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25)
	with esmtp id 1TiPOV-0000OJ-SJ (Exim 4.70) for
	cl-mirage@lists.cam.ac.uk
	(return-path <anil@recoil.org>); Tue, 11 Dec 2012 12:57:07 +0000
X-Cam-AntiVirus: no malware found
X-Cam-SpamDetails: score 0.0 from SpamAssassin-3.3.2-1418219
X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/
Received: from recoil.dh.bytemark.co.uk ([89.16.177.154]:43257
	helo=dark.recoil.org)
	by ppsw-51.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.148]:25)
	with smtp id 1TiPOU-0006ae-Y8 (Exim 4.72) for cl-mirage@lists.cam.ac.uk
	(return-path <anil@recoil.org>); Tue, 11 Dec 2012 12:57:07 +0000
Received: (qmail 20868 invoked by uid 634); 11 Dec 2012 12:57:06 -0000
X-Spam-Level: *
X-Spam-Status: No, hits=-1.0 required=5.0
	tests=ALL_TRUSTED
X-Spam-Check-By: dark.recoil.org
Received: from volstagg-0.srg.cl.cam.ac.uk (HELO [10.0.0.83]) (128.232.32.232)
	(smtp-auth username remote@recoil.org, mechanism cram-md5)
	by dark.recoil.org (qpsmtpd/0.84) with ESMTPA;
	Tue, 11 Dec 2012 12:57:06 +0000
Content-Type: text/plain; charset=us-ascii
Mime-Version: 1.0 (Mac OS X Mail 6.1 \(1498\))
Subject: Re: synching with minios
From: Anil Madhavapeddy <anil@recoil.org>
In-Reply-To: <20121211115925.GD3796@caesar.elte.hu>
Date: Tue, 11 Dec 2012 12:57:04 +0000
Content-Transfer-Encoding: quoted-printable
Message-Id: <D5B6808E-26E1-49B4-AA31-308272F211C1@recoil.org>
References: <4304D3F4-B645-4A14-A913-878DFC73E9F9@recoil.org>
	<5ADC76E8-33D5-4DE2-A51F-03F984DF8EC8@cl.cam.ac.uk>
	<469BDF7A-7291-4589-9FCE-0D4602C3D897@recoil.org>
	<357752B8-FCCE-4BD3-A79C-36308C1EDD71@cl.cam.ac.uk>
	<AB98175C-1768-406A-8DAB-4CF97B3BB866@recoil.org>
	<20121211115925.GD3796@caesar.elte.hu>
To: PALI Gabor Janos <pgj@elte.hu>
X-Mailer: Apple Mail (2.1498)
X-Virus-Checked: Checked by ClamAV on dark.recoil.org
Cc: Balraj Singh <balraj.singh@cl.cam.ac.uk>,
	Steven Smith <steven.smith@cl.cam.ac.uk>,
	"Robert N. M. Watson" <robert.watson@cl.cam.ac.uk>,
	"cl-mirage@lists.cam.ac.uk List" <cl-mirage@lists.cam.ac.uk>
X-BeenThere: cl-mirage@lists.cam.ac.uk
X-Mailman-Version: 2.1.8
Precedence: list
List-Id: MirageOS development <cl-mirage.lists.cam.ac.uk>
List-Unsubscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=unsubscribe>
List-Archive: <https://lists.cam.ac.uk/pipermail/cl-mirage>
List-Post: <mailto:cl-mirage@lists.cam.ac.uk>
List-Help: <mailto:cl-mirage-request@lists.cam.ac.uk?subject=help>
List-Subscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=subscribe>
X-List-Received-Date: Tue, 11 Dec 2012 12:57:07 -0000
Content-Length: 1027
Lines: 30

On 11 Dec 2012, at 11:59, PALI Gabor Janos <pgj@elte.hu> wrote:

> On Tue, Dec 11, 2012 at 11:37:30AM +0000, Anil Madhavapeddy wrote:
>> The OCaml runtime doesn't require floating point, but recall that we =
don't control what libraries that are linked in to the final kernel =
binary.
>=20
> Perhaps my recollections are wrong, but the runtime uses =
floating-pointing numbers
> even to operate the garbage collector (see my fix you have even =
referenced on one
> of the OCaml mailing lists), not speaking of measuring the time as =
real value, i.e.
> by aid of floating-point numbers.  Because of that my backend actually =
breaks the
> interface of others.

Yeah, this is in the Gc module.  It's easy to fix, but breaks the ABI as =
you note.

However, as the rest of the system matures, the Gc module is the most =
likely to
break away and become more specialised for running in 'unikernel' or =
'kFreeBSD' mode
(for instance, to control how the kernel thread is scheduled, or other =
platform-specific
aspects).

-anil=


From anil@recoil.org Tue Dec 11 12:58:10 2012
Received: from ppsw-51.csi.cam.ac.uk ([131.111.8.151])
	by lists-2.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25)
	with esmtp id 1TiPPW-0000Pr-8s (Exim 4.70) for
	cl-mirage@lists.cam.ac.uk
	(return-path <anil@recoil.org>); Tue, 11 Dec 2012 12:58:10 +0000
X-Cam-AntiVirus: no malware found
X-Cam-SpamDetails: score 0.0 from SpamAssassin-3.3.2-1418219
X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/
Received: from recoil.dh.bytemark.co.uk ([89.16.177.154]:18344
	helo=dark.recoil.org)
	by ppsw-51.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.148]:25)
	with smtp id 1TiPPV-0006sX-YE (Exim 4.72) for cl-mirage@lists.cam.ac.uk
	(return-path <anil@recoil.org>); Tue, 11 Dec 2012 12:58:10 +0000
Received: (qmail 29587 invoked by uid 634); 11 Dec 2012 12:58:09 -0000
X-Spam-Level: *
X-Spam-Status: No, hits=-1.0 required=5.0
	tests=ALL_TRUSTED
X-Spam-Check-By: dark.recoil.org
Received: from volstagg-0.srg.cl.cam.ac.uk (HELO [10.0.0.83]) (128.232.32.232)
	(smtp-auth username remote@recoil.org, mechanism cram-md5)
	by dark.recoil.org (qpsmtpd/0.84) with ESMTPA;
	Tue, 11 Dec 2012 12:58:09 +0000
Content-Type: text/plain; charset=iso-8859-1
Mime-Version: 1.0 (Mac OS X Mail 6.1 \(1498\))
Subject: Re: synching with minios
From: Anil Madhavapeddy <anil@recoil.org>
In-Reply-To: <870095F1-7301-400A-8085-F02D699BD3FF@cl.cam.ac.uk>
Date: Tue, 11 Dec 2012 12:58:07 +0000
Content-Transfer-Encoding: quoted-printable
Message-Id: <C451DE4B-1610-4725-90E3-A4E6B25A83CB@recoil.org>
References: <4304D3F4-B645-4A14-A913-878DFC73E9F9@recoil.org>
	<5ADC76E8-33D5-4DE2-A51F-03F984DF8EC8@cl.cam.ac.uk>
	<469BDF7A-7291-4589-9FCE-0D4602C3D897@recoil.org>
	<357752B8-FCCE-4BD3-A79C-36308C1EDD71@cl.cam.ac.uk>
	<AB98175C-1768-406A-8DAB-4CF97B3BB866@recoil.org>
	<CANeYhgHHzCWCEW3FeXEeFsrpiXLA=9U-jk0-iDwtVxnhVSxQ_w@mail.gmail.com>
	<870095F1-7301-400A-8085-F02D699BD3FF@cl.cam.ac.uk>
To: "Robert N. M. Watson" <robert.watson@cl.cam.ac.uk>
X-Mailer: Apple Mail (2.1498)
X-Virus-Checked: Checked by ClamAV on dark.recoil.org
Cc: Balraj Singh <balraj.singh@cl.cam.ac.uk>,
	Steven Smith <steven.smith@cl.cam.ac.uk>,
	"cl-mirage@lists.cam.ac.uk List" <cl-mirage@lists.cam.ac.uk>
X-BeenThere: cl-mirage@lists.cam.ac.uk
X-Mailman-Version: 2.1.8
Precedence: list
List-Id: MirageOS development <cl-mirage.lists.cam.ac.uk>
List-Unsubscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=unsubscribe>
List-Archive: <https://lists.cam.ac.uk/pipermail/cl-mirage>
List-Post: <mailto:cl-mirage@lists.cam.ac.uk>
List-Help: <mailto:cl-mirage-request@lists.cam.ac.uk?subject=help>
List-Subscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=subscribe>
X-List-Received-Date: Tue, 11 Dec 2012 12:58:10 -0000
Content-Length: 1623
Lines: 37

On 11 Dec 2012, at 12:37, "Robert N. M. Watson" =
<robert.watson@cl.cam.ac.uk> wrote:
>=20
> On 11 Dec 2012, at 12:00, Balraj Singh wrote:
>=20
>> Here and there, like Anil says is right.  Other than +., *., =
conversions and of course the maths functions, the only places that I =
found floating point (and sse) instructions when cursorily scanning the =
assembly was in the garbage collector and much of that use was for gc =
stats.  There is also a bit in sys.time.  I think that soft FP will not =
impact performance much if at all. =20
>=20
> However, I think what you might want is:
>=20
> (1) Mirage parts don't require floating point -- ideally a compiler =
flag combination for those portions to say "If it implies FP code =
generation, fail"
> (2) Runtime and core OCaml libraries that can be linked against soft =
FP if desired, but can also use native FP if desired
> (3) The ability for applications linked against Mirage to use FP =
natively for performance reason ... if desired.
>=20
> That is: reduce or eliminate dependence on FP at the lowest levels of =
the system, but permit its use higher up if applications want it. If =
you're doing some FP-exploiting thing at the application level, =
definitely don't want to forbid its use of hardware FP!

Agreed.  A quick glance at GCC implies that it doesn't like doing =
soft-float on x86 very much either, so starting there at the runtime =
level and working our way up makes sense.

I'm deferring this one until we start upstreaming the kFreeBSD backend =
as it looks like we'll need a robust cross-compilation toolchain for =
both GCC and OCaml.

-anil=


From pgj@caesar.elte.hu Tue Dec 11 13:06:43 2012
Received: from ppsw-43.csi.cam.ac.uk ([131.111.8.143])
	by lists-2.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25)
	with esmtp id 1TiPXm-0000cN-VI (Exim 4.70) for
	cl-mirage@lists.cam.ac.uk
	(return-path <pgj@caesar.elte.hu>); Tue, 11 Dec 2012 13:06:42 +0000
X-Cam-AntiVirus: no malware found
X-Cam-SpamDetails: score -0.7 from SpamAssassin-3.3.2-1418219 
	* -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/,
	low *      trust
	*      [157.181.1.138 listed in list.dnswl.dnsbl.ja.net]
	* -0.0 RP_MATCHES_RCVD Envelope sender domain matches handover relay
	*      domain
X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/
Received: from mx3.mail.elte.hu ([157.181.1.138]:44082)
	by ppsw-43.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.149]:25)
	with esmtp id 1TiPXl-0003n4-nt (Exim 4.72)
	(return-path <pgj@caesar.elte.hu>); Tue, 11 Dec 2012 13:06:42 +0000
Received: from login01.caesar.elte.hu ([157.181.151.130])
	by mx3.mail.elte.hu with esmtp (Exim) id 1TiPXd-0005bW-I7
	from <pgj@caesar.elte.hu>; Tue, 11 Dec 2012 14:06:40 +0100
Received: (Authenticated sender: pgj)
	by login01.caesar.elte.hu with local (Exim 4.72)
	(envelope-from <pgj@caesar.elte.hu>)
	id 1TiPXc-0003do-Gp; Tue, 11 Dec 2012 14:06:32 +0100
Date: Tue, 11 Dec 2012 14:06:32 +0100
From: PALI Gabor Janos <pgj@elte.hu>
To: Anil Madhavapeddy <anil@recoil.org>
Subject: Re: synching with minios
Message-ID: <20121211130632.GA13372@caesar.elte.hu>
References: <4304D3F4-B645-4A14-A913-878DFC73E9F9@recoil.org>
	<5ADC76E8-33D5-4DE2-A51F-03F984DF8EC8@cl.cam.ac.uk>
	<469BDF7A-7291-4589-9FCE-0D4602C3D897@recoil.org>
	<357752B8-FCCE-4BD3-A79C-36308C1EDD71@cl.cam.ac.uk>
	<AB98175C-1768-406A-8DAB-4CF97B3BB866@recoil.org>
	<CANeYhgHHzCWCEW3FeXEeFsrpiXLA=9U-jk0-iDwtVxnhVSxQ_w@mail.gmail.com>
	<870095F1-7301-400A-8085-F02D699BD3FF@cl.cam.ac.uk>
	<C451DE4B-1610-4725-90E3-A4E6B25A83CB@recoil.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <C451DE4B-1610-4725-90E3-A4E6B25A83CB@recoil.org>
User-Agent: Mutt/1.5.20 (2009-06-14)
Sender: Pali Gabor Janos <pgj@login01.caesar.elte.hu>
X-ELTE-SpamScore: -2.0
X-ELTE-SpamLevel: 
X-ELTE-SpamCheck: no
X-ELTE-SpamVersion: ELTE 2.0 
X-ELTE-SpamCheck-Details: score=-2.0 required=5.9 tests=AWL,
	BAYES_00 autolearn=no SpamAssassin version=3.3.1
	-2.0 BAYES_00               BODY: Bayes spam probability is 0 to 1%
	[score: 0.0000]
	0.0 AWL AWL: From: address is in the auto white-list
Cc: Balraj Singh <balraj.singh@cl.cam.ac.uk>,
	Steven Smith <steven.smith@cl.cam.ac.uk>,
	"Robert N. M. Watson" <robert.watson@cl.cam.ac.uk>,
	"cl-mirage@lists.cam.ac.uk List" <cl-mirage@lists.cam.ac.uk>
X-BeenThere: cl-mirage@lists.cam.ac.uk
X-Mailman-Version: 2.1.8
Precedence: list
List-Id: MirageOS development <cl-mirage.lists.cam.ac.uk>
List-Unsubscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=unsubscribe>
List-Archive: <https://lists.cam.ac.uk/pipermail/cl-mirage>
List-Post: <mailto:cl-mirage@lists.cam.ac.uk>
List-Help: <mailto:cl-mirage-request@lists.cam.ac.uk?subject=help>
List-Subscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=subscribe>
X-List-Received-Date: Tue, 11 Dec 2012 13:06:43 -0000
Content-Length: 445
Lines: 7

On Tue, Dec 11, 2012 at 12:58:07PM +0000, Anil Madhavapeddy wrote:
> I'm deferring this one until we start upstreaming the kFreeBSD backend as it looks like we'll need a robust cross-compilation toolchain for both GCC and OCaml.

By the way, FreeBSD is aiming to use Clang/LLVM as system compiler in the
future.  Should not we rely on clang instead?  (I have not tried to compile
my code with clang, but we should definitely think about this.)


From anil@recoil.org Tue Dec 11 13:10:38 2012
Received: from ppsw-51.csi.cam.ac.uk ([131.111.8.151])
	by lists-2.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25)
	with esmtp id 1TiPba-0000iC-N9 (Exim 4.70) for
	cl-mirage@lists.cam.ac.uk
	(return-path <anil@recoil.org>); Tue, 11 Dec 2012 13:10:38 +0000
X-Cam-AntiVirus: no malware found
X-Cam-SpamDetails: score 0.0 from SpamAssassin-3.3.2-1418219
X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/
Received: from recoil.dh.bytemark.co.uk ([89.16.177.154]:2893
	helo=dark.recoil.org)
	by ppsw-51.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.148]:25)
	with smtp id 1TiPba-0003wh-Wy (Exim 4.72) for cl-mirage@lists.cam.ac.uk
	(return-path <anil@recoil.org>); Tue, 11 Dec 2012 13:10:38 +0000
Received: (qmail 22047 invoked by uid 634); 11 Dec 2012 13:10:38 -0000
X-Spam-Level: *
X-Spam-Status: No, hits=-1.0 required=5.0
	tests=ALL_TRUSTED
X-Spam-Check-By: dark.recoil.org
Received: from volstagg-0.srg.cl.cam.ac.uk (HELO [10.0.0.83]) (128.232.32.232)
	(smtp-auth username remote@recoil.org, mechanism cram-md5)
	by dark.recoil.org (qpsmtpd/0.84) with ESMTPA;
	Tue, 11 Dec 2012 13:10:37 +0000
Content-Type: text/plain; charset=us-ascii
Mime-Version: 1.0 (Mac OS X Mail 6.1 \(1498\))
Subject: Re: synching with minios
From: Anil Madhavapeddy <anil@recoil.org>
In-Reply-To: <20121211130632.GA13372@caesar.elte.hu>
Date: Tue, 11 Dec 2012 13:10:35 +0000
Content-Transfer-Encoding: quoted-printable
Message-Id: <C4B63DE2-CEE9-4631-A161-832A6C81A220@recoil.org>
References: <4304D3F4-B645-4A14-A913-878DFC73E9F9@recoil.org>
	<5ADC76E8-33D5-4DE2-A51F-03F984DF8EC8@cl.cam.ac.uk>
	<469BDF7A-7291-4589-9FCE-0D4602C3D897@recoil.org>
	<357752B8-FCCE-4BD3-A79C-36308C1EDD71@cl.cam.ac.uk>
	<AB98175C-1768-406A-8DAB-4CF97B3BB866@recoil.org>
	<CANeYhgHHzCWCEW3FeXEeFsrpiXLA=9U-jk0-iDwtVxnhVSxQ_w@mail.gmail.com>
	<870095F1-7301-400A-8085-F02D699BD3FF@cl.cam.ac.uk>
	<C451DE4B-1610-4725-90E3-A4E6B25A83CB@recoil.org>
	<20121211130632.GA13372@caesar.elte.hu>
To: PALI Gabor Janos <pgj@elte.hu>
X-Mailer: Apple Mail (2.1498)
X-Virus-Checked: Checked by ClamAV on dark.recoil.org
Cc: Balraj Singh <balraj.singh@cl.cam.ac.uk>,
	Steven Smith <steven.smith@cl.cam.ac.uk>,
	"Robert N. M. Watson" <robert.watson@cl.cam.ac.uk>,
	"cl-mirage@lists.cam.ac.uk List" <cl-mirage@lists.cam.ac.uk>
X-BeenThere: cl-mirage@lists.cam.ac.uk
X-Mailman-Version: 2.1.8
Precedence: list
List-Id: MirageOS development <cl-mirage.lists.cam.ac.uk>
List-Unsubscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=unsubscribe>
List-Archive: <https://lists.cam.ac.uk/pipermail/cl-mirage>
List-Post: <mailto:cl-mirage@lists.cam.ac.uk>
List-Help: <mailto:cl-mirage-request@lists.cam.ac.uk?subject=help>
List-Subscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=subscribe>
X-List-Received-Date: Tue, 11 Dec 2012 13:10:38 -0000
Content-Length: 1091
Lines: 26

On 11 Dec 2012, at 13:06, PALI Gabor Janos <pgj@elte.hu> wrote:

> On Tue, Dec 11, 2012 at 12:58:07PM +0000, Anil Madhavapeddy wrote:
>> I'm deferring this one until we start upstreaming the kFreeBSD =
backend as it looks like we'll need a robust cross-compilation toolchain =
for both GCC and OCaml.
>=20
> By the way, FreeBSD is aiming to use Clang/LLVM as system compiler in =
the
> future.  Should not we rely on clang instead?  (I have not tried to =
compile
> my code with clang, but we should definitely think about this.)

I've had MiniOS compiling with Clang/LTO before (but the result failed =
to boot!).  I definitely want to maintain compatibility with both GCC =
and LLVM for the moment, and there shouldn't be any particular reason =
why both shouldn't work.

It'll get much more interesting when we can get LTO working across C =
*and* OCaml object files, as then the entire operating system image can =
be cross-module optimised (including to the MiniOS "syscalls").  That'll =
be an interesting benchmark to run with some of our more elaborate =
macrobenchmarks...

-anil=


From anil@recoil.org Tue Dec 11 13:39:14 2012
Received: from ppsw-51.csi.cam.ac.uk ([131.111.8.151])
	by lists-2.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25)
	with esmtp id 1TiQ3G-0001Gc-MX (Exim 4.70) for
	cl-mirage@lists.cam.ac.uk
	(return-path <anil@recoil.org>); Tue, 11 Dec 2012 13:39:14 +0000
X-Cam-AntiVirus: no malware found
X-Cam-SpamDetails: score 0.0 from SpamAssassin-3.3.2-1418219
X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/
Received: from recoil.dh.bytemark.co.uk ([89.16.177.154]:35526
	helo=dark.recoil.org)
	by ppsw-51.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.148]:25)
	with smtp id 1TiQ3F-0005ud-Xx (Exim 4.72) for cl-mirage@lists.cam.ac.uk
	(return-path <anil@recoil.org>); Tue, 11 Dec 2012 13:39:14 +0000
Received: (qmail 6465 invoked by uid 634); 11 Dec 2012 13:39:13 -0000
X-Spam-Level: *
X-Spam-Status: No, hits=-1.0 required=5.0
	tests=ALL_TRUSTED
X-Spam-Check-By: dark.recoil.org
Received: from volstagg-0.srg.cl.cam.ac.uk (HELO [10.0.0.83]) (128.232.32.232)
	(smtp-auth username remote@recoil.org, mechanism cram-md5)
	by dark.recoil.org (qpsmtpd/0.84) with ESMTPA;
	Tue, 11 Dec 2012 13:39:12 +0000
From: Anil Madhavapeddy <anil@recoil.org>
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable
Subject: Pack considered harmful (was: Fwd: Cross-module inlining fails)
Date: Tue, 11 Dec 2012 13:39:10 +0000
References: <CAP_800rU0d4b0FuGewHf5kMep_G8Bj09Q_F+YkLHe9ZnJ-cJqg@mail.gmail.com>
To: "cl-mirage@lists.cam.ac.uk List" <cl-mirage@lists.cam.ac.uk>
Message-Id: <660EC312-C494-4C10-B466-4D0A2CEC00B7@recoil.org>
Mime-Version: 1.0 (Mac OS X Mail 6.1 \(1498\))
X-Mailer: Apple Mail (2.1498)
X-Virus-Checked: Checked by ClamAV on dark.recoil.org
X-BeenThere: cl-mirage@lists.cam.ac.uk
X-Mailman-Version: 2.1.8
Precedence: list
List-Id: MirageOS development <cl-mirage.lists.cam.ac.uk>
List-Unsubscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=unsubscribe>
List-Archive: <https://lists.cam.ac.uk/pipermail/cl-mirage>
List-Post: <mailto:cl-mirage@lists.cam.ac.uk>
List-Help: <mailto:cl-mirage-request@lists.cam.ac.uk?subject=help>
List-Subscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=subscribe>
X-List-Received-Date: Tue, 11 Dec 2012 13:39:14 -0000
Content-Length: 2754
Lines: 84

You'll be amused to hear that one of the reasons for the performance
drop after moving to OPAM is because of a small bug in OASIS.

When you use packed modules, the .cmx file of the packed result is=20
not installed.  This has the knock on effect of disabling cross-module
inlining, and leading to several core Mirage libraries (such as the
OS and Net modules) not being inlined.

The fix is pretty easy (install the cmx!), so I'll make the appropriate
modifications shortly.  Life was so much easier in the monolithic
tree :-)

-anil

Begin forwarded message:

> From: Markus Mottl <markus.mottl@gmail.com>
> Subject: Re: Cross-module inlining fails
> Date: 19 November 2012 18:16:55 GMT
> To: ocaml-core@googlegroups.com
> Cc: oasis-devel@lists.forge.ocamlcore.org
> Reply-To: ocaml-core@googlegroups.com
>=20
> On Mon, Nov 19, 2012 at 1:00 PM, Sylvain Le Gall <sylvain@le-gall.net> =
wrote:
>> Well, .cmx file should be installed EXCEPT if you are using packed
>> modules...
>=20
> The .cmx files of _submodules_ should not be installed for packed
> libraries, this is correct, but the (single) .cmx file resulting from
> packing should be installed for packed libraries.
>=20
>> The culprit is:
>> (not lib.lib_pack) && (* Do not install .cmx packed submodules *)
>> in src/oasis/OASISLibrary.ml
>=20
> This is the location of the likely bug.  My modification to setup.ml
> below is completely untested and may not even compile, but the idea is
> probably right:
>=20
>    (* The .cmx that be compiled along *)
>    let cmxs =3D
>      let should_be_built =3D
>          match bs.bs_compiled_object with
>          | Native -> true
>          | Best -> is_native
>          | Byte -> false
>      in
>        if should_be_built then
>          if lib.lib_pack then [ cs.cs_name ^ ".cmx" ]
>          else
>            find_modules
>              (lib.lib_modules @ lib.lib_internal_modules)
>              "cmx"
>        else
>          []
>    in
>=20
>> You can experiment installing .cmx by commenting this line. But I am =
really
>> not sure this will help that much. I thought that .cmxs was a pack of =
.cmx
>> so that inlining can work using what is inside this archive (contrary =
to
>> .cmxa).
>>=20
>> Maybe the inlining using .cmxs doesn't work as excepted ?
>=20
> .cmxs files are used for dynamic linking and are hence the "dynamic
> brother" of .cmxa files.  Cross-module inlining, however, is done
> during compilation, not linking.  It can only be done if the ".cmx"
> files of modules referenced from the currently compiled file are
> visible.  .cmxa and .cmxs files are completely ignored during
> compilation.
>=20
> Regards,
> Markus
>=20
> --=20
> Markus Mottl        http://www.ocaml.info        =
markus.mottl@gmail.com
>=20



From anil@recoil.org Tue Dec 11 17:00:25 2012
Received: from ppsw-43.csi.cam.ac.uk ([131.111.8.143])
	by lists-2.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25)
	with esmtp id 1TiTBx-0007gy-H8 (Exim 4.70) for
	cl-mirage@lists.cam.ac.uk
	(return-path <anil@recoil.org>); Tue, 11 Dec 2012 17:00:25 +0000
X-Cam-AntiVirus: no malware found
X-Cam-SpamDetails: score 0.0 from SpamAssassin-3.3.2-1418219
X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/
Received: from recoil.dh.bytemark.co.uk ([89.16.177.154]:23838
	helo=dark.recoil.org)
	by ppsw-43.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.149]:25)
	with smtp id 1TiTBw-0006lf-nq (Exim 4.72) for cl-mirage@lists.cam.ac.uk
	(return-path <anil@recoil.org>); Tue, 11 Dec 2012 17:00:25 +0000
Received: (qmail 15998 invoked by uid 634); 11 Dec 2012 17:00:24 -0000
X-Spam-Level: *
X-Spam-Status: No, hits=-1.0 required=5.0
	tests=ALL_TRUSTED
X-Spam-Check-By: dark.recoil.org
Received: from volstagg-0.srg.cl.cam.ac.uk (HELO [10.0.0.83]) (128.232.32.232)
	(smtp-auth username remote@recoil.org, mechanism cram-md5)
	by dark.recoil.org (qpsmtpd/0.84) with ESMTPA;
	Tue, 11 Dec 2012 17:00:23 +0000
From: Anil Madhavapeddy <anil@recoil.org>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: quoted-printable
Subject: Tuesday releasefest and ocaml-4 runtime integrated
Message-Id: <66E4ADFA-3C39-42A4-8F25-1ADD2D93D182@recoil.org>
Date: Tue, 11 Dec 2012 17:00:22 +0000
To: "cl-mirage@lists.cam.ac.uk List" <cl-mirage@lists.cam.ac.uk>
Mime-Version: 1.0 (Mac OS X Mail 6.1 \(1498\))
X-Mailer: Apple Mail (2.1498)
X-Virus-Checked: Checked by ClamAV on dark.recoil.org
X-BeenThere: cl-mirage@lists.cam.ac.uk
X-Mailman-Version: 2.1.8
Precedence: list
List-Id: MirageOS development <cl-mirage.lists.cam.ac.uk>
List-Unsubscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=unsubscribe>
List-Archive: <https://lists.cam.ac.uk/pipermail/cl-mirage>
List-Post: <mailto:cl-mirage@lists.cam.ac.uk>
List-Help: <mailto:cl-mirage-request@lists.cam.ac.uk?subject=help>
List-Subscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=subscribe>
X-List-Received-Date: Tue, 11 Dec 2012 17:00:25 -0000
Content-Length: 3444
Lines: 89

All, I've done a slew of releases and uploaded them to OPAM.  Thanks to =
Haris, Dave, Thomas and Pierre for many of the changes here!

This brings Mirage up to ocaml-4.00.1, and puts us in a position to =
integrate some nice upcoming performance improvements.  Note that you =
*need to update your OPAM switch* to the new ones below, or bad things =
will happen to your poor unikernels.

Please find details below. The eagle eyed will note a couple of double =
releases. This is because I wanted to cleanly separate the OCaml3 and =
OCaml4 changes, so we have a final released version of mirage-net and =
mirage-platform in the OCaml3 series.

TL;DR:
$ opam update
$ opam switch 4.00.1+mirage-xen
$ eval `opam config -env`
$ opam install mirage-net cohttp cow mirage-fs
$ <rebuild mirage-www and gape in awe>

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
[NEW] xenbigarray-1.0.0: http://github.com/mirage/xenbigarray

* This is a portable version of the standard Bigarray module, and =
removes the mmap functionality from the signature. It is for internal =
use by OPAM to prepare the Xen build environment for Mirage.

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
[NEW] compiler switch: 4.00.1+mirage-xen and 4.00.1+mirage-unix

* These are the OCaml 4 versions of the compiler environments, with the =
latest runtime merge. You should rebuild your environment to use these =
from now on, and consider the 3.12.1 versions deprecated.  There are =
some very exciting upcoming performance improvements that Thomas and =
Pierre and Fabrice have been working on that require the latest =
compiler. (more on this shortly)

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
[UPDATE] cstruct-0.5.2: https://github.com/mirage/ocaml-cstruct

* Remove the separate `xen` and `unix` subdirectories, as the
  portable `Bigarray` is now provided by the `xenbigarray` package.

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
[UPDATE] mirage-platform-0.5.0 and mirage-platform-0.6.0: =
https://github.com/mirage/mirage-platform

0.6.0 (11-Dec-2012)

* [xen] refresh to ocaml-4.00.1 runtime.  You *must* use the
  correct OPAM switch to match versions, or bad things will
  happen when the resulting binary is run.

0.5.0 (10-Dec-2012)

* [xen] Fix spurious floating point exceptions on some machines.
* [ns3] Add NS3-based simulator backend.
* [unix] Add pcap-based Ethernet access in addition to tuntap.

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
[UPDATE] mirage-net-0.3.1 and mirage-net-0.4.0: =
https://github.com/mirage/mirage-net

0.4.0 (11-Dec-2012)

* Require OCaml-4.00.0 or higher, and add relevant build fixes
  to deal with module packing.

=3D=3D=3D=3D=3D 0.3.1 (10-Dec-2012) =3D=3D=3D=3D=3D

* Fix the DHCP client marshalling for IPv4 addresses.

* Expose the interface MAC address in the Manager signature.

* Tweak TCP ISN calculation to be more friendly on a 32-bit host.

* Add Manager.create ?devs to control the number of Netif devices
  constructed by default.

* Add Ethif.set/disable_promiscuous to permit directly tapping
  a network interface.




From anil@recoil.org Tue Dec 11 18:43:44 2012
Received: from ppsw-43.csi.cam.ac.uk ([131.111.8.143])
	by lists-2.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25)
	with esmtp id 1TiUnw-0001UF-8r (Exim 4.70) for
	cl-mirage@lists.cam.ac.uk
	(return-path <anil@recoil.org>); Tue, 11 Dec 2012 18:43:44 +0000
X-Cam-AntiVirus: no malware found
X-Cam-SpamDetails: score 0.0 from SpamAssassin-3.3.2-1418219
X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/
Received: from recoil.dh.bytemark.co.uk ([89.16.177.154]:31529
	helo=dark.recoil.org)
	by ppsw-43.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.149]:25)
	with smtp id 1TiUnv-0008Df-oW (Exim 4.72) for cl-mirage@lists.cam.ac.uk
	(return-path <anil@recoil.org>); Tue, 11 Dec 2012 18:43:44 +0000
Received: (qmail 17623 invoked by uid 634); 11 Dec 2012 18:43:43 -0000
X-Spam-Level: *
X-Spam-Status: No, hits=-1.0 required=5.0
	tests=ALL_TRUSTED
X-Spam-Check-By: dark.recoil.org
Received: from cpc7-cmbg14-2-0-cust238.5-4.cable.virginmedia.com (HELO
	[192.168.1.84]) (86.30.244.239)
	(smtp-auth username remote@recoil.org, mechanism cram-md5)
	by dark.recoil.org (qpsmtpd/0.84) with ESMTPA;
	Tue, 11 Dec 2012 18:43:42 +0000
Content-Type: text/plain; charset=us-ascii
Mime-Version: 1.0 (Mac OS X Mail 6.1 \(1498\))
Subject: Re: mirage xen shared memory rings
From: Anil Madhavapeddy <anil@recoil.org>
In-Reply-To: <81A73678E76EA642801C8F2E4823AD21012F0D72EBAC@LONPMAILBOX01.citrite.net>
Date: Tue, 11 Dec 2012 18:43:40 +0000
Content-Transfer-Encoding: quoted-printable
Message-Id: <B4607255-5ECA-4393-AC7D-EDCCF8F9D283@recoil.org>
References: <81A73678E76EA642801C8F2E4823AD21012F0D72EBAC@LONPMAILBOX01.citrite.net>
To: Dave Scott <Dave.Scott@eu.citrix.com>
X-Mailer: Apple Mail (2.1498)
X-Virus-Checked: Checked by ClamAV on dark.recoil.org
Cc: "cl-mirage@lists.cam.ac.uk" <cl-mirage@lists.cam.ac.uk>
X-BeenThere: cl-mirage@lists.cam.ac.uk
X-Mailman-Version: 2.1.8
Precedence: list
List-Id: MirageOS development <cl-mirage.lists.cam.ac.uk>
List-Unsubscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=unsubscribe>
List-Archive: <https://lists.cam.ac.uk/pipermail/cl-mirage>
List-Post: <mailto:cl-mirage@lists.cam.ac.uk>
List-Help: <mailto:cl-mirage-request@lists.cam.ac.uk?subject=help>
List-Subscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=subscribe>
X-List-Received-Date: Tue, 11 Dec 2012 18:43:44 -0000
Content-Length: 2431
Lines: 61

This sounds great (particularly the "hack from userspace using gntdev" =
bit).  My latest changes should help this effort, as Bigarray/cstruct =
will be available for your use.

Is there a particular kernel version we should use for the userspace =
gntdev stuff? I fixed a few things that ended up in 3.5 I think, but I'm =
not sure what else has been fixed up since.

Note also that Steven Smith is experimenting with a variable-length =
multi-page netback at the moment, in order to just write packets inline =
and skip grant mappings entirely.  This should be quite easy to =
integrate with your code, along with an implementation of vchan.

-anil

On 10 Dec 2012, at 17:44, Dave Scott <Dave.Scott@eu.citrix.com> wrote:

> Hi,
>=20
> I've recently been hacking on the mirage xen shared memory ring code. =
This code is the foundation for the virtual devices, in particular
> * disks
> * network interfaces
> * console (critical for debugging)
> * xenstore (critical for attaching other devices)
>=20
> I've created a standalone library here:
>=20
> https://github.com/djs55/shared-memory-ring
>=20
> I've added a set of simple unit tests and fixed a bug where console =
output was being silently dropped (!) I think this explains the loss of =
debug messages that Balraj and I saw while investigating the TCP =
problem. The console and xenstore rings are now also lots faster since =
they use Bigarray.blit rather than a hand-coded =
copy-one-byte-at-a-time-while-loop.
>=20
> My next steps are:
> 1. to make this library a dependency of the mirage-platform (rather =
than having the code inline)
> 2. to extract the xen disk and network interface support from =
mirage-platform and make these into separate libraries too
> 3. to define a shared-memory transport for logging / stats collecting
>=20
> (2) should be interesting because the same xen disk and network =
interface support code should "just work" from userspace as well as =
kernelspace, if we add ocaml bindings for the xen "gntdev" library which =
allows userspace access to memory pages "granted" by a VM. It should be =
possible to:
>=20
> a. "opam install gntdev blkback vhd" to install the relevant libraries =
and then
> b. instantiate the blkback functor with the gntdev interface and the =
vhd-writing code to make a fully-functional xen virtual disk device from =
a toplevel... how cool would that be?! (Maybe it's just me...)
>=20
> Cheers,
> Dave
>=20



From anil@recoil.org Wed Dec 12 10:29:14 2012
Received: from ppsw-51.csi.cam.ac.uk ([131.111.8.151])
	by lists-2.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25)
	with esmtp id 1TijYw-0000eU-Uh (Exim 4.70) for
	cl-mirage@lists.cam.ac.uk
	(return-path <anil@recoil.org>); Wed, 12 Dec 2012 10:29:14 +0000
X-Cam-AntiVirus: no malware found
X-Cam-SpamDetails: score 0.0 from SpamAssassin-3.3.2-1418219
X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/
Received: from recoil.dh.bytemark.co.uk ([89.16.177.154]:17112
	helo=dark.recoil.org)
	by ppsw-51.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.148]:25)
	with smtp id 1TijYw-0003TL-X3 (Exim 4.72) for cl-mirage@lists.cam.ac.uk
	(return-path <anil@recoil.org>); Wed, 12 Dec 2012 10:29:14 +0000
Received: (qmail 13645 invoked by uid 634); 12 Dec 2012 10:29:13 -0000
X-Spam-Level: *
X-Spam-Status: No, hits=-1.0 required=5.0
	tests=ALL_TRUSTED
X-Spam-Check-By: dark.recoil.org
Received: from cpc7-cmbg14-2-0-cust238.5-4.cable.virginmedia.com (HELO
	[192.168.1.84]) (86.30.244.239)
	(smtp-auth username remote@recoil.org, mechanism cram-md5)
	by dark.recoil.org (qpsmtpd/0.84) with ESMTPA;
	Wed, 12 Dec 2012 10:29:13 +0000
Content-Type: text/plain; charset=us-ascii
Mime-Version: 1.0 (Mac OS X Mail 6.1 \(1498\))
Subject: Re: mirage + ocaml4
From: Anil Madhavapeddy <anil@recoil.org>
In-Reply-To: <075E2FB9-63B0-4337-8081-6E86CB4352A0@ocamlpro.com>
Date: Wed, 12 Dec 2012 10:29:10 +0000
Content-Transfer-Encoding: quoted-printable
Message-Id: <9BD17735-5E51-4676-91D4-4C7322457D7F@recoil.org>
References: <075E2FB9-63B0-4337-8081-6E86CB4352A0@ocamlpro.com>
To: Thomas Gazagnaire <thomas@ocamlpro.com>
X-Mailer: Apple Mail (2.1498)
X-Virus-Checked: Checked by ClamAV on dark.recoil.org
Cc: Pierre Chambart <pierre.chambart@ocamlpro.com>,
	"cl-mirage@lists.cam.ac.uk List" <cl-mirage@lists.cam.ac.uk>
X-BeenThere: cl-mirage@lists.cam.ac.uk
X-Mailman-Version: 2.1.8
Precedence: list
List-Id: MirageOS development <cl-mirage.lists.cam.ac.uk>
List-Unsubscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=unsubscribe>
List-Archive: <https://lists.cam.ac.uk/pipermail/cl-mirage>
List-Post: <mailto:cl-mirage@lists.cam.ac.uk>
List-Help: <mailto:cl-mirage-request@lists.cam.ac.uk?subject=help>
List-Subscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=subscribe>
X-List-Received-Date: Wed, 12 Dec 2012 10:29:15 -0000
Content-Length: 1199
Lines: 28

[+cl-mirage as I've had several enquiries sent to me privately]

On 12 Dec 2012, at 08:50, Thomas Gazagnaire <thomas@ocamlpro.com> wrote:

> Anil, I've just realized that you don't have the full collection of =
Pierre's patches in the current mirage are you have rebased mirage =
against ocaml 4.00.1 (and not 4.01). Pierre has started backporting his =
patches to 4.00.1 (see =
https://github.com/chambart/ocaml/tree/4.00%2Bio_prims). What's the =
status of that Pierre, is this complete ?

That's correct: I'm doing the upgrade in stages, and tagging them along =
the way so we can measure each individual change's performance impact. =
The stages are:

- Upgrade compiler switch to OCaml 4.00.1 runtime (done)
- Move to new cstruct/ocplib-endian API (ongoing)
- Upgrade compiler switch to OCaml 4.01.0+dev snapshot, which should =
activate the new marshalling builtins (not started)
- Install the .cmx files for all packages (not started)

The last three should result in a speedup, and the first one should not =
crash :-) Balraj has tested the 4.00.1 runtime against the TCP =
benchmarks, and that is not affected.  I'm hoping to commit the new =
cstruct bits today, if all goes well.

-anil=


From anil@recoil.org Wed Dec 12 11:34:08 2012
Received: from ppsw-51.csi.cam.ac.uk ([131.111.8.151])
	by lists-2.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25)
	with esmtp id 1TikZk-0003Jy-Bo (Exim 4.70) for
	cl-mirage@lists.cam.ac.uk
	(return-path <anil@recoil.org>); Wed, 12 Dec 2012 11:34:08 +0000
X-Cam-AntiVirus: no malware found
X-Cam-SpamDetails: score 0.0 from SpamAssassin-3.3.2-1418219
X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/
Received: from recoil.dh.bytemark.co.uk ([89.16.177.154]:12813
	helo=dark.recoil.org)
	by ppsw-51.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.148]:25)
	with smtp id 1TikZj-0007II-Yg (Exim 4.72) for cl-mirage@lists.cam.ac.uk
	(return-path <anil@recoil.org>); Wed, 12 Dec 2012 11:34:08 +0000
Received: (qmail 1160 invoked by uid 634); 12 Dec 2012 11:34:07 -0000
X-Spam-Level: *
X-Spam-Status: No, hits=-1.0 required=5.0
	tests=ALL_TRUSTED
X-Spam-Check-By: dark.recoil.org
Received: from cpc7-cmbg14-2-0-cust238.5-4.cable.virginmedia.com (HELO
	[192.168.1.84]) (86.30.244.239)
	(smtp-auth username remote@recoil.org, mechanism cram-md5)
	by dark.recoil.org (qpsmtpd/0.84) with ESMTPA;
	Wed, 12 Dec 2012 11:34:06 +0000
Content-Type: text/plain; charset=us-ascii
Mime-Version: 1.0 (Mac OS X Mail 6.1 \(1498\))
Subject: Re: mirage + ocaml4
From: Anil Madhavapeddy <anil@recoil.org>
In-Reply-To: <9BD17735-5E51-4676-91D4-4C7322457D7F@recoil.org>
Date: Wed, 12 Dec 2012 11:34:04 +0000
Content-Transfer-Encoding: quoted-printable
Message-Id: <4CC47928-8706-42A7-A70D-63C658024891@recoil.org>
References: <075E2FB9-63B0-4337-8081-6E86CB4352A0@ocamlpro.com>
	<9BD17735-5E51-4676-91D4-4C7322457D7F@recoil.org>
To: Thomas Gazagnaire <thomas@ocamlpro.com>
X-Mailer: Apple Mail (2.1498)
X-Virus-Checked: Checked by ClamAV on dark.recoil.org
Cc: Pierre Chambart <pierre.chambart@ocamlpro.com>,
	"cl-mirage@lists.cam.ac.uk List" <cl-mirage@lists.cam.ac.uk>
X-BeenThere: cl-mirage@lists.cam.ac.uk
X-Mailman-Version: 2.1.8
Precedence: list
List-Id: MirageOS development <cl-mirage.lists.cam.ac.uk>
List-Unsubscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=unsubscribe>
List-Archive: <https://lists.cam.ac.uk/pipermail/cl-mirage>
List-Post: <mailto:cl-mirage@lists.cam.ac.uk>
List-Help: <mailto:cl-mirage-request@lists.cam.ac.uk?subject=help>
List-Subscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=subscribe>
X-List-Received-Date: Wed, 12 Dec 2012 11:34:08 -0000
Content-Length: 710
Lines: 17

I've merged Thomas' cstruct branch and pushed to my working copy at =
http://github.com/avsm/ocaml-cstruct.
Encouragingly, porting ocaml-xenstore only took a 4 line diff so this =
should go pretty fast.

One performance crime that I noticed is the Cstruct.blit_string =
function, which does a byte-by-byte copy from a string to a Bigarray.  =
Pierre, do you have any thoughts on how to improve this?  A faster blit =
between them would be quite useful.

Also Mort, can you remind me why on earth there's a type 'ipv4' and =
'ipv6' in cstruct? This seems very out of place in this library, but was =
it there for some dependency reason or just because it's convenient =
(which is also a fine answer!).

-anil=


From Richard.Mortier@nottingham.ac.uk Wed Dec 12 11:39:46 2012
Received: from ppsw-51.csi.cam.ac.uk ([131.111.8.151])
	by lists-2.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25)
	with esmtp id 1TikfC-0003Xd-UQ (Exim 4.70) for
	cl-mirage@lists.cam.ac.uk
	(return-path <Richard.Mortier@nottingham.ac.uk>);
	Wed, 12 Dec 2012 11:39:46 +0000
X-Cam-AntiVirus: no malware found
X-Cam-SpamDetails: score 0.0 from SpamAssassin-3.3.2-1418219 
	* 0.0 MIME_QP_LONG_LINE RAW: Quoted-printable line longer than 76 chars
X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/
Received: from engine04-20433-4.icritical.com ([195.62.217.152]:51765)
	by ppsw-51.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.148]:25)
	with smtp id 1TikfA-0001HV-Yb (Exim 4.72) for cl-mirage@lists.cam.ac.uk
	(return-path <Richard.Mortier@nottingham.ac.uk>);
	Wed, 12 Dec 2012 11:39:46 +0000
Received: (qmail 6030 invoked from network); 12 Dec 2012 11:39:41 -0000
Received: from localhost (127.0.0.1)
	by engine04-20433-4.icritical.com with SMTP; 12 Dec 2012 11:39:41 -0000
Received: from engine04-20433-4.icritical.com ([127.0.0.1])
	by localhost (engine04-20433-4.icritical.com [127.0.0.1]) (amavisd-new,
	port 10024) with SMTP id 05798-03 for <cl-mirage@lists.cam.ac.uk>;
	Wed, 12 Dec 2012 11:39:41 +0000 (GMT)
Received: (qmail 5474 invoked by uid 599); 12 Dec 2012 11:39:28 -0000
Received: from unknown (HELO smtp4.nottingham.ac.uk) (128.243.220.65)
	by engine04-20433-4.icritical.com (qpsmtpd/0.28) with ESMTP;
	Wed, 12 Dec 2012 11:39:28 +0000
Received: from uiwexhub01.ad.nottingham.ac.uk ([128.243.15.133])
	by smtp4.nottingham.ac.uk with esmtps (TLSv1:AES128-SHA:128)
	(Exim 4.77) (envelope-from <Richard.Mortier@nottingham.ac.uk>)
	id 1Tikcl-0001Vq-Ss
	for cl-mirage@lists.cam.ac.uk; Wed, 12 Dec 2012 11:37:15 +0000
Received: from EXCHANGE1.ad.nottingham.ac.uk ([fe80::7962:f868:e6ee:6267]) by
	UIWEXHUB01.ad.nottingham.ac.uk ([2002:80f3:f85::80f3:f85]) with mapi;
	Wed, 12 Dec 2012 11:37:15 +0000
From: Richard Mortier <Richard.Mortier@nottingham.ac.uk>
To: Anil Madhavapeddy <anil@recoil.org>
Date: Wed, 12 Dec 2012 11:37:15 +0000
Subject: Re: mirage + ocaml4
Thread-Topic: mirage + ocaml4
Thread-Index: Ac3YXQjXYSRxoiOISqqBrXUoQ8uiOw==
Message-ID: <CF30C8DD-AE47-4AC5-AA40-91884BE2A49A@nottingham.ac.uk>
References: <075E2FB9-63B0-4337-8081-6E86CB4352A0@ocamlpro.com>
	<9BD17735-5E51-4676-91D4-4C7322457D7F@recoil.org>
	<4CC47928-8706-42A7-A70D-63C658024891@recoil.org>
In-Reply-To: <4CC47928-8706-42A7-A70D-63C658024891@recoil.org>
Accept-Language: en-US, en-GB
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
acceptlanguage: en-US, en-GB
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-Virus-Scanned: by iCritical at engine04-20433-4.icritical.com
Cc: Pierre Chambart <pierre.chambart@ocamlpro.com>,
	Thomas Gazagnaire <thomas@ocamlpro.com>,
	"cl-mirage@lists.cam.ac.uk List" <cl-mirage@lists.cam.ac.uk>
X-BeenThere: cl-mirage@lists.cam.ac.uk
X-Mailman-Version: 2.1.8
Precedence: list
List-Id: MirageOS development <cl-mirage.lists.cam.ac.uk>
List-Unsubscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=unsubscribe>
List-Archive: <https://lists.cam.ac.uk/pipermail/cl-mirage>
List-Post: <mailto:cl-mirage@lists.cam.ac.uk>
List-Help: <mailto:cl-mirage-request@lists.cam.ac.uk?subject=help>
List-Subscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=subscribe>
X-List-Received-Date: Wed, 12 Dec 2012 11:39:47 -0000
Content-Length: 2023
Lines: 44

convenience - i think the other place they were defined was ocaml-re which =
meant pulling in that lib just to get ipv[46] addresses, probably particula=
rly for ocaml-dns which was one of the earlier network libs to be pulled ou=
t of the monolithic tree.

(istr a discussion at the time about pulling the network stack apart more g=
enerally so that one might include rather more selectively things like addr=
ess types. but it was pushed down the stack so to speak :)

On 12 Dec 2012, at 11:34, Anil Madhavapeddy wrote:

> I've merged Thomas' cstruct branch and pushed to my working copy at http:=
//github.com/avsm/ocaml-cstruct.
> Encouragingly, porting ocaml-xenstore only took a 4 line diff so this sho=
uld go pretty fast.
>=20
> One performance crime that I noticed is the Cstruct.blit_string function,=
 which does a byte-by-byte copy from a string to a Bigarray.  Pierre, do yo=
u have any thoughts on how to improve this?  A faster blit between them wou=
ld be quite useful.
>=20
> Also Mort, can you remind me why on earth there's a type 'ipv4' and 'ipv6=
' in cstruct? This seems very out of place in this library, but was it ther=
e for some dependency reason or just because it's convenient (which is also=
 a fine answer!).
>=20
> -anil


--=20
Cheers,

R.




This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it.   Please do not use, copy or disclose the information contained in this message or in any attachment.  Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham.

This message has been checked for viruses but the contents of an attachment
may still contain software viruses which could damage your computer system:
you are advised to perform your own checks. Email communications with the
University of Nottingham may be monitored as permitted by UK legislation.


From anil@recoil.org Wed Dec 12 11:43:50 2012
Received: from ppsw-51.csi.cam.ac.uk ([131.111.8.151])
	by lists-2.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25)
	with esmtp id 1Tikj8-0003qd-Cd (Exim 4.70) for
	cl-mirage@lists.cam.ac.uk
	(return-path <anil@recoil.org>); Wed, 12 Dec 2012 11:43:50 +0000
X-Cam-AntiVirus: no malware found
X-Cam-SpamDetails: score 0.0 from SpamAssassin-3.3.2-1418219
X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/
Received: from recoil.dh.bytemark.co.uk ([89.16.177.154]:46547
	helo=dark.recoil.org)
	by ppsw-51.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.148]:25)
	with smtp id 1Tikj6-0003N7-ZB (Exim 4.72) for cl-mirage@lists.cam.ac.uk
	(return-path <anil@recoil.org>); Wed, 12 Dec 2012 11:43:50 +0000
Received: (qmail 15596 invoked by uid 634); 12 Dec 2012 11:43:48 -0000
X-Spam-Level: *
X-Spam-Status: No, hits=-1.0 required=5.0
	tests=ALL_TRUSTED
X-Spam-Check-By: dark.recoil.org
Received: from cpc7-cmbg14-2-0-cust238.5-4.cable.virginmedia.com (HELO
	[192.168.1.84]) (86.30.244.239)
	(smtp-auth username remote@recoil.org, mechanism cram-md5)
	by dark.recoil.org (qpsmtpd/0.84) with ESMTPA;
	Wed, 12 Dec 2012 11:43:47 +0000
Content-Type: text/plain; charset=us-ascii
Mime-Version: 1.0 (Mac OS X Mail 6.1 \(1498\))
Subject: Re: mirage + ocaml4
From: Anil Madhavapeddy <anil@recoil.org>
In-Reply-To: <CF30C8DD-AE47-4AC5-AA40-91884BE2A49A@nottingham.ac.uk>
Date: Wed, 12 Dec 2012 11:43:45 +0000
Content-Transfer-Encoding: quoted-printable
Message-Id: <0B7DA458-BD15-48D8-89BC-13A573642974@recoil.org>
References: <075E2FB9-63B0-4337-8081-6E86CB4352A0@ocamlpro.com>
	<9BD17735-5E51-4676-91D4-4C7322457D7F@recoil.org>
	<4CC47928-8706-42A7-A70D-63C658024891@recoil.org>
	<CF30C8DD-AE47-4AC5-AA40-91884BE2A49A@nottingham.ac.uk>
To: Richard Mortier <Richard.Mortier@nottingham.ac.uk>
X-Mailer: Apple Mail (2.1498)
X-Virus-Checked: Checked by ClamAV on dark.recoil.org
Cc: Pierre Chambart <pierre.chambart@ocamlpro.com>,
	"cl-mirage@lists.cam.ac.uk List" <cl-mirage@lists.cam.ac.uk>,
	Thomas Gazagnaire <thomas@ocamlpro.com>
X-BeenThere: cl-mirage@lists.cam.ac.uk
X-Mailman-Version: 2.1.8
Precedence: list
List-Id: MirageOS development <cl-mirage.lists.cam.ac.uk>
List-Unsubscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=unsubscribe>
List-Archive: <https://lists.cam.ac.uk/pipermail/cl-mirage>
List-Post: <mailto:cl-mirage@lists.cam.ac.uk>
List-Help: <mailto:cl-mirage-request@lists.cam.ac.uk?subject=help>
List-Subscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=subscribe>
X-List-Received-Date: Wed, 12 Dec 2012 11:43:50 -0000
Content-Length: 2626
Lines: 70

Ah yes. ocaml-dns needs a bit of attention anyway, as it now uses =
Cryptokit (thanks to Haris' DNSSEC work).  This pulls in a small set of =
C bindings that need to be made available under Mirage-platform.

I'll leave the ipv4 types in cstruct for the moment under the network =
stack port is done, and then we can tidy it up before release. It's just =
moving code around, so it won't take too long I think.

-a


On 12 Dec 2012, at 11:37, Richard Mortier =
<Richard.Mortier@nottingham.ac.uk> wrote:

> convenience - i think the other place they were defined was ocaml-re =
which meant pulling in that lib just to get ipv[46] addresses, probably =
particularly for ocaml-dns which was one of the earlier network libs to =
be pulled out of the monolithic tree.
>=20
> (istr a discussion at the time about pulling the network stack apart =
more generally so that one might include rather more selectively things =
like address types. but it was pushed down the stack so to speak :)
>=20
> On 12 Dec 2012, at 11:34, Anil Madhavapeddy wrote:
>=20
>> I've merged Thomas' cstruct branch and pushed to my working copy at =
http://github.com/avsm/ocaml-cstruct.
>> Encouragingly, porting ocaml-xenstore only took a 4 line diff so this =
should go pretty fast.
>>=20
>> One performance crime that I noticed is the Cstruct.blit_string =
function, which does a byte-by-byte copy from a string to a Bigarray.  =
Pierre, do you have any thoughts on how to improve this?  A faster blit =
between them would be quite useful.
>>=20
>> Also Mort, can you remind me why on earth there's a type 'ipv4' and =
'ipv6' in cstruct? This seems very out of place in this library, but was =
it there for some dependency reason or just because it's convenient =
(which is also a fine answer!).
>>=20
>> -anil
>=20
>=20
> --=20
> Cheers,
>=20
> R.
>=20
>=20
>=20
>=20
> This message and any attachment are intended solely for the addressee =
and may contain confidential information. If you have received this =
message in error, please send it back to me, and immediately delete it.  =
 Please do not use, copy or disclose the information contained in this =
message or in any attachment.  Any views or opinions expressed by the =
author of this email do not necessarily reflect the views of the =
University of Nottingham.
>=20
> This message has been checked for viruses but the contents of an =
attachment
> may still contain software viruses which could damage your computer =
system:
> you are advised to perform your own checks. Email communications with =
the
> University of Nottingham may be monitored as permitted by UK =
legislation.
>=20



From sdiris@gmail.com Wed Dec 12 12:27:37 2012
Received: from ppsw-51.csi.cam.ac.uk ([131.111.8.151])
	by lists-2.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25)
	with esmtp id 1TilPV-0005Uy-Fm (Exim 4.70) for
	cl-mirage@lists.cam.ac.uk
	(return-path <sdiris@gmail.com>); Wed, 12 Dec 2012 12:27:37 +0000
X-Cam-AntiVirus: no malware found
X-Cam-SpamDetails: score -0.8 from SpamAssassin-3.3.2-1418219 
	* -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/,
	low *      trust
	*      [74.125.82.41 listed in list.dnswl.dnsbl.ja.net]
	* 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail
	provider *       (sdiris[at]gmail.com)
	*  0.0 HTML_MESSAGE BODY: HTML included in message
	* -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from
	*      author's domain
	*  0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily
	*      valid
	* -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature
X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/
Received: from mail-wg0-f41.google.com ([74.125.82.41]:41386)
	by ppsw-51.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.148]:25)
	with esmtp id 1TilPU-00066g-YS (Exim 4.72) for
	cl-mirage@lists.cam.ac.uk
	(return-path <sdiris@gmail.com>); Wed, 12 Dec 2012 12:27:37 +0000
Received: by mail-wg0-f41.google.com with SMTP id ds1so1787822wgb.2
	for <cl-mirage@lists.cam.ac.uk>; Wed, 12 Dec 2012 04:27:36 -0800 (PST)
Received: by 10.180.108.38 with SMTP id hh6mr27091881wib.0.1355315256549;
	Wed, 12 Dec 2012 04:27:36 -0800 (PST)
Received: from yimingwin7 (c187.al.cl.cam.ac.uk. [128.232.110.187])
	by mx.google.com with ESMTPS id h19sm2977491wiv.7.2012.12.12.04.27.34
	(version=TLSv1/SSLv3 cipher=OTHER);
	Wed, 12 Dec 2012 04:27:35 -0800 (PST)
From: "Yiming Zhang" <sdiris@gmail.com>
To: "Anil Madhavapeddy" <anil@recoil.org>
Subject: MemStore in ocaml
Date: Wed, 12 Dec 2012 12:27:40 -0000
Message-ID: <000d01cdd864$14bfb650$3e3f22f0$@gmail.com>
MIME-Version: 1.0
Content-Type: multipart/alternative;
	boundary="----=_NextPart_000_000E_01CDD864.14C079A0"
X-Mailer: Microsoft Outlook 14.0
Thread-Index: Ac3YYeZldfkVG6vkSq+94g4e2fQJZQ==
Content-Language: zh-cn
Cc: cl-mirage@lists.cam.ac.uk
X-BeenThere: cl-mirage@lists.cam.ac.uk
X-Mailman-Version: 2.1.8
Precedence: list
List-Id: MirageOS development <cl-mirage.lists.cam.ac.uk>
List-Unsubscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=unsubscribe>
List-Archive: <https://lists.cam.ac.uk/pipermail/cl-mirage>
List-Post: <mailto:cl-mirage@lists.cam.ac.uk>
List-Help: <mailto:cl-mirage-request@lists.cam.ac.uk?subject=help>
List-Subscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=subscribe>
X-List-Received-Date: Wed, 12 Dec 2012 12:27:37 -0000
Content-Length: 4515
Lines: 134

This is a multipart message in MIME format.

------=_NextPart_000_000E_01CDD864.14C079A0
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: 7bit

Anil,

 

I have been working on a persistent KV storage compatible with MemCache. I
write a very preliminary MemStore in ocaml with lwt, which now can only
serve simple "set" requests (https://github.com/interwolf/MemStore). Stress
test shows its throughput is 10,000+ writes per second in a Linux virtual
machine.

 

So I think I have two parallel things to do next. 

 

The first is to complete MemStore with ocaml of course, which is very
straightforward. 

 

More important, the second is that I want to use MemStore to study the
inside of Mirage. Maybe I need to adapt it to Mirage, and do some research
on Xen. 

 

Can you give me some suggestions on that, Anil?

 

Regards,

Yiming


------=_NextPart_000_000E_01CDD864.14C079A0
Content-Type: text/html;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

<html xmlns:v=3D"urn:schemas-microsoft-com:vml" =
xmlns:o=3D"urn:schemas-microsoft-com:office:office" =
xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns:m=3D"http://schemas.microsoft.com/office/2004/12/omml" =
xmlns=3D"http://www.w3.org/TR/REC-html40"><head><meta =
http-equiv=3DContent-Type content=3D"text/html; =
charset=3Dus-ascii"><meta name=3DGenerator content=3D"Microsoft Word 14 =
(filtered medium)"><style><!--
/* Font Definitions */
@font-face
	{font-family:SimSun;
	panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
	{font-family:SimSun;
	panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
	{font-family:Calibri;
	panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
	{font-family:SimSun;
	panose-1:2 1 6 0 3 1 1 1 1 1;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0cm;
	margin-bottom:.0001pt;
	text-align:justify;
	text-justify:inter-ideograph;
	font-size:10.5pt;
	font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
	{mso-style-priority:99;
	color:blue;
	text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
	{mso-style-priority:99;
	color:purple;
	text-decoration:underline;}
span.EmailStyle17
	{mso-style-type:personal-compose;
	font-family:"Calibri","sans-serif";
	color:windowtext;}
.MsoChpDefault
	{mso-style-type:export-only;
	font-family:"Calibri","sans-serif";}
/* Page Definitions */
@page WordSection1
	{size:612.0pt 792.0pt;
	margin:72.0pt 90.0pt 72.0pt 90.0pt;}
div.WordSection1
	{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext=3D"edit" spidmax=3D"1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext=3D"edit">
<o:idmap v:ext=3D"edit" data=3D"1" />
</o:shapelayout></xml><![endif]--></head><body lang=3DZH-CN link=3Dblue =
vlink=3Dpurple style=3D'text-justify-trim:punctuation'><div =
class=3DWordSection1><p class=3DMsoNormal><span =
lang=3DEN-US>Anil,<o:p></o:p></span></p><p class=3DMsoNormal><span =
lang=3DEN-US><o:p>&nbsp;</o:p></span></p><p class=3DMsoNormal><span =
lang=3DEN-US>I have been working on a persistent KV storage compatible =
with MemCache. I write a very preliminary MemStore in ocaml with lwt, =
which now can only serve simple &#8220;set&#8221; requests =
(https://github.com/interwolf/MemStore). Stress test shows its =
throughput is 10,000+ writes per second in a Linux virtual =
machine.<o:p></o:p></span></p><p class=3DMsoNormal><span =
lang=3DEN-US><o:p>&nbsp;</o:p></span></p><p class=3DMsoNormal><span =
lang=3DEN-US>So I think I have two parallel things to do next. =
<o:p></o:p></span></p><p class=3DMsoNormal><span =
lang=3DEN-US><o:p>&nbsp;</o:p></span></p><p class=3DMsoNormal><span =
lang=3DEN-US>The first is to complete MemStore with ocaml of course, =
which is very straightforward. <o:p></o:p></span></p><p =
class=3DMsoNormal><span lang=3DEN-US><o:p>&nbsp;</o:p></span></p><p =
class=3DMsoNormal><span lang=3DEN-US>More important, the second is that =
I want to use MemStore to study the inside of Mirage. Maybe I need to =
adapt it to Mirage, and do some research on Xen. =
<o:p></o:p></span></p><p class=3DMsoNormal><span =
lang=3DEN-US><o:p>&nbsp;</o:p></span></p><p class=3DMsoNormal><span =
lang=3DEN-US>Can you give me some suggestions on that, =
Anil?<o:p></o:p></span></p><p class=3DMsoNormal><span =
lang=3DEN-US><o:p>&nbsp;</o:p></span></p><p class=3DMsoNormal><span =
lang=3DEN-US>Regards,<o:p></o:p></span></p><p class=3DMsoNormal><span =
lang=3DEN-US>Yiming<o:p></o:p></span></p></div></body></html>
------=_NextPart_000_000E_01CDD864.14C079A0--



From pierre.chambart@ocamlpro.com Wed Dec 12 13:43:59 2012
Received: from ppsw-50.csi.cam.ac.uk ([131.111.8.150])
	by lists-2.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25)
	with esmtp id 1TimbP-00079z-CI (Exim 4.70) for
	cl-mirage@lists.cam.ac.uk
	(return-path <pierre.chambart@ocamlpro.com>);
	Wed, 12 Dec 2012 13:43:59 +0000
X-Cam-AntiVirus: no malware found
X-Cam-SpamDetails: score 0.0 from SpamAssassin-3.3.2-1418219
X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/
Received: from redisdead.crans.org ([138.231.136.39]:41384)
	by ppsw-50.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.147]:25)
	with esmtp id 1TimbO-0002uJ-sV (Exim 4.72) for
	cl-mirage@lists.cam.ac.uk
	(return-path <pierre.chambart@ocamlpro.com>);
	Wed, 12 Dec 2012 13:43:59 +0000
Received: from localhost (knopper.inria.fr [128.93.60.80])
	(using SSLv3 with cipher DHE-RSA-AES128-SHA (128/128 bits))
	(No client certificate requested)
	by redisdead.crans.org (Postfix) with ESMTPSA id 957BD2176;
	Wed, 12 Dec 2012 14:43:56 +0100 (CET)
Date: Wed, 12 Dec 2012 14:43:51 +0100
From: Pierre Chambart <pierre.chambart@ocamlpro.com>
To: Anil Madhavapeddy <anil@recoil.org>
Subject: Re: mirage + ocaml4
Message-ID: <20121212144351.52b54752@crans.org>
In-Reply-To: <4CC47928-8706-42A7-A70D-63C658024891@recoil.org>
References: <075E2FB9-63B0-4337-8081-6E86CB4352A0@ocamlpro.com>
	<9BD17735-5E51-4676-91D4-4C7322457D7F@recoil.org>
	<4CC47928-8706-42A7-A70D-63C658024891@recoil.org>
X-Mailer: Claws Mail 3.8.1 (GTK+ 2.24.10; x86_64-pc-linux-gnu)
Mime-Version: 1.0
Content-Type: multipart/signed; micalg=PGP-SHA1;
	boundary="Sig_/_JbaGcE2DYyWkz=M1L2Pviq";
	protocol="application/pgp-signature"
Cc: Thomas Gazagnaire <thomas@ocamlpro.com>, "cl-mirage@lists.cam.ac.uk
	List" <cl-mirage@lists.cam.ac.uk>
X-BeenThere: cl-mirage@lists.cam.ac.uk
X-Mailman-Version: 2.1.8
Precedence: list
List-Id: MirageOS development <cl-mirage.lists.cam.ac.uk>
List-Unsubscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=unsubscribe>
List-Archive: <https://lists.cam.ac.uk/pipermail/cl-mirage>
List-Post: <mailto:cl-mirage@lists.cam.ac.uk>
List-Help: <mailto:cl-mirage-request@lists.cam.ac.uk?subject=help>
List-Subscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=subscribe>
X-List-Received-Date: Wed, 12 Dec 2012 13:43:59 -0000
Content-Length: 1279
Lines: 45

--Sig_/_JbaGcE2DYyWkz=M1L2Pviq
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

Le Wed, 12 Dec 2012 11:34:04 +0000,
Anil Madhavapeddy <anil@recoil.org> a =C3=A9crit :

> One performance crime that I noticed is the Cstruct.blit_string
> function, which does a byte-by-byte copy from a string to a
> Bigarray.  Pierre, do you have any thoughts on how to improve this?
> A faster blit between them would be quite useful.

Of course it is possible to do a memcopy like for copy_string. I can do
this patch later today.

I noticed that the type t is public. This may be a good idea to make it
private in the mli to avoid dangerous usage. And you should then add
with that a cast function checking that the bounds are effectively
correct.

type t =3D private {
  buffer: buffer;
  off : int;
  len : int;
}

val check: buffer -> off:int -> len:int -> t

--=20
Pierre

--Sig_/_JbaGcE2DYyWkz=M1L2Pviq
Content-Type: application/pgp-signature; name=signature.asc
Content-Disposition: attachment; filename=signature.asc

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iEYEARECAAYFAlDIihcACgkQQ2gKRvJTD871uACdGz/csFT9uyd+WkTptOA39vgT
X94AniIKWLvBO/6KmbOA/6SOwcwvlFcn
=leI8
-----END PGP SIGNATURE-----

--Sig_/_JbaGcE2DYyWkz=M1L2Pviq--


From anil@recoil.org Wed Dec 12 17:14:00 2012
Received: from ppsw-51.csi.cam.ac.uk ([131.111.8.151])
	by lists-2.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25)
	with esmtp id 1Tipse-0004xM-OE (Exim 4.70) for
	cl-mirage@lists.cam.ac.uk
	(return-path <anil@recoil.org>); Wed, 12 Dec 2012 17:14:00 +0000
X-Cam-AntiVirus: no malware found
X-Cam-SpamDetails: score 0.0 from SpamAssassin-3.3.2-1418219
X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/
Received: from recoil.dh.bytemark.co.uk ([89.16.177.154]:29316
	helo=dark.recoil.org)
	by ppsw-51.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.148]:25)
	with smtp id 1TipsZ-0003iM-Xl (Exim 4.72) for cl-mirage@lists.cam.ac.uk
	(return-path <anil@recoil.org>); Wed, 12 Dec 2012 17:14:00 +0000
Received: (qmail 11216 invoked by uid 634); 12 Dec 2012 17:13:55 -0000
X-Spam-Level: *
X-Spam-Status: No, hits=-1.0 required=5.0
	tests=ALL_TRUSTED
X-Spam-Check-By: dark.recoil.org
Received: from cpc7-cmbg14-2-0-cust238.5-4.cable.virginmedia.com (HELO
	[192.168.1.48]) (86.30.244.239)
	(smtp-auth username remote@recoil.org, mechanism cram-md5)
	by dark.recoil.org (qpsmtpd/0.84) with ESMTPA;
	Wed, 12 Dec 2012 17:13:55 +0000
Content-Type: text/plain; charset=us-ascii
Mime-Version: 1.0 (Mac OS X Mail 6.1 \(1498\))
Subject: Re: Backtraces in mirage?
From: Anil Madhavapeddy <anil@recoil.org>
In-Reply-To: <9003011D-DB9E-477E-A7A1-7E38F2F529B4@cam.ac.uk>
Date: Wed, 12 Dec 2012 17:13:53 +0000
Content-Transfer-Encoding: quoted-printable
Message-Id: <E074D109-5EE7-49A8-880B-C60DBCD7EE98@recoil.org>
References: <A012800F-FEC8-41A1-A2AE-FB2C6E347487@cam.ac.uk>
	<9003011D-DB9E-477E-A7A1-7E38F2F529B4@cam.ac.uk>
To: Jon Ludlam <jjl25@cam.ac.uk>
X-Mailer: Apple Mail (2.1498)
X-Virus-Checked: Checked by ClamAV on dark.recoil.org
Cc: Dave Scott <Dave.Scott@eu.citrix.com>,
	"cl-mirage@lists.cam.ac.uk List" <cl-mirage@lists.cam.ac.uk>
X-BeenThere: cl-mirage@lists.cam.ac.uk
X-Mailman-Version: 2.1.8
Precedence: list
List-Id: MirageOS development <cl-mirage.lists.cam.ac.uk>
List-Unsubscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=unsubscribe>
List-Archive: <https://lists.cam.ac.uk/pipermail/cl-mirage>
List-Post: <mailto:cl-mirage@lists.cam.ac.uk>
List-Help: <mailto:cl-mirage-request@lists.cam.ac.uk?subject=help>
List-Subscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=subscribe>
X-List-Received-Date: Wed, 12 Dec 2012 17:14:00 -0000
Content-Length: 1699
Lines: 43

Just to be clear, are you running separate OPAM switches for the =
different versions you are running?  3.12-generated code will not work =
on the 4.01 runtime reliably.  Regarding the trace mode, that only works =
for OCaml code, and not for the actual C runtime (which it sounds like =
is your problem here).  I'm afraid judicious printfs remain the best =
option, unless you setup a gdbserver environment for the VM.

What's actually involved in suspending a PV guest from a low-level =
perspective? Do you just need to reconstruct your page tables on resume? =
 If you have the 3.12.1/Mirage/monolithic patches that used to work, I =
can eyeball them to see if anything has changed in the general area that =
might affect it on the latest tree.

-anil

On 12 Dec 2012, at 14:48, Jon Ludlam <jjl25@cam.ac.uk> wrote:

> Well, I guess the large mem alloc thing is just the mismatch between =
the 4.01 runtime and the 3.12 generated code. Surprising it got that far =
:-) now I need a page table debugger :-(
>=20
> Sent from my iPad
>=20
> On 12 Dec 2012, at 14:06, Jon Ludlam <jjl25@cam.ac.uk> wrote:
>=20
>> Hi Dave, Anil,
>>=20
>> I'm trying to get suspend resume stuff working again, and am hitting =
some curious problems. In 4.01, I'm getting invalid page tables on =
suspend, and on 3.12.1, I'm getting a failure in alloc_pages much =
earlier than the suspend - in that case something's trying to allocate =
an enormous amount of memory. There used to be a trace/debug mode in the =
old monolithic repo - is there anything similar these days? And is there =
anything that's changed recently that might have caused any of this?
>>=20
>> Cheers,
>>=20
>> Jon
>>=20
>> Sent from my iPad
>=20



From anil@recoil.org Wed Dec 12 17:31:28 2012
Received: from ppsw-51.csi.cam.ac.uk ([131.111.8.151])
	by lists-2.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25)
	with esmtp id 1Tiq9Y-0005Zg-R3 (Exim 4.70) for
	cl-mirage@lists.cam.ac.uk
	(return-path <anil@recoil.org>); Wed, 12 Dec 2012 17:31:28 +0000
X-Cam-AntiVirus: no malware found
X-Cam-SpamDetails: score 0.0 from SpamAssassin-3.3.2-1418219
X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/
Received: from recoil.dh.bytemark.co.uk ([89.16.177.154]:31708
	helo=dark.recoil.org)
	by ppsw-51.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.148]:25)
	with smtp id 1Tiq9Y-000278-WJ (Exim 4.72) for cl-mirage@lists.cam.ac.uk
	(return-path <anil@recoil.org>); Wed, 12 Dec 2012 17:31:28 +0000
Received: (qmail 28336 invoked by uid 634); 12 Dec 2012 17:31:27 -0000
X-Spam-Level: *
X-Spam-Status: No, hits=-1.0 required=5.0
	tests=ALL_TRUSTED
X-Spam-Check-By: dark.recoil.org
Received: from cpc7-cmbg14-2-0-cust238.5-4.cable.virginmedia.com (HELO
	[192.168.1.48]) (86.30.244.239)
	(smtp-auth username remote@recoil.org, mechanism cram-md5)
	by dark.recoil.org (qpsmtpd/0.84) with ESMTPA;
	Wed, 12 Dec 2012 17:31:27 +0000
Content-Type: text/plain; charset=iso-8859-1
Mime-Version: 1.0 (Mac OS X Mail 6.1 \(1498\))
Subject: Re: mirage + ocaml4
From: Anil Madhavapeddy <anil@recoil.org>
In-Reply-To: <20121212144351.52b54752@crans.org>
Date: Wed, 12 Dec 2012 17:31:25 +0000
Content-Transfer-Encoding: quoted-printable
Message-Id: <475C2638-454A-4A33-8325-49EF640C14E9@recoil.org>
References: <075E2FB9-63B0-4337-8081-6E86CB4352A0@ocamlpro.com>
	<9BD17735-5E51-4676-91D4-4C7322457D7F@recoil.org>
	<4CC47928-8706-42A7-A70D-63C658024891@recoil.org>
	<20121212144351.52b54752@crans.org>
To: Pierre Chambart <pierre.chambart@ocamlpro.com>
X-Mailer: Apple Mail (2.1498)
X-Virus-Checked: Checked by ClamAV on dark.recoil.org
Cc: Thomas Gazagnaire <thomas@ocamlpro.com>,
	"cl-mirage@lists.cam.ac.uk List" <cl-mirage@lists.cam.ac.uk>
X-BeenThere: cl-mirage@lists.cam.ac.uk
X-Mailman-Version: 2.1.8
Precedence: list
List-Id: MirageOS development <cl-mirage.lists.cam.ac.uk>
List-Unsubscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=unsubscribe>
List-Archive: <https://lists.cam.ac.uk/pipermail/cl-mirage>
List-Post: <mailto:cl-mirage@lists.cam.ac.uk>
List-Help: <mailto:cl-mirage-request@lists.cam.ac.uk?subject=help>
List-Subscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=subscribe>
X-List-Received-Date: Wed, 12 Dec 2012 17:31:28 -0000
Content-Length: 1373
Lines: 43

On 12 Dec 2012, at 13:43, Pierre Chambart <pierre.chambart@ocamlpro.com> =
wrote:

> Le Wed, 12 Dec 2012 11:34:04 +0000,
> Anil Madhavapeddy <anil@recoil.org> a =E9crit :
>=20
>> One performance crime that I noticed is the Cstruct.blit_string
>> function, which does a byte-by-byte copy from a string to a
>> Bigarray.  Pierre, do you have any thoughts on how to improve this?
>> A faster blit between them would be quite useful.
>=20
> Of course it is possible to do a memcopy like for copy_string. I can =
do
> this patch later today.

Thanks!  I think that's the last of the very bad byte-by-byte cases in=20=

cstruct; it's pretty decent now.

> I noticed that the type t is public. This may be a good idea to make =
it
> private in the mli to avoid dangerous usage. And you should then add
> with that a cast function checking that the bounds are effectively
> correct.
>=20
> type t =3D private {
>  buffer: buffer;
>  off : int;
>  len : int;
> }
>=20
> val check: buffer -> off:int -> len:int -> t

Right; this is actually in the TODO as well.  What I want is a way to
attach a bigarray and have it bounds checked *once* (for the total size
of the cstruct that has been declared), and then have all the various
internal functions use unsafe accesses.

That should be possible in Cstruct.of_bigarray and Cstruct.create, with
the check function above added.

-anil=


From anil@recoil.org Fri Dec 14 17:22:01 2012
Received: from ppsw-51.csi.cam.ac.uk ([131.111.8.151])
	by lists-2.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25)
	with esmtp id 1TjYxV-0001U1-CL (Exim 4.70) for
	cl-mirage@lists.cam.ac.uk
	(return-path <anil@recoil.org>); Fri, 14 Dec 2012 17:22:01 +0000
X-Cam-AntiVirus: no malware found
X-Cam-SpamDetails: score 0.0 from SpamAssassin-3.3.2-1418219
X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/
Received: from recoil.dh.bytemark.co.uk ([89.16.177.154]:7050
	helo=dark.recoil.org)
	by ppsw-51.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.148]:25)
	with smtp id 1TjYxU-0002Fn-X6 (Exim 4.72) for cl-mirage@lists.cam.ac.uk
	(return-path <anil@recoil.org>); Fri, 14 Dec 2012 17:22:01 +0000
Received: (qmail 2195 invoked by uid 634); 14 Dec 2012 17:22:00 -0000
X-Spam-Level: *
X-Spam-Status: No, hits=-1.0 required=5.0
	tests=ALL_TRUSTED
X-Spam-Check-By: dark.recoil.org
Received: from volstagg-0.srg.cl.cam.ac.uk (HELO [10.0.0.83]) (128.232.32.232)
	(smtp-auth username remote@recoil.org, mechanism cram-md5)
	by dark.recoil.org (qpsmtpd/0.84) with ESMTPA;
	Fri, 14 Dec 2012 17:21:59 +0000
From: Anil Madhavapeddy <anil@recoil.org>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: quoted-printable
Subject: oasis/mirage pull req
Message-Id: <597A7404-6AEB-4F4E-93C8-6C890FA75627@recoil.org>
Date: Fri, 14 Dec 2012 17:21:59 +0000
To: "cl-mirage@lists.cam.ac.uk List" <cl-mirage@lists.cam.ac.uk>
Mime-Version: 1.0 (Mac OS X Mail 6.2 \(1499\))
X-Mailer: Apple Mail (2.1499)
X-Virus-Checked: Checked by ClamAV on dark.recoil.org
X-BeenThere: cl-mirage@lists.cam.ac.uk
X-Mailman-Version: 2.1.8
Precedence: list
List-Id: MirageOS development <cl-mirage.lists.cam.ac.uk>
List-Unsubscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=unsubscribe>
List-Archive: <https://lists.cam.ac.uk/pipermail/cl-mirage>
List-Post: <mailto:cl-mirage@lists.cam.ac.uk>
List-Help: <mailto:cl-mirage-request@lists.cam.ac.uk?subject=help>
List-Subscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=subscribe>
X-List-Received-Date: Fri, 14 Dec 2012 17:22:01 -0000
Content-Length: 790
Lines: 23

All, while the cstruct hacking is ongoing, one of the last remaining =
"usability" items is having good OASIS support for building the Xen =
backend.

I've split this up into two pieces:

- Support in OASIS for generating a standalone `.o` object file that =
contains the linked OCaml application, but not the runtime.  All the =
phases after this do not need the OCaml compiler any more.

- The Xen microkernel link phase that uses a custom lds script to =
convert the .o file into a standalone Xen binary.

I've sent a pull request upstream to the OASIS developers for the first =
item:
https://github.com/ocaml/oasis/pull/7

This adds a `.nobj.o` output target to OASIS, and will be sufficient for =
us for now (including for Haris' NS3 backend, and Gabor's FreeBSD =
backend).

-anil=


From anil@recoil.org Fri Dec 14 18:10:46 2012
Received: from ppsw-51.csi.cam.ac.uk ([131.111.8.151])
	by lists-2.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25)
	with esmtp id 1TjZig-000205-IA (Exim 4.70) for
	cl-mirage@lists.cam.ac.uk
	(return-path <anil@recoil.org>); Fri, 14 Dec 2012 18:10:46 +0000
X-Cam-AntiVirus: no malware found
X-Cam-SpamDetails: score 0.0 from SpamAssassin-3.3.2-1418219
X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/
Received: from recoil.dh.bytemark.co.uk ([89.16.177.154]:43326
	helo=dark.recoil.org)
	by ppsw-51.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.148]:25)
	with smtp id 1TjZig-0000JZ-We (Exim 4.72) for cl-mirage@lists.cam.ac.uk
	(return-path <anil@recoil.org>); Fri, 14 Dec 2012 18:10:46 +0000
Received: (qmail 9349 invoked by uid 634); 14 Dec 2012 18:10:45 -0000
X-Spam-Level: *
X-Spam-Status: No, hits=-1.0 required=5.0
	tests=ALL_TRUSTED
X-Spam-Check-By: dark.recoil.org
Received: from volstagg-0.srg.cl.cam.ac.uk (HELO [10.0.0.83]) (128.232.32.232)
	(smtp-auth username remote@recoil.org, mechanism cram-md5)
	by dark.recoil.org (qpsmtpd/0.84) with ESMTPA;
	Fri, 14 Dec 2012 18:10:45 +0000
From: Anil Madhavapeddy <anil@recoil.org>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: quoted-printable
Subject: mirage-net-0.4.1 released
Message-Id: <043E0580-46CD-44B3-83E8-9DF6C85A7B4D@recoil.org>
Date: Fri, 14 Dec 2012 18:10:44 +0000
To: "cl-mirage@lists.cam.ac.uk List" <cl-mirage@lists.cam.ac.uk>
Mime-Version: 1.0 (Mac OS X Mail 6.2 \(1499\))
X-Mailer: Apple Mail (2.1499)
X-Virus-Checked: Checked by ClamAV on dark.recoil.org
X-BeenThere: cl-mirage@lists.cam.ac.uk
X-Mailman-Version: 2.1.8
Precedence: list
List-Id: MirageOS development <cl-mirage.lists.cam.ac.uk>
List-Unsubscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=unsubscribe>
List-Archive: <https://lists.cam.ac.uk/pipermail/cl-mirage>
List-Post: <mailto:cl-mirage@lists.cam.ac.uk>
List-Help: <mailto:cl-mirage-request@lists.cam.ac.uk?subject=help>
List-Subscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=subscribe>
X-List-Received-Date: Fri, 14 Dec 2012 18:10:46 -0000
Content-Length: 863
Lines: 26

Thanks to Haris, Balraj for a slew of stability fixes and features.  =
This will be the last of the "slow" Mirage-nets, as Dave has a huge =
patchset to convert to a much faster cstruct-based version, which I'll =
describe when it's merged over the weekend!

=3D=3D=3D=3D=3D 0.4.1 (14-Dec-2012) =3D=3D=3D=3D=3D

* Add an iperf self-test that creates two VIFs and transmits across
  them. This is a useful 'localhost' test which stresses the bridge
  code using just one VM.

* Add support for attaching existing devices when initialising the
  network manager, via an optional `attached` parameter.

* Constrain TCP connect to be a `unit Lwt.t` instead of a polymorphic
  return value.

* Expose IPv4 netmask function.

* Reduce ARP verbosity to the console.

* Fix TCP fast recovery to wait until all in-flight packets are
  acked, rather then exiting early.




From sdiris@gmail.com Sat Dec 22 21:23:14 2012
Received: from ppsw-41.csi.cam.ac.uk ([131.111.8.141])
	by lists-2.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25)
	with esmtp id 1TmWXK-0003b0-0n (Exim 4.70) for
	cl-mirage@lists.cam.ac.uk
	(return-path <sdiris@gmail.com>); Sat, 22 Dec 2012 21:23:14 +0000
X-Cam-AntiVirus: no malware found
X-Cam-SpamDetails: score -0.8 from SpamAssassin-3.3.2-1424823 
	* -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/,
	low *      trust
	*      [74.125.82.50 listed in list.dnswl.dnsbl.ja.net]
	* 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail
	provider *       (sdiris[at]gmail.com)
	*  0.0 HTML_MESSAGE BODY: HTML included in message
	* -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from
	*      author's domain
	*  0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily
	*      valid
	* -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature
X-Cam-ScannerInfo: http://www.ucs.cam.ac.uk/email/scanner/
Received: from mail-wg0-f50.google.com ([74.125.82.50]:34325)
	by ppsw-41.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.146]:25)
	with esmtp id 1TmWXG-0006Kk-Sm (Exim 4.72) for
	cl-mirage@lists.cam.ac.uk
	(return-path <sdiris@gmail.com>); Sat, 22 Dec 2012 21:23:13 +0000
Received: by mail-wg0-f50.google.com with SMTP id es5so2745040wgb.29
	for <cl-mirage@lists.cam.ac.uk>; Sat, 22 Dec 2012 13:23:10 -0800 (PST)
X-Received: by 10.194.121.74 with SMTP id li10mr19034968wjb.5.1356211390706;
	Sat, 22 Dec 2012 13:23:10 -0800 (PST)
Received: from yimingwin7 (global-1-11.nat.csx.cam.ac.uk. [131.111.184.11])
	by mx.google.com with ESMTPS id bw9sm9481817wib.5.2012.12.22.13.23.09
	(version=TLSv1/SSLv3 cipher=OTHER);
	Sat, 22 Dec 2012 13:23:09 -0800 (PST)
From: "Yiming Zhang" <sdiris@gmail.com>
To: <cl-mirage@lists.cam.ac.uk>
Subject: oasis setup error for xen
Date: Sat, 22 Dec 2012 21:23:13 -0000
Message-ID: <000101cde08a$8d978ac0$a8c6a040$@gmail.com>
MIME-Version: 1.0
Content-Type: multipart/alternative;
	boundary="----=_NextPart_000_0002_01CDE08A.8D987520"
X-Mailer: Microsoft Outlook 14.0
Thread-Index: Ac3giav5nqFlcZOeSA2yEeuJwQoK1g==
Content-Language: zh-cn
X-BeenThere: cl-mirage@lists.cam.ac.uk
X-Mailman-Version: 2.1.8
Precedence: list
List-Id: MirageOS development <cl-mirage.lists.cam.ac.uk>
List-Unsubscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=unsubscribe>
List-Archive: <https://lists.cam.ac.uk/pipermail/cl-mirage>
List-Post: <mailto:cl-mirage@lists.cam.ac.uk>
List-Help: <mailto:cl-mirage-request@lists.cam.ac.uk?subject=help>
List-Subscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=subscribe>
X-List-Received-Date: Sat, 22 Dec 2012 21:23:14 -0000
Content-Length: 4076
Lines: 126

This is a multipart message in MIME format.

------=_NextPart_000_0002_01CDE08A.8D987520
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: 7bit

Dear all,

 

I am trying to compile mirage-www for running directly in xen. However, when
I run "oasis setup" (I guess it is needed), I got the following error:

 

root@zym:~/src/mirage-www/src# oasis setup

E: Field Target is not defined in schema Executable

 

I checked the _oasis file and found one line:

Target:             xen

 

But it seems oasis doesn't support the "Target" field. Anyone knows the
problem?

 

Thanks!

Yiming


------=_NextPart_000_0002_01CDE08A.8D987520
Content-Type: text/html;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

<html xmlns:v=3D"urn:schemas-microsoft-com:vml" =
xmlns:o=3D"urn:schemas-microsoft-com:office:office" =
xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns:m=3D"http://schemas.microsoft.com/office/2004/12/omml" =
xmlns=3D"http://www.w3.org/TR/REC-html40"><head><meta =
http-equiv=3DContent-Type content=3D"text/html; =
charset=3Dus-ascii"><meta name=3DGenerator content=3D"Microsoft Word 14 =
(filtered medium)"><style><!--
/* Font Definitions */
@font-face
	{font-family:SimSun;
	panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
	{font-family:SimSun;
	panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
	{font-family:Calibri;
	panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
	{font-family:SimSun;
	panose-1:2 1 6 0 3 1 1 1 1 1;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0cm;
	margin-bottom:.0001pt;
	text-align:justify;
	text-justify:inter-ideograph;
	font-size:10.5pt;
	font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
	{mso-style-priority:99;
	color:blue;
	text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
	{mso-style-priority:99;
	color:purple;
	text-decoration:underline;}
span.EmailStyle17
	{mso-style-type:personal-compose;
	font-family:"Calibri","sans-serif";
	color:windowtext;}
.MsoChpDefault
	{mso-style-type:export-only;
	font-family:"Calibri","sans-serif";}
/* Page Definitions */
@page WordSection1
	{size:612.0pt 792.0pt;
	margin:72.0pt 90.0pt 72.0pt 90.0pt;}
div.WordSection1
	{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext=3D"edit" spidmax=3D"1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext=3D"edit">
<o:idmap v:ext=3D"edit" data=3D"1" />
</o:shapelayout></xml><![endif]--></head><body lang=3DZH-CN link=3Dblue =
vlink=3Dpurple style=3D'text-justify-trim:punctuation'><div =
class=3DWordSection1><p class=3DMsoNormal><span lang=3DEN-US>Dear =
all,<o:p></o:p></span></p><p class=3DMsoNormal><span =
lang=3DEN-US><o:p>&nbsp;</o:p></span></p><p class=3DMsoNormal><span =
lang=3DEN-US>I am trying to compile mirage-www for running directly in =
xen. However, when I run &#8220;oasis setup&#8221; (I guess it is =
needed), I got the following error:<o:p></o:p></span></p><p =
class=3DMsoNormal><span lang=3DEN-US><o:p>&nbsp;</o:p></span></p><p =
class=3DMsoNormal><span lang=3DEN-US>root@zym:~/src/mirage-www/src# =
oasis setup<o:p></o:p></span></p><p class=3DMsoNormal><span =
lang=3DEN-US>E: Field Target is not defined in schema =
Executable<o:p></o:p></span></p><p class=3DMsoNormal><span =
lang=3DEN-US><o:p>&nbsp;</o:p></span></p><p class=3DMsoNormal><span =
lang=3DEN-US>I checked the _oasis file and found one =
line:<o:p></o:p></span></p><p class=3DMsoNormal><span =
lang=3DEN-US>Target:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp; xen<o:p></o:p></span></p><p class=3DMsoNormal><span =
lang=3DEN-US><o:p>&nbsp;</o:p></span></p><p class=3DMsoNormal><span =
lang=3DEN-US>But it seems oasis doesn&#8217;t support the =
&#8220;Target&#8221; field. Anyone knows the =
problem?<o:p></o:p></span></p><p class=3DMsoNormal><span =
lang=3DEN-US><o:p>&nbsp;</o:p></span></p><p class=3DMsoNormal><span =
lang=3DEN-US>Thanks!<o:p></o:p></span></p><p class=3DMsoNormal><span =
lang=3DEN-US>Yiming<o:p></o:p></span></p></div></body></html>
------=_NextPart_000_0002_01CDE08A.8D987520--



From anil@recoil.org Mon Dec 24 02:17:26 2012
Received: from ppsw-51.csi.cam.ac.uk ([131.111.8.151])
	by lists-2.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25)
	with esmtp id 1Tmxba-00075G-Rr (Exim 4.70) for
	cl-mirage@lists.cam.ac.uk
	(return-path <anil@recoil.org>); Mon, 24 Dec 2012 02:17:26 +0000
X-Cam-AntiVirus: no malware found
X-Cam-SpamDetails: score 0.0 from SpamAssassin-3.3.2-1425259
X-Cam-ScannerInfo: http://www.ucs.cam.ac.uk/email/scanner/
Received: from recoil.dh.bytemark.co.uk ([89.16.177.154]:42104
	helo=dark.recoil.org)
	by ppsw-51.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.148]:25)
	with smtp id 1TmxbZ-00062q-Ys (Exim 4.72) for cl-mirage@lists.cam.ac.uk
	(return-path <anil@recoil.org>); Mon, 24 Dec 2012 02:17:26 +0000
Received: (qmail 21882 invoked by uid 634); 24 Dec 2012 02:17:25 -0000
X-Spam-Level: *
X-Spam-Status: No, hits=-1.0 required=5.0
	tests=ALL_TRUSTED
X-Spam-Check-By: dark.recoil.org
Received: from cpc2-belf1-0-0-cust23.2-1.cable.virginmedia.com (HELO
	[10.0.1.16]) (82.29.224.24)
	(smtp-auth username remote@recoil.org, mechanism cram-md5)
	by dark.recoil.org (qpsmtpd/0.84) with ESMTPA;
	Mon, 24 Dec 2012 02:17:24 +0000
Content-Type: text/plain; charset=windows-1252
Mime-Version: 1.0 (Mac OS X Mail 6.2 \(1499\))
Subject: Re: oasis setup error for xen
From: Anil Madhavapeddy <anil@recoil.org>
In-Reply-To: <000101cde08a$8d978ac0$a8c6a040$@gmail.com>
Date: Mon, 24 Dec 2012 02:17:31 +0000
Content-Transfer-Encoding: quoted-printable
Message-Id: <DBB394AE-0BBC-4905-B192-62D3F5436FEC@recoil.org>
References: <000101cde08a$8d978ac0$a8c6a040$@gmail.com>
To: Yiming Zhang <sdiris@gmail.com>
X-Mailer: Apple Mail (2.1499)
X-Virus-Checked: Checked by ClamAV on dark.recoil.org
Cc: cl-mirage@lists.cam.ac.uk
X-BeenThere: cl-mirage@lists.cam.ac.uk
X-Mailman-Version: 2.1.8
Precedence: list
List-Id: MirageOS development <cl-mirage.lists.cam.ac.uk>
List-Unsubscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=unsubscribe>
List-Archive: <https://lists.cam.ac.uk/pipermail/cl-mirage>
List-Post: <mailto:cl-mirage@lists.cam.ac.uk>
List-Help: <mailto:cl-mirage-request@lists.cam.ac.uk?subject=help>
List-Subscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=subscribe>
X-List-Received-Date: Mon, 24 Dec 2012 02:17:26 -0000
Content-Length: 1897
Lines: 53

Hi Yiming,

The OASIS setup isn't needed as the files that are autogenerated are =
also checked in, so it should compile straight from a checkout.  =
However, read on to find out more...

The OASIS in question is actually a patched version that supports the =
'Executable: xen' target, from github.com/avsm/oasis (add-xen branch).  =
We're currently upstreaming only a portion of this patch:
https://github.com/ocaml/oasis/pull/7

...which is sufficient to output a standalone native object file. This =
uses the -output-obj facility of the OCaml compiler to link all the =
OCaml modules into one native code blob, but to not output a final =
binary.  This lets us do the final link under more controlled =
conditions.

Recent versions of mirage-platform then bring back the `mir-build` =
script, which converts the native object file into a Xen microkernel.  =
This two-step process makes it far easier to incorporate other backends =
such as the kFreeBSD target in the future.

The 'hello world' Mirage skeleton is in:
http://github.com/mirage/mirage-skeleton

I'm assembling a bit more detail in the README there (and hopefully Jon =
Ludlam will commit a suspend/resume-aware version into that repository =
after the holidays too).  Once these new scripts settle down and the =
OASIS patch is upstreamed, I'll sync mirage-www with it.

-anil

On 22 Dec 2012, at 21:23, Yiming Zhang <sdiris@gmail.com> wrote:

> Dear all,
> =20
> I am trying to compile mirage-www for running directly in xen. =
However, when I run =93oasis setup=94 (I guess it is needed), I got the =
following error:
> =20
> root@zym:~/src/mirage-www/src# oasis setup
> E: Field Target is not defined in schema Executable
> =20
> I checked the _oasis file and found one line:
> Target:             xen
> =20
> But it seems oasis doesn=92t support the =93Target=94 field. Anyone =
knows the problem?
> =20
> Thanks!
> Yiming



From sdiris@gmail.com Mon Dec 24 15:49:18 2012
Received: from ppsw-41.csi.cam.ac.uk ([131.111.8.141])
	by lists-2.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25)
	with esmtp id 1TnAHG-0007X5-Ok (Exim 4.70) for
	cl-mirage@lists.cam.ac.uk
	(return-path <sdiris@gmail.com>); Mon, 24 Dec 2012 15:49:18 +0000
X-Cam-AntiVirus: no malware found
X-Cam-SpamDetails: score -0.8 from SpamAssassin-3.3.2-1425441 
	* -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/,
	low *      trust
	*      [74.125.82.41 listed in list.dnswl.dnsbl.ja.net]
	* 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail
	provider *       (sdiris[at]gmail.com)
	* -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from
	*      author's domain
	*  0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily
	*      valid
	* -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature
X-Cam-ScannerInfo: http://www.ucs.cam.ac.uk/email/scanner/
Received: from mail-wg0-f41.google.com ([74.125.82.41]:54311)
	by ppsw-41.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.146]:25)
	with esmtp id 1TnAHF-0001Vc-T0 (Exim 4.72) for
	cl-mirage@lists.cam.ac.uk
	(return-path <sdiris@gmail.com>); Mon, 24 Dec 2012 15:49:18 +0000
Received: by mail-wg0-f41.google.com with SMTP id ds1so2676055wgb.0
	for <cl-mirage@lists.cam.ac.uk>; Mon, 24 Dec 2012 07:49:17 -0800 (PST)
X-Received: by 10.194.82.168 with SMTP id j8mr36276291wjy.15.1356364157770;
	Mon, 24 Dec 2012 07:49:17 -0800 (PST)
Received: from yimingwin7 (c113.al.cl.cam.ac.uk. [128.232.110.113])
	by mx.google.com with ESMTPS id hg17sm43550567wib.1.2012.12.24.07.49.16
	(version=TLSv1/SSLv3 cipher=OTHER);
	Mon, 24 Dec 2012 07:49:16 -0800 (PST)
From: "Yiming Zhang" <sdiris@gmail.com>
To: "'Anil Madhavapeddy'" <anil@recoil.org>
Subject: re: oasis setup error for xen
Date: Mon, 24 Dec 2012 15:49:21 -0000
Message-ID: <001801cde1ee$3e25c0a0$ba7141e0$@gmail.com>
MIME-Version: 1.0
Content-Type: text/plain;
	charset="gb2312"
Content-Transfer-Encoding: quoted-printable
X-Mailer: Microsoft Outlook 14.0
thread-index: Ac3h63lJsN7AWQzTQ7WogOyoMzNm5Q==
Content-Language: zh-cn
Cc: cl-mirage@lists.cam.ac.uk
X-BeenThere: cl-mirage@lists.cam.ac.uk
X-Mailman-Version: 2.1.8
Precedence: list
List-Id: MirageOS development <cl-mirage.lists.cam.ac.uk>
List-Unsubscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=unsubscribe>
List-Archive: <https://lists.cam.ac.uk/pipermail/cl-mirage>
List-Post: <mailto:cl-mirage@lists.cam.ac.uk>
List-Help: <mailto:cl-mirage-request@lists.cam.ac.uk?subject=help>
List-Subscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=subscribe>
X-List-Received-Date: Mon, 24 Dec 2012 15:49:18 -0000
Content-Length: 3210
Lines: 107

Anil,

Thanks for your help. I have successfully run the "hello" example in =
Xen.=20

About mirage-www, I disabled the "Target" line and oasis works fine.
However, when I make mirage-www in 4.00.1+mirage-xen, it said =
"ocamlfind:
Package `cohttp.mirage' not found". This is strange because I have done =
the
same thing in 4.00.1+annot. I ran "ocamlfind query cohttp.mirage" in =
both
systems, and got different results (shown below). Is it a bug for cohttp =
in
4.00.1+mirage-xen?

In 4.00.1+mirage-xen:
root@zym:~# ocamlfind query cohttp.mirage
ocamlfind: Package `cohttp.mirage' not found
root@zym:~# ocamlfind query cohttp
/root/.opam/4.00.1+mirage-xen/lib/cohttp

In 4.00.1+annot:
root@zym:~# ocamlfind query cohttp.mirage
/root/.opam/4.00.1+annot/lib/cohttp
root@zym:~# ocamlfind query cohttp
/root/.opam/4.00.1+annot/lib/cohttp

I tried to work around it by changing "cohttp.mirage" to "cohttp" in =
_oasis,
but unfortunately another problem occurred: "Error: Unbound module
Cohttp_lwt_mirage".=20

Merry Christmas!
Yiming

-----=D3=CA=BC=FE=D4=AD=BC=FE-----
=B7=A2=BC=FE=C8=CB: Anil Madhavapeddy [mailto:anil@recoil.org]=20
=B7=A2=CB=CD=CA=B1=BC=E4: 2012=C4=EA12=D4=C224=C8=D5 2:18
=CA=D5=BC=FE=C8=CB: Yiming Zhang
=B3=AD=CB=CD: cl-mirage@lists.cam.ac.uk
=D6=F7=CC=E2: Re: oasis setup error for xen

Hi Yiming,

The OASIS setup isn't needed as the files that are autogenerated are =
also
checked in, so it should compile straight from a checkout.  However, =
read on
to find out more...

The OASIS in question is actually a patched version that supports the
'Executable: xen' target, from github.com/avsm/oasis (add-xen branch).
We're currently upstreaming only a portion of this patch:
https://github.com/ocaml/oasis/pull/7

...which is sufficient to output a standalone native object file. This =
uses
the -output-obj facility of the OCaml compiler to link all the OCaml =
modules
into one native code blob, but to not output a final binary.  This lets =
us
do the final link under more controlled conditions.

Recent versions of mirage-platform then bring back the `mir-build` =
script,
which converts the native object file into a Xen microkernel.  This =
two-step
process makes it far easier to incorporate other backends such as the
kFreeBSD target in the future.

The 'hello world' Mirage skeleton is in:
http://github.com/mirage/mirage-skeleton

I'm assembling a bit more detail in the README there (and hopefully Jon
Ludlam will commit a suspend/resume-aware version into that repository =
after
the holidays too).  Once these new scripts settle down and the OASIS =
patch
is upstreamed, I'll sync mirage-www with it.

-anil

On 22 Dec 2012, at 21:23, Yiming Zhang <sdiris@gmail.com> wrote:

> Dear all,
> =20
> I am trying to compile mirage-www for running directly in xen. =
However,
when I run =A1=B0oasis setup=A1=B1 (I guess it is needed), I got the =
following
error:
> =20
> root@zym:~/src/mirage-www/src# oasis setup
> E: Field Target is not defined in schema Executable
> =20
> I checked the _oasis file and found one line:
> Target:             xen
> =20
> But it seems oasis doesn=A1=AFt support the =A1=B0Target=A1=B1 field. =
Anyone knows the
problem?
> =20
> Thanks!
> Yiming



