[PATCH 1/3] vmalloc: Add __vmalloc_node_try_addr function

2018-07-06 Thread Rick Edgecombe
Create __vmalloc_node_try_addr function that tries to allocate at a specific address and supports caller specified behavior for whether any lazy purging happens if there is a collision. Signed-off-by: Rick Edgecombe --- include/linux/vmalloc.h | 3 + mm/vmalloc.c| 174 +

Re: [PATCH 1/3] vmalloc: Add __vmalloc_node_try_addr function

2018-06-21 Thread Edgecombe, Rick P
On Wed, 2018-06-20 at 15:26 -0700, Matthew Wilcox wrote: > Not needed: > > void warn_alloc(gfp_t gfp_mask, nodemask_t *nodemask, const char > *fmt, ...) > { > ... > if ((gfp_mask & __GFP_NOWARN) || !__ratelimit(&nopage_rs)) > return; > Yes, thanks!

Re: [PATCH 1/3] vmalloc: Add __vmalloc_node_try_addr function

2018-06-20 Thread Randy Dunlap
On 06/20/2018 04:05 PM, Kees Cook wrote: > On Wed, Jun 20, 2018 at 3:44 PM, Randy Dunlap wrote: >> On 06/20/2018 03:35 PM, Kees Cook wrote: >>> On Wed, Jun 20, 2018 at 3:16 PM, Randy Dunlap wrote: On 06/20/2018 03:09 PM, Rick Edgecombe wrote: > +void *__vmalloc_node_try_addr(unsigned lon

Re: [PATCH 1/3] vmalloc: Add __vmalloc_node_try_addr function

2018-06-20 Thread Kees Cook
On Wed, Jun 20, 2018 at 3:44 PM, Randy Dunlap wrote: > On 06/20/2018 03:35 PM, Kees Cook wrote: >> On Wed, Jun 20, 2018 at 3:16 PM, Randy Dunlap wrote: >>> On 06/20/2018 03:09 PM, Rick Edgecombe wrote: +void *__vmalloc_node_try_addr(unsigned long addr, unsigned long size, +

Re: [PATCH 1/3] vmalloc: Add __vmalloc_node_try_addr function

2018-06-20 Thread Randy Dunlap
On 06/20/2018 03:35 PM, Kees Cook wrote: > On Wed, Jun 20, 2018 at 3:16 PM, Randy Dunlap wrote: >> On 06/20/2018 03:09 PM, Rick Edgecombe wrote: >>> +void *__vmalloc_node_try_addr(unsigned long addr, unsigned long size, >>> + gfp_t gfp_mask, pgprot_t prot, unsigned long vm_flag

Re: [PATCH 1/3] vmalloc: Add __vmalloc_node_try_addr function

2018-06-20 Thread Kees Cook
On Wed, Jun 20, 2018 at 3:16 PM, Randy Dunlap wrote: > On 06/20/2018 03:09 PM, Rick Edgecombe wrote: >> +void *__vmalloc_node_try_addr(unsigned long addr, unsigned long size, >> + gfp_t gfp_mask, pgprot_t prot, unsigned long vm_flags, >> + int node, const vo

Re: [PATCH 1/3] vmalloc: Add __vmalloc_node_try_addr function

2018-06-20 Thread Matthew Wilcox
On Wed, Jun 20, 2018 at 03:09:28PM -0700, Rick Edgecombe wrote: > > /** > + * __vmalloc_try_addr - try to alloc at a specific address > + * @addr: address to try > + * @size: size to try > + * @gfp_mask: flags for the page level allocator > + * @prot:

Re: [PATCH 1/3] vmalloc: Add __vmalloc_node_try_addr function

2018-06-20 Thread Randy Dunlap
On 06/20/2018 03:09 PM, Rick Edgecombe wrote: > Create __vmalloc_node_try_addr function that tries to allocate at a specific > address. The implementation relies on __vmalloc_node_range for the bulk of > the > work. To keep this function from spamming the logs when an allocation failure > is fai

[PATCH 1/3] vmalloc: Add __vmalloc_node_try_addr function

2018-06-20 Thread Rick Edgecombe
Create __vmalloc_node_try_addr function that tries to allocate at a specific address. The implementation relies on __vmalloc_node_range for the bulk of the work. To keep this function from spamming the logs when an allocation failure is fails, __vmalloc_node_range is changed to only warn when __G