Dan Stole the Subject for My Farewell
I had been thinking of what subject line to use for my farewell post, as my internship has come to an end - back to school. Halfway through last week I picked the perfect farewell subject line. Unfortunately, Dan used the Hitchhiker's Guide reference I'd settled on when he left last Friday. He should be most of the way back to the east coast now (he's driving). I've got a plane to catch early Tuesday morning. I started thinking about Spinal Tap references for the title, but nothing quite fitting came to mind.
My project is pretty much wrapped up for me, the code's cleaned up, and is now getting some wider attention from people other than Steve. And while waiting for feedback, I spent some time looking at a P2 panic that appeared Wednesday morning, which revealed an odd API quirk and an inconsistency in counting the number of CPUs available to a zone. These bugs, and my project RFEs have been transferred to Steve.
I've had a good time here, and I may be back after I graduate in May. Thanks to all the folks I've met here at Sun for showing me a good time, and teaching me a lot. I'm heading back to school having signed the OpenSolaris contributor agreement, so if I have any spare time at school, I may keep working on OpenSolaris while there. In fact one of the projects I passed on initially, which I later found myself wanting was prototyped by two people previously, but needs a bit of work, and was just posted as a new project on opensolaris.org, and I'm thinking of jumping into that.
As soon as I leave, my login account goes away, so this will be the last entry in this blog. I'm [colin at cs dot brown dot edu], or [colin dot s dot gordon at gmail dot com], and I'll keep blogging at http://ahamsandwich.wordpress.com/.
Posted by csg [Personal] ( August 17, 2007 04:19 PM ) Permalink | Comments[0]
Favorite Comments and Constants in OpenSolaris Source
While perusing the code for OpenSolaris, my fellow interns and I have come across some great comments, variable names, and documentation, as any large code base must inevitably have:- usr/src/uts/common/os/clock.c: "If the TOD chip isn't giving correct time, then set it to the time that was passed in as a rough estimate. If we don't have an estimate, then set the clock back to a time when Oliver North, ALF and Dire Straits were all on the collective brain: 1987." (Found by Dan)
- usr/src/uts/i86pc/os/machdep.c: "This routine is almost correct now, but not quite." (also from Dan)
- usr/src/uts/common/os/condvar.c: Regarding
cv_wait_stop(), "This is a horrible kludge. It is evil. It is vile. It is swill. If your code has to call this function then your code is the same." - usr/src/uts/common/sys/dumphdr.h: The magic number at the start of all core dumps:
#define DUMP_MAGIC 0xdefec8edU /* dump magic number */
- usr/src/lib/watchmalloc/common/malloc.c: While poking around in mdb, I printed the words at the end of an array and found
0xbaddcabband0xfeedface. So I opened the OS source browser, searched, and found:/* * Patterns to be copied into freed blocks and allocated blocks. * 0xfeedbeef and 0xfeedface are invalid pointer values in all programs. */ static uint64_t patterns[2] = { 0xdeadbeefdeadbeefULL, /* pattern in a freed block */ 0xbaddcafebaddcafeULL /* pattern in an allocated block */ }; - Earlier today I found out that the Solaris libc defines a struct uberdata. It ends up being used on the sly in the psig command.
- For a good time, follow
int bsd_evil_hackthrough the grub source.
Posted by csg [Personal] ( August 01, 2007 02:58 PM ) Permalink | Comments[1]
