Skip to content
Commit 6e03a201 authored by David Woodhouse's avatar David Woodhouse Committed by David Woodhouse
Browse files

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: default avatarDavid Woodhouse <David.Woodhouse@intel.com>
Tested-by: default avatarSachin Sant <sachinp@in.ibm.com>
parent 091bf762
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment