Thursday, December 28, 2006

Upcoming changes to Suspend2.

Support for building suspend as modules will return in the next release. It was originally removed because I was seeking to get the code merged into the vanilla kernel. Since I don't reckon that's going to happen any time soon, I've decided to re-introduce the code. Building Suspend support as modules is primarily useful to embedded users, but it's also good for me - it means I can work on some changes without having to reboot to test.

I'm also beginning to add cluster support. The idea is that you can synchronise the suspending and resuming of a group of computers, controlling everything from a central node (the master). As I plan it at the moment, the master will have a kernel thread running that will open a socket for slaves to connect to. It will then send them commands, telling them to freeze processes, write the image, power down, report whether they have an image and so on as appropriate. The functionality should be particularly useful in a power outage, but could perhaps also be used to switch tasks (with the usual caveats about mounting filesystems).

The last new function is the ability to resume another image instead of powering down. This could be used in a lab environment. Imagine, for example, that users' home drives are mounted from a server with a file system that's well suited to breaking and resuming connections, such that the user could suspend to disk from one workstation and then log in from another and resume their previous image. (I'll ignore issues of ip addresses and so on, for the moment).
Wouldn't it be good if, when suspending, the system resumed another image that put you back at the log in screen, rather than rebooting or such like? The simplest scenario might be an individual computer, with completely separate installations of Linux, but a shared kernel image. (Cross-distro testing?). Of course I say completely separate installations because we still have the can't-mount-a-filesystem-mounted-in-another-image-unless-all-are-mounted-read-only problem.

Interestingly, in the history of Suspend2, this is the first time I've added features without being explicitly asked for them. (I asked on the cluster mailing list whether they'd find cluster support useful, though).

Wednesday, December 20, 2006

Suspend3?

Some people seem to have the strange idea that suspend-to-disk is just for laptops. Well, maybe that will change soon. In the meantime, the rest of us can use it on our desktops with gay abandon.

Speaking of which (suspending), finally saw suspend to ram working on my laptop yesterday, which in turn meant that I finally got to see what that code I wrote long ago (PowerdownMethod 3) looks like in action. I like!

I think it had something to do with dumping fglrx and discovering that PowerNow! is the cause of my white-screens-of-death. Having gotten rid of those two for the moment, I suddenly like my laptop a whole lot more. It will be nice to get PowerNow working properly (an AMD guy is aware of the issue and will look at it when he gets around to it), and it would be nice to be able to keep using Beryl (it's not just eye-candy!). At the end of the day, though, I want the computer to work and work reliably, and I want it to suspend to disk reliably.

So why did I put Suspend3 in the title? Yeah, suppose I'd better answer that question. I'm thinking about working towards a 3.0 release. But before I get there, Suspend2 might gain an important new feature; one that might even help break the 'only for laptops' mindset. I've emailed the cluster list on Redhat, asking if they're interested in being able to suspend clusters to disk. Think of a cluster working on some complex problem when the power goes out. You have UPSes, but they only last so long. You could fire up the generator (and probably will at the moment), but fuel can be expensive. Wouldn't it be great if the whole cluster could suspend-to-disk on UPS power, then resume when the power comes back on, all without you having to modify your applications at all for the purpose? Well, that might be in Suspend3. Or I might do it afterwards.

Friday, December 15, 2006

Christmas? What's that again?

My pastoral note for this week...

Only one week until Christmas! The poor posties are overburdened with catalogues, cards and packages. The tv, radio and newspapers are packed too, with ads encouraging us to buy this or that for Christmas. The wallets are emptying. The fridges are filling! Plans are being made to
get together, and in some cases the get-togethers have already happened.

What a busy time!

In all the busyness, it's possible for us to forget why we're doing all these things. So let's take a moment to sit down and think about the true meaning of Christmas.

It's not about having big parties or end of year break-ups. It's not about giving or receiving presents. It's not about letting family and friends know that you haven't fallen off the face of the earth quite yet. or about telling them what's happened in the past year, or about letting them know you still love them.

At it's heart, Christmas is about Christ. It's about the God who so loved His elect people - not just the physical descendants of Abraham but people from every tribe and tongue and nation - that He gave His one and only Son, so that those people, putting their faith and trust in His perfect atoning sacrifice, might not perish but have eternal life. It's about the fact that without Christ, we were and are completely helpless, dead spiritually, enemies of God. It's about God's grace toward us.

In the fullness of time, God sent His Son, born of a woman, born under the law, to redeem those under the law, that we might receive the full rights of sons. That's the true message of Christmas!

At this time, let's not forget those around us who are less fortunate than us. Some will be particularly lonely because of separation from loved ones. Some will go without because of poverty; this week I received a letter from Compassion highlighting the plight of those in
the Philippines who are still suffering after the recent typhoon. Some will celebrate the season without ever thinking of Christ.

Christmas is not just a time to celebrate what God has done for us. It is also a time to proclaim what He has done to those who don't yet know or believe.

Git trees.

Well, the number of git trees is slowly expanding. I now have ones for Ubuntu-2.6 and Ubuntu-edgy, 2.6.17.x, 18.x, 19.x and head.

My tools for keeping them up-to-date without killing myself in the process are slowing growing too. Over the last couple of weeks, I've slowly developed scripts that allow me to grab upstream modifications and automatically merge and upload where there aren't any conflicts. Thankfully that's the normal case. If a conflict occurs, I'm dropped to a shell where I can resolve conflicts, complete the merge and then press control-D to continue the process.

I guess I should work toward running this from a cron job, though resolving conflicts might not be so simple then.

Not much work done on actual code - been too busy with the milking course, preparations for Christmas and so on, though I did whip up a patch earlier in the week to clear the 'I've tried to resume from this before' flag in the image header if you press escape to cancel a resume.

Finally got around to reporting my PowerNow! problems to Dave Jones, too. He ended up putting me on to a couple of AMD guys. Perhaps I'll soon be able to have cpu frequency scaling and no white screens of death! Then my only wish will be for AMD to free up the fglrx source :)