It’s Alive!

32-bit userland in KVM

That is totem playing an ogg in a Gnome desktop in KVM on my 32bit-userland image.  It works!  Woo hoo!

Now all that’s left is to try it on real hardware, and figure out why the kernel fails to build.

32bit-userland on Gentoo amd64

For the past couple of weeks, I’ve been working on getting 32bit-userland working on Gentoo amd64.  It’s at least partly working now;  it boots, you can log in, and I’m in the process of emerging gnome.

However, it’s not a smooth road.  I had to use catalyst to make my own stages.  No amount of massaging or editing or copying or screaming got me from a 64-bit stage3 to a 32bit-userland.  In addition, there’s something wrong with my toolchain somehwere.  I can’t build sandbox, for example, and had to use a binpkg from my 64-bit system.  Also, the kernel fails to build it’s config programs, so I can’t configure a kernel.

Finally, there are a number of broken packages; that is, packages that detect in some way or another what bitness they think you’re running and then use ASM coded for that.  This, obviously, fails.  Fortunately, this is so far only 3 packages: glib, libgcrypt, and mesa.  We’ll see how many more I hit before I get a working system.

Just a note: I’m not posting any of my profiles yet.  It’s not yet working, and it’s not for faint of heart.  If you are really interested, give me a ping on IRC and I’ll see if I can help you.  Otherwise, just wait until I can lick it into shape.

Closest Book Meme

Okay, the meme has finally reached Planet Gentoo, so here’s my entry.

  • Grab the nearest book.
  • Open it to page 56.
  • Find the fifth sentence.
  • Post the text of the sentence in your journal along with these instructions.
  • Don’t dig for your favorite book, the cool book, or the intellectual one: pick the CLOSEST.

Now, there’s some question as to what constitutes a “book”.  Do the ebooks on my n810 in my pocket count?  If so, what’s a “page”?  And which one is “closest”?  How about the ISO spec sitting next to me?  Does that count?  I’m going to go with “no” for all of those, and go for the closest bound, published book.  Since I’m at work, this is a technical book.

(Note: this is page 57, as 56 is blank)

The address conversion functions convert between a text representation of an address and the binary value that goes into a socket address structure.

This is from “UNIX Network Programming” by Stevens.

Bravo, Nokia!

My Nokia n810 had been having screen issues for a couple of months now.  Specifically, the touchscreen had been flakey.  Usually, this means that taps went to places other than where I tapped, and I had to constantly re-calibrate the touchscreen.  Quite annoying, to say the least.  However, occasionally, and increasingly frequently, the touchscreen had just stopped accepting taps.  Some combination of opening and closing the screen, pressing on spots, and sometimes even powering off and on would eventually fix it.

Notice all the past tense there.  Since my n810 was bought end of November in 2007, it’s still in it’s 1-year warranty.  Since the end of that warranty was approaching fast, I decided to bite the bullet, and RMA it.  In about a week, I have a nice, fixed n810.  No hassle, no fuss.  Thanks, Nokia!

Android is Open

Okay, now Android is Open.   Congrats, Google.

How long for a port to the Nokia Internet Tablet family (preferably the 770)?  Anyone?  :P

The Developer-User machine divide

I just had an epiphany.  Well, not really, but an interesting thought, at least.

Computers are getting faster, and more capable.  In particular, the amount of RAM available to computers has increased in leaps and bounds.  My first computer (and IBM PCjr) had 64K of RAM, and that was part of an expensive upgrade from the default.  The laptop I’m typing this on has 2G of RAM, and the workstations sitting next to it have 4G and 6G respectively.  That’s a huge increase, over the past 25 years.

However, in my daily use of my laptop, 2G doesn’t seem to be enough.  After a few days of uptime, my free RAM (defined on Linux as the amount used by disk cache, rather than the amount actually free, since RAM is basically never actually free) drops below 100M.  This is not an acceptible amount of disk cache, and it causes my machine to slow way down, and even to go into swap storms sometimes.  If I then go and emerge something written in C++, I trigger the OOM killer.  On a 2G box.  How does this happen?

One posited (and believeable) reason is the Developer-User machine divide.  The reasoning goes thus:

Software development is a resource intensive operation.  Compilers, debuggers, emulators, and so on, take lots of CPU and RAM to run fast.  Developers are rather high paid individuals.  Thus, most companies maximize ROI by getting developers large, fast development machines, so they don’t spend all their time waiting for tools to execute.  Similarly, FOSS developers tend to spring for decent development boxes if they possibly can, because software development quickely becomes painful on low end boxes.  Naturally, if a developer has a large, fast development box, they’re going to use it whenever they can, for normal, day-to-day tasks.

Typical users, on the other hand, have (by definition) average machines.  They tend to be middle-to-low end, with much less CPU, RAM, and disk than a typical developer machine.   (Unless it’s a gaming rig, of course, which ends up way in the top end for similar reasons to developers having good boxes).  This means that the box a developer typically uses for day-to-day activities (mail, browsing, chatting, office, and so on) tends to be faster and have more RAM than the box a typical end user has.   This is the Developer-User machine divide.

I’ve read a number of posited solutions to this.  The most common is that developers should use “typical” boxes for day-to-day activities, rather than their development machines.  This is not going to happen.  First off, if you have a choice of 2 computers, one of which is much faster, you’re going to use the fast one, right?  Second, especially for FOSS, developers typically don’t have the funds  to have multiple machines like this.  Any extra machines I have, for example, are typically either old dev machines that are below even the average curve and run my network, or specialized machines (say my elisa box) which cannot be used day-to-day.   I’m going to use my laptop (which, granted, is not a beefy as my workstations at work, but is still, even 1.5 years later, beefier than anything any of my relatives have).

So, my reasoning went like this:  We need a little daemon that lurks in the background, sucking up RAM and keeping your CPU at it’s lowest frequency, until it detects software development in progress.  Then, it should free up RAM (temoprarily, of course) and jack up the CPU frequency, so that development happens fast.  When development is done, it lowers the CPU again, and sucks RAM back up.  This, of course, is problematic, difficult, and easily open to abuse (say a tight-loop script of gcc niced).

Then it hit me: a VM is the perfect solution.  It’s slower by it’s very nature, and it can have strictly limited RAM.  Developers should run their day-to-day programs in a VM!  Then, they can allocate, say 512M of RAM to the VM, and leave the rest outside for normal development activities.  Granted, this leaves it open for cheating, but at least developers would start to feel the pain of normal users, start to bridge the machine divide.

Will this happen?  Probably not, at least not on a large scale.  Many developers, of course, already develop in a virtual machine of some variety, for other reasons (need Windows on Linux or vice versa, for example).  But in general, the first reason why developers don’t already use slow machines applies, and many developers (myself included) don’t have the time to track down complex time/space trade offs in complex software (I’m looking at you, Evolution!) to make their VM’d selves happy.

Will I do it? Again, probably not.  This is because my primary development is Gentoo maintenance.  This means that I can’t isolate my development to outside my VM, since I’d need to keep the VM itself up-to-date with ~arch software.  I’ll think about solutions, but there may not be a good one (maybe distcc to the host box?).  Additionally, the majority of my development work for FOSS is packaging software for Gentoo, which means I don’t usually do much actual development on that software, and what I generally do is bug fixing, not in-depth development.  Then again, maybe I will do it, just to force myself to dig into these issues.  It certainly could be a useful experiment.

Now, the question is: how do I get my VM to gracefully recover when my video doesn’t resume?  :P

Question for the Lazy-Web:

Has this been done?  Are there tools for syncing, switching, backing up, and so on?  Does, for example, VMware do this internally?

Anya

Well, we had the ultrasound today, and she’s going to be a girl.  Anya, is what we decided on.  We haven’t decided on a middle name yet.

Sorry, Ruth.  No boys.

Android not open?

Robert:

I just read the license agreement for the Android SDK 1.0 release 1.  It’s definitely not open, by any definition of open I can come up with.

1. I can only use it to develop for Android.  At the moment, I don’t have an Android device, and therefore couldn’t care less about Android.  I do have an n810, and would love to play with it there.

2. I ” may not copy (except for backup purposes), modify, adapt, redistribute, decompile, reverse engineer, disassemble, or create derivative works of the SDK or any part of the SDK”.  This means no porting Android to another device, or modifying it in any way.

3.  I “may not load any part of the SDK onto a mobile handset or any other hardware device except a personal computer”.  This is the oddest restriction of all.  I can’t use it to develop software for an android phone?  At any rate, no porting for me.

Okay, none of this applies to open source licensed components.  Lets see what I can actually use:

1. The kernel (woo hoo!  I can get the kernel elsewhere)

2. webkit.  I have this on my laptop already.

3. An android emulator.  That’s something, I guess.

4. An eclipse plugin.  I don’t use eclipse.

Until enough of Android is release open source to be useful, you can hardly claim that Android is “open”.  I’m still holding out hope.  I honestly hope that Android is released.  But until it is, I can’t in good conscience get an Android phone.

What I would really like to see is a port of Android (or at least it’s UI) to the Nokia internet tablets.  Too bad that’s not possible.

KVM in the tree

That’s right, kvm-70 just hit portage.  Go hit a rsync mirror near you!

What’s kvm, you ask?  Some kind of virtual keyboard/mouse thingy?  No, it’s the Kernel Virtual Machine.  It’s basically like vmware.  It’s actually a modified qemu that uses hardware virtualization (and only hardware virtualization; if you don’t have Intel VT or AMD-V, then use qemu or something else).  It’s fast, it’s featureful, but it’s not exactly user friendly, at least not without help.

In the coming weeks, the Gentoo Virtualization team will get libvirt and the associated front ends working for it.  That should up the user-friendly factor a fair amount.

Thanks Cardoe (cardoe) and Tiziano (dev-zero), the kvm co-maintainers with me, who did a lot of the work getting this ready for the tree.

Epic Fail, again

 D&D 4 is coming out, and it’s supposed to be a huge change from previous versions.  I love D&D, so I’m curious.

The Penny Arcade guys teamed up with the PvP guy to play the new version and chronical the game in comics and a podcast.  I love Penny Arcade, so this interests me.

So, I go to the site (hosted at Wizard’s of the Coast).  Guess what?  You need an account to view the set.  Fail.  I have to sign up and give personal information (at least a working email address, and I don’t know what else, more later) to view what amounts to advertising for D&D 4?

Okay, so I finally decide to bite the bullet and fork over an address to get an account.  What am I greated with?

Epic Fail

Epic Fail.  Guess I don’t get to see them afterall, and I’m slightly less likely to care about D&D 4.