mirror of
https://gitee.com/bianbu-linux/linux-6.6
synced 2025-04-26 14:17:26 -04:00
[PATCH] vmalloc: optimization, cleanup, bugfixes
- reorder 'struct vm_struct' to speedup lookups on CPUS with small cache lines. The fields 'next,addr,size' should be now in the same cache line, to speedup lookups. - One minor cleanup in __get_vm_area_node() - Bugfixes in vmalloc_user() and vmalloc_32_user() NULL returns from __vmalloc() and __find_vm_area() were not tested. [akpm@osdl.org: remove redundant BUG_ONs] Signed-off-by: Eric Dumazet <dada1@cosmosbay.com> Cc: Nick Piggin <nickpiggin@yahoo.com.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
parent
088406bcf6
commit
2b4ac44e7c
2 changed files with 15 additions and 14 deletions
|
@ -23,13 +23,14 @@ struct vm_area_struct;
|
|||
#endif
|
||||
|
||||
struct vm_struct {
|
||||
/* keep next,addr,size together to speedup lookups */
|
||||
struct vm_struct *next;
|
||||
void *addr;
|
||||
unsigned long size;
|
||||
unsigned long flags;
|
||||
struct page **pages;
|
||||
unsigned int nr_pages;
|
||||
unsigned long phys_addr;
|
||||
struct vm_struct *next;
|
||||
};
|
||||
|
||||
/*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue