From: David Woodhouse Date: Fri, 10 Apr 2009 05:04:07 +0000 (-0700) Subject: firmware: speed up request_firmware(), v3 X-Git-Tag: v2.6.31-rc1~366^2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6e03a201bbe8137487f340d26aa662110e324b20;p=pandora-kernel.git firmware: speed up request_firmware(), v3 Rather than calling vmalloc() repeatedly to grow the firmware image as we receive data from userspace, just allocate and fill individual pages. Then vmap() the whole lot in one go when we're done. A quick test with a 337KiB iwlagn firmware shows the time taken for request_firmware() going from ~32ms to ~5ms after I apply this patch. [v2: define PAGE_KERNEL_RO as PAGE_KERNEL where necessary, use min_t()] [v3: kunmap() takes the struct page *, not the virtual address] Signed-off-by: David Woodhouse Tested-by: Sachin Sant --- Reading git-diff-tree failed