x86/module: use __GFP_UNMAPPED in module_alloc

The permissions of pages allocated by module_alloc() are frequently updated
using set_memory and set_direct_map APIs. Such permission changes cause
fragmentation of the direct map.

Since module_alloc() essentially wraps vmalloc(), the memory allocated by it
is mapped in the vmalloc area and it can be completely removed from the
direct map.

Use __GFP_UNMAPPED to utilize caching of unmapped pages done by the page
allocator.

Signed-off-by: Mike Rapoport <rppt@linux.ibm.com>
1 file changed