Thursday, February 01, 2007

On the horizon.

Some of the bigger changes that Suspend2 has had in a while are now in my git tree. It was recently posted on LKML that hotplugging of cpus can and should be done later (post drivers_suspend()). This in itself wouldn't be a big change. But now you have a second cpu up while writing the image, it would be a shame not to make use of it, wouldn't it?

So the code for doing I/O has been reworked so that multiple cores can be working simultaneously.
If your hard drive isn't significantly faster than your cpu(s), you won't see much difference, but where the drive and one or more cores have been sitting idle up until now, an improvement should be seen.

I still have a little work to do - compression support seems to have some concurrency issues still to be addressed, and I want to modify the lowlevel block i/o code so that the mutex for allocating buffer space is held for the minimum period possible.

The changes meant modifications to the image format. We use to know that the pages were compressed in pfn order, and so didn't have to include markers saying 'this is pfn n' or 'this page takes up n bytes in the image'. Now that pages can be stored out of order and multiple threads can be doing I/O, we do need the extra information. This in turn has implications for the storage allocation code (modifications to the calculations of how much storage is needed for x uncompressed pages). I've done that for the swap code, but not yet for the filewriter. So, a little more to do before I can release a 2.2.9.4.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home