ron minnich
unread,Nov 15, 2013, 12:47:35 PM11/15/13Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Sign in to report message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Robert Griesemer, Russ Cox, Aram Hăvărneanu, golang-dev, Anthony Martin, minux, Dmitry Vyukov, Dave Cheney, Devon O'Dell
If you don't care about the Go port to Plan 9 or other research
kernels, stop here.
Short form: for new ports, I think you should require a working
builder for 3 months and then take code into the repo. I think you
should require working builders for keeping code in the repo and
version bumps. I think taking code in and *then* asking for a builder
is backwards and is not working. Requiring a builder first would
require a demonstration of a level of effort from interested
communities that is appropriate for a port.
Somebody pointed this discussion out to me and I thought I would
relate experiences from 3 different perspectives (ports). I've not
been reading this list for a bit, got consumed with other work.
I first discussed the Go port to Plan 9 with some Bell Labs friends in
summer 2010 -- yep, that's right, over 3 years ago. We felt strongly
that a move to a Go-based user space was the right direction. Since
that time I've also worked on the 64-bit plan 9 port (started 2011)
and, more recently, I've provided some advice to the person doing the
Akaros port.
Anyone from the Plan 9 world who knows a thing or two can get the
basic toolchain going in a couple hours or a day, and will probably
hit hello, world in a week or two if they're really working at it.
That very ease is what fools people. Passing go test is a much bigger
deal. I had one guy claim to me that he was passing go test; I had to
point out to him that in fact he was not, and was less than 20%
through it based on the output he showed me. He realized later that go
test was causing a plan 9 kernel panic. He mistook failure for
completion. It's surprisingly easy to do because in the Plan 9 world
build tasks run in seconds and minutes, not hours. For reference, on
our branch of NIX, a full library/bin/kernel build took under 2
minutes not counting ghostscript. Also, when a reboot takes less than
a second it's easy to miss that it was a reboot, not a new command
prompt. Hence, a 'go test' that runs a very long time is just not part
of the normal experience.
For the 64-bit Plan 9 port we hit interesting issues in Go test. We
ended up adding system calls to set/get TLS using the %gs register
(which made the runtime code incredibly simple and in fact let us
share code with the Linux port); a system call to get the nanosecond
timer (which made time far more accurate and removed a 'leaking file
descriptor' issue in process spawn); and fixed an FP constant in the
standard Plan 9 library that had been wrong for at least 20 years.
That's just a few things, there were many more.
We've been at it long enough to calibrate what it takes to port Go to
a non-Unix-like kernel. The classic toolchain (6g/6c/6l/ta) takes at
most a week, and sometimes a day. Hello world is a tad longer. Passing
go test? Months of sustained effort. In fact, it's much more like a
year than a month. The Akaros effort, which is being done by a very
smart guy, passed the 6 month mark some time ago. And it's required
changes to Akaros. Again, if the target kernel is not a lot like a
Unix kernel, you're going to hit some messy issues.
The Plan 9 efforts of which I am aware have not finished go test (I'm
happy to be shown to be wrong), but for sure they have not got a
builder done. I've talked to several folks about it and the initial
enthusiasm is quickly followed by "oh wow that's more complicated than
I thought" followed by silence. We had planned to do it for 64-bit
Plan 9 once we passed go test. We were close but there were remaining
issues with async signals.
Hence this recommendation. I think you need to invert the ordering of
operations. To date, you've put code in the repo and then waited for
people to finish up a builder. That seems to be causing you
unnecessary trouble. I'd suggest the following:
- to get code into the repo, you have to show a working builder for three months
- to keep code in the repo, you have to sustain that effort. If the
builder breaks for, say, three months, code gets removed
- to make the bump to the next version, you have to show a working
builder for -- say -- 6 months, or the time from the last version,
whichever is less.
I think this would help because it would (hopefully) reduce the
trouble the Go team has had with orphan code, and would focus the new
efforts on getting a builder going s the price of entry.
ron