Car

We bought a used car. Ford Fiesta 2003 (American cars are cheaper), gray. Four wheels. Now all I need to do is learn how to drive.

GVFS Progress

Alexander Larsson has been hacking like a whirlwind, bringing us the next generation in VFS services for the desktop, GVFS. By now, a lot of the planned functionality is done, and we even have a partially done FUSE frontend which will let legacy apps that can’t or won’t link with GVFS access the user’s mounts under ~/.vfs/.

Alex’ master repository does not have the FUSE module yet, so you can get it from my repository in the meantime.

Unfortunately, the SMB backend is pretty flaky, frequently locking up when reading directory information or file data from remote shares. So if you’re a debugging hotshot and you want to help bring desktop file browsing to the next level, here’s your chance!

GVFS is pretty easy to set up and test:

  • Clone, build, install to $prefix.
  • Make sure you have a working D-Bus setup.
  • Make sure you have the FUSE kernel module installed.
  • mkdir ~/.vfs
  • $prefix/libexec/gvfs-daemon
  • $prefix/libexec/gvfs-fuse-daemon -f ~/.vfs
  • $prefix/bin/gvfs-mount smb://server/share

The new mount should show up under ~/.vfs/, and you can explore it from there.

Cumbia sí, trabajo no

Last week was a pretty busy one. I spent part of it in Mexico City, seeing friends and looking for some computer gear I needed. Everyone’s talking about the new abortion legislation that will legalize the practice in the Federal District (the state that contains a large part of the city). The progressives, although (arguably) losing the presidential election, hold a majority of seats there and have struck back with legalized gay marriage, and now this. The church and other conservatives have, predictably, made a lot of fuss over being dragged into last century. Even the pope has contributed his share of outrage. I say congratulations, DF - it’s about time.

paolita-leo.jpg

Paolita and Leo in the DF

Only two days after the above picture was taken, Paolita suffered a burglary in which she lost most of her computing equipment (read: livelihood). Since she’s an independent contractor, she’s counting on finishing her current job to pay for new stuff.

On Thursday, Leo and I set course for Poza Rica, where we’d been invited to give talks at their FLISOL arrangement. The plan had been for Paolita to come with us, but sadly, the above turn of events left her without the time and money to do so. We started out making good time, but found the highway blocked by a trailer crash, and had to backtrack a couple of kilometers for the “scenic route”. It was slow due to ongoing road work, but at least it wasn’t jammed with cars - apparently we were the only ones with a map.

highway-blocked.jpg

Blocked highway

alternate-route-blocked.jpg

Alternate route

All in all, getting there took about twice as long as we’d hoped, and once in Poza Rica we found that our talks had been postponed to Friday. We got to know the local Linuxeros - an excellent gang.

poza-rica-gang.jpg

Poza Rica gang

From left to right, that’s Leo, Adlair, the waitress, Marco, Christian, Xochitl and Jorge.

Although the event didn’t turn out exactly as hoped, we got to do the talks and there seemed to be some interest. The slides and source for mine are available. It’s a tiny project that illustrates how to get started writing and distributing free desktop software. It’s called “PopoMon”, and is a web-scraping taskbar alert level monitor for the volcano we all know and love, Popocatepetl.

On Saturday I was back home, and on Sunday we were invited to visit our neighbors and friends, Omar and Silvia, at their cabin. It’s located in the woods on the outskirts of Xalapa, less than an hour away by car. Once you leave the city, things change quickly:

xalapa-outskirts-house.jpg

Peace and quiet

xalapa-outskirts-road.jpg

More Xalapa countryside

omar-silvia-cabin.jpg

Omar and Silvia

hp-maru-cabin.jpg

Me and Maru

maru-in-tree.jpg

Maru inside of a big ol’ tree

People were raising and serving fish nearby, using water diverted from a river. We ate some. It wasn’t at all bad.

fish-in-a-pool.jpg

Fish in a pool

fish-in-a-bucket.jpg

Fish in a bucket

Bicycle

I bought a bicycle.

Bicycle

Robust with a couple of gears, reasonably priced. Unfortunately, there was not a single one for sale that didn’t have front-wheel suspension. Apparently you can only get “urban bikes” without suspension, and they are - irrationally - not in season. Oh well. I’m pretty happy with it anyway. It’s been about 8 years since I last owned a vehicle, and I’d totally forgotten the thrill of speed and the satisfaction of putting momentum and gravity to work for you.

Priorities

In addition to the kernel’s per-process CPU and I/O priorities, it would be nice to have memory residency priorities. That way, we could hint the kernel into keeping proportionally more pages of latency-sensitive desktop processes in RAM - like the main menu, the taskbar, the file manager and maybe some applets. Disk cache could have its own priority, a la the swappiness setting in /proc/sys/vm/swappiness. It could be a practical* way to mitigate the “my main menu takes several seconds from click to paint” problem.

* Since I’m not a kernel dev, I’m just guessing here.

In Norway

norway-evening.jpg

Dark. About zero degrees. No snow.

Well Situated, Friendly Neighborhood

Ben has some good news for anyone interested in reducing the memory usage of Linux programs. Smaps is great. But does it tell the whole truth?

For PCs with (basically) limitless swap space, it’s possible that it doesn’t even come close. The reason: Under memory pressure, only memory pages that are actually being accessed will be kept in main memory. These pages are usually 4kB each. So how much of a hog your process will be is determined by its access pattern. Which brings us to our dear old friend, Locality. It’s easy enough to deduce that a process with many tiny, frequently accessed memory blocks sprinkled in between “low urgency” blocks over a lot of pages will be a disaster compared to a process with frequently-accessed data allocated close together.

So, it’s possible that an even better measure of a process’ memory badness would be a running count of “number of different pages accessed in the last 10 seconds”, possibly with a falloff function (think load average). Maybe this could be done with a Valgrind tool, a la Cachegrind but for VM pages instead of CPU cache lines? Maybe it could even tell you where the N most frequently accessed memory blocks were allocated, and for each block, provide a list of locations where it was accessed (sorted by time last accessed or by frequency).

That sounds like a fun project!

Happy Revolution Day

In preparation for tomorrow’s Mexican Revolution Day, federal police today hosed down a peaceful demonstration for women’s rights with water and tear gas (hard to find coverage in English). This in Oaxaca, where autocrat governor Ulises Ruiz has stated that “only God can install or remove authorities”, receiving blessings from the church. Several demonstrators and media representatives have been killed in the ongoing conflict.

Session-wide valgrind

Now that we know that even Evolution runs under Valgrind, we need a bigger challenge. So, how about the entire GNOME session?

I’ve written a couple of tiny scripts that lower the threshold to doing this. They take care of properly launching your session in Valgrind, collecting (and filtering slightly) the resulting logs and cleaning up (important, since you can get lots of lingering valgrind processes if you don’t).

I made an OpenSuSE package (for the 10.2 beta, possibly 10.1) that integrates this functionality as a pair of standard GDM sessions that you can select on login. Just click “Session” in the login screen and select one of the GNOME Valgrind ones, then log in using that. When you log out, it’ll generate a log file in “$HOME/valgrind-session.$N”.

The generated reports from a typical session say something about our code quality. Especially the leak report is interesting - the log file, after everything but “definite leaks” (i.e. allocated blocks to which no pointers exist, neither to the beginning nor to an internal offset) is removed, is about 2MB for a login + immediate logout here. Even though there are many repetitions and fairly harmless leaks, there are some serious-looking ones in there:

[~] grep “definitely” valgrind-session.0 | wc -l
1104

Just install and restart GDM. At least one billion bytes of RAM recommended to run.

Not everything works in an instrumented session (su, sudo definitely don’t, and I’ve had problems with “recent items” and logging out using the slab - remedied by adding a logout button to your panel), but overall it’s not bad. You can browse the web, read mail, use Nautilus, customize your desktop, launch applications (which will themselves be instrumented) etc.

If you like proactive bug fixing (and have fairly powerful hardware), I encourage you to check it out and maybe even improve on the concept (there’s a lot that could be done).

El Laberinto del Fauno

Yesterday, Maru and I saw El Laberinto del Fauno at the cinema. Highly recommended. Although the movie has fantasy elements and the main character is a child, I would say it’s definitely not for children. I.e. it’s not in the “Harry Potter” category which can be enjoyed by both children and adults. This is for adults only, and it contains plenty of graphic violence to underscore that fact.

I won’t say any more. If you - unlike IMDB trolls - can come to terms with it a) not being in English and b) being “leftist-liberal” for portraying fascists as, er, fascists, go see it.