All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Wilson <chris@chris-wilson.co.uk>
To: Roman Peniaev <r.peniaev@gmail.com>
Cc: intel-gfx@lists.freedesktop.org,
	Andrew Morton <akpm@linux-foundation.org>,
	David Rientjes <rientjes@google.com>,
	Mel Gorman <mgorman@techsingularity.net>,
	linux-mm@kvack.org,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/2] mm/vmap: Add a notifier for when we run out of vmap address space
Date: Thu, 17 Mar 2016 12:57:36 +0000	[thread overview]
Message-ID: <20160317125736.GT14143@nuc-i3427.alporthouse.com> (raw)
In-Reply-To: <CACZ9PQX+E2LscOGyVQ4xZNK3qdYYotq4HiyGc8o+YwoNi-w1Hg@mail.gmail.com>

On Thu, Mar 17, 2016 at 01:37:06PM +0100, Roman Peniaev wrote:
> > +       freed = 0;
> > +       blocking_notifier_call_chain(&vmap_notify_list, 0, &freed);
> 
> It seems to me that alloc_vmap_area() was designed not to sleep,
> at least on GFP_NOWAIT path (__GFP_DIRECT_RECLAIM is not set).
> 
> But blocking_notifier_call_chain() might sleep.

Indeed, I had not anticipated anybody using GFP_ATOMIC or equivalently
restrictive gfp_t for vmap and yes there are such callers.

Would guarding the notifier with gfp & __GFP_DIRECT_RECLAIM and
!(gfp & __GFP_NORETRY) == be sufficient? Is that enough for GFP_NOFS?
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre

WARNING: multiple messages have this Message-ID (diff)
From: Chris Wilson <chris@chris-wilson.co.uk>
To: Roman Peniaev <r.peniaev@gmail.com>
Cc: intel-gfx@lists.freedesktop.org,
	Andrew Morton <akpm@linux-foundation.org>,
	David Rientjes <rientjes@google.com>,
	Mel Gorman <mgorman@techsingularity.net>,
	linux-mm@kvack.org,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/2] mm/vmap: Add a notifier for when we run out of vmap address space
Date: Thu, 17 Mar 2016 12:57:36 +0000	[thread overview]
Message-ID: <20160317125736.GT14143@nuc-i3427.alporthouse.com> (raw)
In-Reply-To: <CACZ9PQX+E2LscOGyVQ4xZNK3qdYYotq4HiyGc8o+YwoNi-w1Hg@mail.gmail.com>

On Thu, Mar 17, 2016 at 01:37:06PM +0100, Roman Peniaev wrote:
> > +       freed = 0;
> > +       blocking_notifier_call_chain(&vmap_notify_list, 0, &freed);
> 
> It seems to me that alloc_vmap_area() was designed not to sleep,
> at least on GFP_NOWAIT path (__GFP_DIRECT_RECLAIM is not set).
> 
> But blocking_notifier_call_chain() might sleep.

Indeed, I had not anticipated anybody using GFP_ATOMIC or equivalently
restrictive gfp_t for vmap and yes there are such callers.

Would guarding the notifier with gfp & __GFP_DIRECT_RECLAIM and
!(gfp & __GFP_NORETRY) == be sufficient? Is that enough for GFP_NOFS?
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre

--
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>

  reply	other threads:[~2016-03-17 13:25 UTC|newest]

Thread overview: 27+ 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 ` Chris Wilson
2016-03-17 11:59 ` Chris Wilson
2016-03-17 11:59 ` [PATCH 2/2] drm/i915/shrinker: Hook up vmap allocation failure notifier Chris Wilson
2016-03-17 11:59   ` 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:37   ` Roman Peniaev
2016-03-17 12:57   ` Chris Wilson [this message]
2016-03-17 12:57     ` Chris Wilson
2016-03-17 13:21     ` Roman Peniaev
2016-03-17 13:21       ` Roman Peniaev
2016-03-17 13:30       ` Chris Wilson
2016-03-17 13:30         ` Chris Wilson
2016-03-17 13:34 ` [PATCH v2] " Chris Wilson
2016-03-17 13:34   ` Chris Wilson
2016-03-17 13:34   ` Chris Wilson
2016-03-17 13:41   ` Chris Wilson
2016-03-17 13:41     ` Chris Wilson
2016-03-28 23:15     ` Andrew Morton
2016-03-28 23:15       ` Andrew Morton
2016-03-29  8:16       ` [PATCH v3] " Chris Wilson
2016-03-29  8:16         ` Chris Wilson
2016-03-29  8:16         ` Chris Wilson
2016-03-18  7:03 ` ✗ Fi.CI.BAT: failure for series starting with [v2] mm/vmap: Add a notifier for when we run out of vmap address space (rev2) Patchwork
2016-03-29  8:34 ` ✗ Fi.CI.BAT: failure for series starting with [v3] mm/vmap: Add a notifier for when we run out of vmap address space (rev3) Patchwork
2016-03-29 12:51   ` Marius Vlad
2016-03-29 12:56     ` 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=20160317125736.GT14143@nuc-i3427.alporthouse.com \
    --to=chris@chris-wilson.co.uk \
    --cc=akpm@linux-foundation.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.