[PATCH] Add a gzip fastpath for the xmalloc readers, v3

Lauri Kasanen curaga at operamail.com
Sun Nov 30 20:32:24 UTC 2014


v3: Use the aux struct as requested by Denys
v2: Add missing check on open

The performance and number of processes for a "depmod -a" with gzipped
modules was abysmal. This patch adds a fast path without fork for well-
behaved gzip files, benefiting all users of xmalloc_open_zipped_read_close.

"modinfo radeon.ko.gz", a single-file reader, got 30% faster.
"depmod -a", which used to fork over 800 times, got 20% faster. And of course
a whole lot less processes -> much saved RAM.

function                                             old     new   delta
inflate_unzip_internal                              2304    2521    +217
xmalloc_open_zipped_read_close                        73     201    +128
unpack_gz_stream                                     567     570      +3
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 3/0 up/down: 348/0)             Total: 348 bytes

-- 
http://www.fastmail.com - Does exactly what it says on the tin

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 0001-Add-a-gzip-fastpath-for-the-xmalloc-readers-v3.patch
URL: <http://lists.busybox.net/pipermail/busybox/attachments/20141130/89350d37/attachment-0001.ksh>


More information about the busybox mailing list