Havoc's Blog

this blog contains blog posts

Kernel to userspace

Reading this thread on a
kernelspace keyring
, which I don’t pretend to know a lot about (I
was just curious from seeing the name of the patch in LWN, and found
the thread via google).

However, the thread shows how differently some kernel developers and
userspace developers are still thinking about problems. Linus
says
: “I’m just looking at how _well_ /sbin/hotplug has worked
out. I believe that it would have been a disaster done with a binary
messaging setup.” What??? We didn’t get any decent UI for hardware
working until we had a binary messaging setup! Of course I
realize that a script callout can send the binary message, and so
that’s fine, but we really do need the real messaging.

Looks like this thread also has the good old “let’s have some horrible
/proc thing instead of typesafe ABI-stable interfaces with
well-defined error handling.” Anyhow, don’t know how that patch
ended up when it was included, so maybe it all turned out well.

Someday I need to write down why I feel grumpy and hostile toward
text-based “API”, whether we’re talking about initscripts, tcl, or
/proc. It has to do with things such as 1) reporting errors, 2)
ability to write event-driven code, 3) ability to tell when your ABI
changes, 4) performance, 5) ability to have multiple threads/processes
involved sanely, 6) ability to extend an interface while keeping back
compat, 7) ability to keep UI code completely separate from “engine”
code, whether “UI” means tty or X, 8) keeping data and configuration
strongly separated from code, and 9) probably some other
things. Deserves some kind of long essay.

Don’t get me wrong, hooks that call out to scripts can be handy. But
it’s nice if the hooks are invoked by a larger system that’s a bit
more deterministic and well-defined than scripts usually are.

(This post was originally found at http://log.ometer.com/2004–10.html#23)

2004-09-21 (Tuesday)

Daniel
kicking ass supporting inotify, fixing rhgb, and the valgrinding. Now
to fix all those valgrind errors in metacity. 😉 Oddly enough, I was just
watching Seven Samurai on Sunday night. I’ve been a fan of the movie
since I read the book The
Last Samurai
(which has nothing to do with the Tom Cruise movie).

(This post was originally found at http://log.ometer.com/2004–09.html#21)

Volume Control

I get that some sound geeks care about things like “PCM,” but here is
the actual sequence I just went through:

  • Boot computer.
  • Open CD player.
  • No sound; note that volume applet is at 0, turn it up.
  • No sound; push the little volume buttons on the Thinkpad.
  • No sound; open volume control, turn up “PCM” — now it works!

This is just bogus. If the volume control says the volume is all
the way up, and the hardware cables are all connected, then I should
hear the CD. Period. There is just no excuse for having to hunt
through menus for Volume Control and twiddle some acronym-labeled
mysterious slider. I still can’t tell you what “PCM” even stands for.

Maybe the solution is to robustly default PCM to non-zero (is this
ALSA’s fault?); maybe the solution is to make the volume applet also
move PCM; I don’t know. But it is definitely broken if I’ve never
fooled with Volume Control, and I can have the volume applet at
nonzero, and not hear any sound. Who on earth would be sitting there
tweaking the volume applet, and want PCM to be at zero? That just IS
NOT USEFUL, folks. I’m not moving the slider just because sliders are
fun. If I’m moving the volume applet slider, I’m expecting the
volume to change
.

End rant.

(This post was originally found at http://log.ometer.com/2004–09.html#18)

Session Management, Notification Area

Mark discusses notification
area
and session
management
.

On notification area: I agree with Seth that the way to fix this
is to make it possible to programmatically add/remove applets with
sane results; essentially this means that applets autoposition
intelligently. I can imagine something like manually moving an applet
changes its “autoposition parameters” (left vs. right gravity, or “to
the left of some other applet”, or whatever these parameters are). So
you can still manually arrange applets, but removed applets remember
their last position in case they are re-added, and there’s a sensible
place to put a never-been-added applet.

Then maybe also do a real notification system like the one
tigert has screenshots for, with a clear spec and purpose other than
“you can put an icon in a tray.” I think the current notification area
spec is hopelessly broken in many ways, partly because there’s no
session management as Mark mentions, partly because it just sucks:
notification icons are worse than applets for applet-like things, and
they suck for doing notifications.

On the session manager, to me D‑BUS is the obvious answer for starting
desktop components. Just have a list of services to be activated on
login. Only “root node” services have to be manually launched, as
“dependency” services will be launched by the app that requires them.
Getting D‑BUS in GNOME 2.10 is a pretty reasonable goal.

(This post was originally found at http://log.ometer.com/2004–09.html#15)

Stateless Linux

Today we are announcing the stateless
Linux project
, the goal: a uniform framework to cover all common
ways of instantiating a centralized OS install read-only on multiple
physical or virtual computers. The details of instantiating the OS on
an individual computer may vary, from diskless to read-only local
cache to live CD. Because there’s no per-computer OS state we call it
“stateless Linux.” The stateless Linux project covers modifying the OS
itself to support the assumption that the running OS doesn’t
exclusively own the root filesystem (e.g. dynamic hardware detection
rather than machine-specific config files).
It also covers the various instantiation technologies such as
diskless, locally-cached, and live CD.

(This post was originally found at http://log.ometer.com/2004–09.html#13)

Open Source Software Subscriptions

When I end up explaining the same thing over and over, I try to get around to writing it down. So, pretty often I talk to someone who doesn’t track the open source world on a daily basis, and doesn’t understand the idea behind Red Hat Enterprise Linux: it’s a subscription, but to what?

Red Hat has several products sold via subscription. The OS, originally known as Red Hat Linux Advanced Server, is now known as Red Hat Enterprise Linux (with four variants: AS, ES, WS, and Red Hat Desktop). We’re using the same subscription approach to Red Hat applications on top of the OS, such as Cluster Suite and Application Server.

The way I think of it is: anyone can download the software from the Internet. Just go to kernel.org or SourceForge or wherever and grab the bits. What the subscription buys is all the work Red Hat adds on top of the bits. But what work is that? What do people here do all day?

Some of it is illustrated by Red Hat Enterprise Linux Update 3, which just came out. This includes:

  • New features, such as exec-shield
  • Security fixes
  • Bug fixes
  • New hardware support, so the OS runs out-of-the-box on the latest stuff you can get from hardware vendors
  • Each change is documented anddocumented again and tested by QA
  • Changes are done while preserving ABI compatibility, API compatibility, config file formats, and program semantics; in other words, rather than say wholesale upgrade to a new upstream version, the changes are carefully backported, or the new version carefully evaluated
  • When the changes are made, the same change is made on “HEAD” or upstream, to be included in future versions

In addition to the rolled-up mass updates, we have out-of-band single errata (for time sensitive security issues), and “hot fixes” delivered to specific customers.

These updates are a ton of work, because they don’t involve just downloading the latest version of everything; the fixes have to be backported and tested. It’s the difference between saying “to fix this security flaw, go from Apache 1.x to 2.0” and “to fix this security flaw, install this small patch to Apache 1.x.” We do this ongoing work for five to seven years, so if we release a new version annually, we’re building up to seven of these updates simultaneously. Needless to say, this isn’t trivial.

When I say “backporting” I’m contrasting it with two other approaches. One is the wholesale upgrade, and the other is permanent forking. Take the Enterprise Linux 3 kernel for example, which has many of the key features of the 2.6 kernel. Lots of patches. But when we moved to the 2.6 kernel, we dropped nearly all these patches without creating regressions in functionality. This way we meet customer demands quickly, but don’t create a long term problem for those same customers. (As an aside, time-based releases as in GNOME mean we only do small backports in updates, rather than large backports in the initial release as seen with the kernel…)

What else does Red Hat do all day?

  • Keep the same version of the software running on seven CPU architectures (again, we do backports, we don’t upgrade to whatever works)
  • A QA and release engineering process on all seven architectures
  • Develop new features, tracking a list of customer and partner requests and prioritizing features based on those requests
  • Recruiting and certifying ISVs, and modifying the OS to make their software work well
  • Certifying hardware platforms and devices
  • Standards-compliance and other certifications and benchmarks
  • Technical support, in-person, on the phone, via web and email
  • Documentation
  • Security errata, including tracking, fixing, and documenting each issue
  • Upstream maintenance duties for lots of open source software
  • Inclusion (on a separate CD) of some proprietary software packages that require licensing
  • Bandwidth to deliver updates and fixes (this costs a lot more than you might think)
  • A lengthy beta program, where we test the software for several months and collect partner, ISV, and customer feedback
  • Guarantee from a company that all of the above will happen

Every one of these things involves full-time Red Hat employees and costs money to provide. You could call the full list “support,” but I tend to avoid that term since it makes people think of calling someone on the phone for help. That’s part of it, but a supported, enterprise-class OS involves a lot more.

Another way to think of this can be found in this table contrasting Enterprise Linux and Fedora. Still, the delta between Enterprise Linux and the Fedora Project doesn’t show the full value of the subscription, because we do give a lot of our work away in the Fedora Core releases. Fedora contains our new feature development in real time, while that development is done. The integration work to convert hundreds of upstream packages into a working, compiled OS happens in a Fedora context as well. Even if you use Debian instead of Fedora Core, we’re always feeding a stream of features and fixes directly into upstream projects, and anyone can benefit from those.

It absolutely makes sense that we give away what we do, because what we’re giving away is the same kind of thing we receive from others: enhancements to the source code. We benefit from countless code contributions from around the world, and in turn everyone benefits from our code contributions.

I think the subscription model captures the original idea of an open source business very well. If you want just the software, here it is. If you want the software as a supported, vendor-backed product with everything that implies, we have that too. If you buy a subscription you benefit from the work that the company does; otherwise you don’t. Most importantly, if you can support yourself, or if you want to hire another company that can support you, go for it. Fortunately for Red Hat, many people let us do it for them.

Once it’s explained, most people seem pretty happy that our subscription approach is sensible and in the spirit of open source. (Unless they confused free speech and free beer from the start.) When someone remains unhappy, it often has to do with the exact product profiles and pricing. Taking the operating system for example, we slice-and-dice it into four versions (Desktop, WS, ES, and AS) and strip out the tech support for an Academic version. This is oversimplifying; we also have site licenses, volume pricing, and so on and so forth. I don’t pretend to be an expert on product pricing, but will just point out that it should be above the cost of producing the product, reflect what people are willing to pay, and is ideally kept a little bit simpler than plane ticket pricing. Hardly an exact science, and something that evolves over time.

One final aspect of the subscription I haven’t mentioned. The subscription is to the product line, not to a specific version. So if you buy an Enterprise Linux ES subscription, you can run 2.1, 3, or any future version using that subscription. We have no financial reason to force you to upgrade. The only time you’re required to upgrade is at the end of the product support lifetime of 5–7 years; even then, you can of course keep using the bits, if you can find someone to do security errata for you, or if the computer is not connected to the Internet.

(This post was originally found at http://log.ometer.com/2004–09.html#5)

Movies

Entertainment Weekly says we’re to the end of the summer movie season
and it’s true, the local theater looks worse than usual. Is it just me
or is this a really bad streak:

  • Anacondas: The Hunt for the Blood Orchid
  • Benji Off the Leash!
  • Exorcist: The Beginning
  • Superbabies: Baby Geniuses 2
  • Yu-Gi-Oh! The Movie

I concede that “Hunt for the Blood Orchid” is sort of a cool title, or
at least it beats “Anaconda 2” or “Return of the Anaconda” or
“Anacondas: Now Plural”

(This post was originally found at http://log.ometer.com/2004–08.html#28)

Red Hat Desktop Team Jobs

I have another job
listing
posted for desktop developers. This is the last round of
desktop hiring in the current planning horizon, so if you’ve been
procrastinating, now is the time.

(This post was originally found at http://log.ometer.com/2004–08.html#27)

2004-08-21 (Saturday)

Garrison
Keillor
:

What would you tell a good-hearted citizen who is seriously
considering casting their vote for Ralph Nader?

The thrill of Naderism is in telling your Democratic pals that you’re
thinking about ralphing and seeing them get all flushed and earnest
and wring their hands and roll their eyes and moan. Actually going
into the voting booth and ralphing is no great pleasure, compared to
the remorse you’ll feel if Mr. Bush is elected and fresh horrors begin
to unfold and the nadir is reached and the Bushies keep going down,
down, down. I say, Stand tall for Ralph, wear his button, wave his
flag, put on his cologne in the morning, be as ralphic as you like,
but in that private sacred moment, make your X for the Man.

(This post was originally found at http://log.ometer.com/2004–08.html#21)

Volume Control

Ronald,
looks better, but definitely need to lose the jargon. Someone
explained “PCM” to me once but I forgot. “ALSA” is also still in the
titlebar. Should the app be called volume control if it also has this
other stuff such as microphone and Options page? There is a
Preferences->Sound, should some stuff go there? When is the
microphone used, maybe the control for it could just appear in that
context? I don’t know what a “Mixer” is either, or why I would want to
change between two of them. (I’m not pretending to be ignorant for
dramatic effect here, I really don’t know, or know what PCM
means… and I would rather not have to learn.) Should this thing
really be a dialog, and lose the menubar? If there is a menu, why not
put Options in it (Edit->Preferences). Another thought, it would be
nice if when using the volume control applet, the sliders in this app
moved accordingly, so the relationship is visible. I’m not sure which
of these knobs the simple volume control applet controls.

Is it possible to turn off the speakers when headphones are plugged
in, and have the volume control applet control whichever one is
present? Then the three-slider thing could just go away. A lot of
stereo equipment works that way I think. Certainly an option to
consider would be volume applet for output, a sound record app (and
GnomeMeeting etc.) has the settings for input, and options are in the
Preferences->Sound dialog.

If keeping three tabs, tab names could be better than “Output” and
“Input” I bet, maybe “Volume,” “Microphone,” “Television”, “Other
Inputs” for example. Given a sane number of these things, having them
all on one page doesn’t seem crazy.

I don’t know what “Lock” or “Record” check boxes do, or when I would
use them. In the current gnome-volume-control there aren’t tooltips
either. But I’m guessing these are things an app that uses the sound
card such as a recorder or GnomeMeeting could transparently get right,
or present in a more logical context?

More questions than answers 😉 I guess the core thing is, start with
some user tasks, not with the list of flags and values the kernel
exports. Maybe have a look at Mac and Windows, can’t hurt.

(This post was originally found at http://log.ometer.com/2004–08.html#15)