9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: ron minnich <rminnich@gmail.com>
To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net>
Cc: "lucio@proxima.alt.za" <lucio@proxima.alt.za>
Subject: Re: [9fans] MIPS LSB compiler
Date: Sun, 15 Nov 2009 14:25:54 -0800	[thread overview]
Message-ID: <13426df10911151425h6a9628b2t9cc321c72c519d15@mail.gmail.com> (raw)
In-Reply-To: <D2EF4F2C-9469-461A-8800-BE112079D742@telus.net>

On Sun, Nov 15, 2009 at 9:26 AM, Paul Lalonde <plalonde@telus.net> wrote:
> I'd be very interested in an ELF based cross-compilation to plan9.  I have
> this many-core IA part that I would desperately love to boot a nicer OS on
> than we currently have (memory footprint, scheduling, vm architecture,
> syscall performance, remote exposure), but the principal application that
> has to run on it is in C++.
>
> If there was a clear path, I might even be able to shake loose some
> resources for it.

on blue gene I use the IBM toolchain on Linux to produce static elf
binaries. Since the non-Linux kernel on Blue Gene uses the Linux
system call interface, these are in fact just Linux binaries compiled
to the Linux 2.0 system call interface (plus some wacky system call
numbers in the 1024 and up range).  I start these Linux/ELF binaries
up on BG/P on Plan 9 using a support program that switches the process
between plan 9 mode and linux mode. The support program on plan 9 uses
libmach to crack the binaries and start them up. I have an in-kernel
linux system call emulation device that lets me run those binaries. I
support a subset of the system calls -- e.g., just enough of futex to
make it go on BG/P -- but extending it is easy.

I chose the in-kernel support as opposed to existing linuxemu support
on Plan 9 for the usual HPC reason: when you're r unning the app
nothing else should run.

What's more interesting: I also build Plan 9 binaries on Linux/ELF
that then run under the Linux emulation environment on Plan 9. Why the
emulation environment? Well, the linux toolchain insists on building
in the system calls. So I have a Linux/ELF, that does a few Linux
system calls, that I drectly map to their Plan 9 equivalent
(open/read/write/close -- pretty direct). Since pretty much everything
I need to do on Plan 9 involves those 4, I've really got a native Plan
9 binary that happens to want to talk Linux system call numbers ...
This way, I can run the *same* binary on Linux and Plan 9, and get
very direct performance comparisons. And, yes, in some cases, Plan 9
is winning :-)

Anyway all that code is available.

ron



  reply	other threads:[~2009-11-15 22:25 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-13  4:34 lucio
2009-11-13  5:12 ` Roman Shaposhnik
2009-11-13  6:01   ` John Barham
2009-11-13 17:48   ` Tim Newsham
2009-11-13 18:19     ` Iruata Souza
2009-11-13 18:36       ` Tim Newsham
2009-11-15 16:52   ` lucio
2009-11-15 17:26     ` Paul Lalonde
2009-11-15 22:25       ` ron minnich [this message]
2009-11-15 22:43         ` Bruce Ellis
2009-11-16  4:34         ` lucio
2009-11-16 10:11           ` Bruce Ellis
2009-11-16  4:28       ` lucio
2009-11-13 19:41 ` Andre Guenther
2009-11-15 17:55   ` lucio

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=13426df10911151425h6a9628b2t9cc321c72c519d15@mail.gmail.com \
    --to=rminnich@gmail.com \
    --cc=9fans@9fans.net \
    --cc=lucio@proxima.alt.za \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).