From: "Vlastimil Babka (SUSE)" <vbabka@kernel.org>
To: Daniel Vetter <daniel.vetter@ffwll.ch>,
LKML <linux-kernel@vger.kernel.org>
Cc: DRI Development <dri-devel@lists.freedesktop.org>,
Daniel Vetter <daniel.vetter@intel.com>,
Andrew Morton <akpm@linux-foundation.org>,
linux-mm@kvack.org
Subject: Re: [PATCH 3/3] mm/mempool: use might_alloc()
Date: Tue, 14 Jun 2022 15:08:34 +0200 [thread overview]
Message-ID: <bdcb78c1-eeda-d9e2-90fc-527bda8dd28c@kernel.org> (raw)
In-Reply-To: <20220605152539.3196045-3-daniel.vetter@ffwll.ch>
On 6/5/22 17:25, Daniel Vetter wrote:
> mempool are generally used for GFP_NOIO, so this wont benefit all that
> much because might_alloc currently only checks GFP_NOFS. But it does
> validate against mmu notifier pte zapping, some might catch some
> drivers doing really silly things, plus it's a bit more meaningful in
> what we're checking for here.
>
> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
> Cc: Andrew Morton <akpm@linux-foundation.org>
> Cc: linux-mm@kvack.org
Reviewed-by: Vlastimil Babka <vbabka@suse.cz>
> ---
> mm/mempool.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/mm/mempool.c b/mm/mempool.c
> index b933d0fc21b8..96488b13a1ef 100644
> --- a/mm/mempool.c
> +++ b/mm/mempool.c
> @@ -379,7 +379,7 @@ void *mempool_alloc(mempool_t *pool, gfp_t gfp_mask)
> gfp_t gfp_temp;
>
> VM_WARN_ON_ONCE(gfp_mask & __GFP_ZERO);
> - might_sleep_if(gfp_mask & __GFP_DIRECT_RECLAIM);
> + might_alloc(gfp_mask);
>
> gfp_mask |= __GFP_NOMEMALLOC; /* don't allocate emergency reserves */
> gfp_mask |= __GFP_NORETRY; /* don't loop in __alloc_pages */
next prev parent reply other threads:[~2022-06-14 13:08 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-05 15:25 [PATCH 1/3] mm/page_alloc: use might_alloc() Daniel Vetter
2022-06-05 15:25 ` [PATCH 2/3] mm/slab: delete cache_alloc_debugcheck_before() Daniel Vetter
2022-06-07 12:59 ` David Hildenbrand
2022-06-12 23:00 ` David Rientjes
2022-06-13 3:21 ` Muchun Song
2022-06-14 13:05 ` Vlastimil Babka
2022-06-05 15:25 ` [PATCH 3/3] mm/mempool: use might_alloc() Daniel Vetter
2022-06-14 13:08 ` Vlastimil Babka (SUSE) [this message]
2022-06-07 12:57 ` [PATCH 1/3] mm/page_alloc: " David Hildenbrand
2022-06-14 13:07 ` Vlastimil Babka (SUSE)
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=bdcb78c1-eeda-d9e2-90fc-527bda8dd28c@kernel.org \
--to=vbabka@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=daniel.vetter@ffwll.ch \
--cc=daniel.vetter@intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
/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).