Phillip Lougher wrote: > One-shot LZMA decoding therefore isn't going to work very well with > future versions of Squashfs, obviously a solution (as is currently done > with the Squashfs-LZMA patches) is to use separately allocated > contiguous input/output buffers, and memcpy into and out of them, but > this isn't particularly ideal. > > The discussion about using the output buffer as the temporary workspace > (as it isn't touched until after decompression is completely finished) > will work with the current version of Squashfs, but it isn't going to > work with later versions unless the LZMA code can be changed to work > with a list of discontiguous output buffers (i.e. a scatter-gather type > list). > > So it looks inevitable that a separately vmalloced workspace buffer will > be required. If the kernel has trouble even vmallocing 1MiB, the LZMA algorithm will need reworking to explicitly use discontiguous workspace buffers anyway, regardless of whether the output buffer is used as workspace. If the kernel can vmalloc 1MiB easily, then in principle it could map the discontiguous output buffer temporarily into a contiguous region of vmalloc address space, avoiding the allocation. Instead of memcpy, you'd have some cache coherency fun on some architectures. -- Jamie -- To unsubscribe from this list: send the line "unsubscribe linux-embedded" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html