Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1359865

Re: [PATCH v2] mm/vmap: Add a notifier for when we run out of vmap address space

From Chris Wilson <chris@chris-wilson.co.uk>
Newsgroups linux.kernel
Subject Re: [PATCH v2] mm/vmap: Add a notifier for when we run out of vmap address space
Date 2016-03-17 14:50 +0100
Message-ID <rdGtj-844-7@gated-at.bofh.it> (permalink)
References <rdEKS-6X2-27@gated-at.bofh.it> <rdGjE-80w-35@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Thu, Mar 17, 2016 at 01:34:59PM +0000, Chris Wilson wrote:
> vmaps are temporary kernel mappings that may be of long duration.
> Reusing a vmap on an object is preferrable for a driver as the cost of
> setting up the vmap can otherwise dominate the operation on the object.
> However, the vmap address space is rather limited on 32bit systems and
> so we add a notification for vmap pressure in order for the driver to
> release any cached vmappings.
> 
> The interface is styled after the oom-notifier where the callees are
> passed a pointer to an unsigned long counter for them to indicate if they
> have freed any space.
> 
> v2: Guard the blocking notifier call with gfpflags_allow_blocking()
> 
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Andrew Morton <akpm@linux-foundation.org>
> Cc: David Rientjes <rientjes@google.com>
> Cc: Roman Peniaev <r.peniaev@gmail.com>
> Cc: Mel Gorman <mgorman@techsingularity.net>
> Cc: linux-mm@kvack.org
> Cc: linux-kernel@vger.kernel.org
> ---
>  include/linux/vmalloc.h |  4 ++++
>  mm/vmalloc.c            | 27 +++++++++++++++++++++++++++
>  2 files changed, 31 insertions(+)
> 
> diff --git a/include/linux/vmalloc.h b/include/linux/vmalloc.h
> index d1f1d338af20..edd676b8e112 100644
> --- a/include/linux/vmalloc.h
> +++ b/include/linux/vmalloc.h
> @@ -187,4 +187,8 @@ pcpu_free_vm_areas(struct vm_struct **vms, int nr_vms)
>  #define VMALLOC_TOTAL 0UL
>  #endif
>  
> +struct notitifer_block;
Omg. /o\
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 1/2] mm/vmap: Add a notifier for when we run out of vmap address space Chris Wilson <chris@chris-wilson.co.uk> - 2016-03-17 13:00 +0100
  [PATCH 2/2] drm/i915/shrinker: Hook up vmap allocation failure notifier Chris Wilson <chris@chris-wilson.co.uk> - 2016-03-17 13:10 +0100
  Re: [PATCH 1/2] mm/vmap: Add a notifier for when we run out of vmap  address space Roman Peniaev <r.peniaev@gmail.com> - 2016-03-17 13:40 +0100
    Re: [PATCH 1/2] mm/vmap: Add a notifier for when we run out of vmap  address space Roman Peniaev <r.peniaev@gmail.com> - 2016-03-17 14:30 +0100
      Re: [PATCH 1/2] mm/vmap: Add a notifier for when we run out of vmap  address space Chris Wilson <chris@chris-wilson.co.uk> - 2016-03-17 14:40 +0100
    Re: [PATCH 1/2] mm/vmap: Add a notifier for when we run out of vmap  address space Chris Wilson <chris@chris-wilson.co.uk> - 2016-03-17 14:30 +0100
  [PATCH v2] mm/vmap: Add a notifier for when we run out of vmap address space Chris Wilson <chris@chris-wilson.co.uk> - 2016-03-17 14:40 +0100
    Re: [PATCH v2] mm/vmap: Add a notifier for when we run out of vmap  address space Chris Wilson <chris@chris-wilson.co.uk> - 2016-03-17 14:50 +0100
      Re: [PATCH v2] mm/vmap: Add a notifier for when we run out of vmap  address space Andrew Morton <akpm@linux-foundation.org> - 2016-03-29 01:20 +0200
        [PATCH v3] mm/vmap: Add a notifier for when we run out of vmap address space Chris Wilson <chris@chris-wilson.co.uk> - 2016-03-29 10:20 +0200

csiph-web