On Tue, Aug 29, 2006 at 07:48:25AM +1000, Nigel Cunningham wrote: > For Suspend2, we ended up converting the LZF support to a cryptoapi > plugin. Is there any chance that you could use cryptoapi modules? We > could then have a hope of sharing the support. > Using cryptoapi plugins for the compression methods is an interesting approach, there's a few other places in the kernel that could probably benefit from this as well, such as jffs2 (which at the moment rolls its own compression subsystem), and the out-of-tree page and swap cache compression work.
Assuming you were wrapping in to LZF directly prior to the cryptoapi integration, do you happen to have before and after numbers to determine how heavyweight the rest of the cryptoapi overhead is? It would be interesting to profile this and consider migrating the in-tree users, rather than duplicating the compress/decompress routines all over the place.