From: Andrew Morton <akpm@linux-foundation.org>
To: Chris Wilson <chris@chris-wilson.co.uk>
Cc: intel-gfx@lists.freedesktop.org,
David Rientjes <rientjes@google.com>,
Roman Peniaev <r.peniaev@gmail.com>,
Mel Gorman <mgorman@techsingularity.net>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] mm/vmap: Add a notifier for when we run out of vmap address space
Date: Mon, 28 Mar 2016 16:15:49 -0700 [thread overview]
Message-ID: <20160328161549.c77046847a8ae791cb436aff@linux-foundation.org> (raw)
In-Reply-To: <20160317134156.GX14143@nuc-i3427.alporthouse.com>
On Thu, 17 Mar 2016 13:41:56 +0000 Chris Wilson <chris@chris-wilson.co.uk> wrote:
> 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\
Hah.
Please move the forward declaration to top-of-file. This prevents
people from later adding the same thing at line 100 - this has happened
before.
Apart from that, all looks OK to me - please merge it via the DRM tree
if that is more convenient.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2016-03-28 23:15 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-17 11:59 [PATCH 1/2] mm/vmap: Add a notifier for when we run out of vmap address space Chris Wilson
2016-03-17 11:59 ` [PATCH 2/2] drm/i915/shrinker: Hook up vmap allocation failure notifier Chris Wilson
2016-03-17 12:37 ` [PATCH 1/2] mm/vmap: Add a notifier for when we run out of vmap address space Roman Peniaev
2016-03-17 12:57 ` Chris Wilson
2016-03-17 13:21 ` Roman Peniaev
2016-03-17 13:30 ` Chris Wilson
2016-03-17 13:34 ` [PATCH v2] " Chris Wilson
2016-03-17 13:41 ` Chris Wilson
2016-03-28 23:15 ` Andrew Morton [this message]
2016-03-29 8:16 ` [PATCH v3] " Chris Wilson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160328161549.c77046847a8ae791cb436aff@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=chris@chris-wilson.co.uk \
--cc=intel-gfx@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mgorman@techsingularity.net \
--cc=r.peniaev@gmail.com \
--cc=rientjes@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).