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


Groups > linux.kernel > #1567315

Re: [PATCH 0/6 v3] kvmalloc

From Michal Hocko <mhocko@kernel.org>
Newsgroups linux.kernel
Subject Re: [PATCH 0/6 v3] kvmalloc
Date 2017-01-26 11:40 +0100
Message-ID <t3PDd-6bY-31@gated-at.bofh.it> (permalink)
References <t3AkO-5aQ-23@gated-at.bofh.it> <t3CcW-6rc-23@gated-at.bofh.it> <t3MYG-4yO-21@gated-at.bofh.it> <t3OH9-5Cz-35@gated-at.bofh.it> <t3Pa9-61W-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Thu 26-01-17 11:08:02, Michal Hocko wrote:
> On Thu 26-01-17 10:36:49, Daniel Borkmann wrote:
> > On 01/26/2017 08:43 AM, Michal Hocko wrote:
> > > On Wed 25-01-17 21:16:42, Daniel Borkmann wrote:
> [...]
> > > > I assume that kvzalloc() is still the same from [1], right? If so, then
> > > > it would unfortunately (partially) reintroduce the issue that was fixed.
> > > > If you look above at flags, they're also passed to __vmalloc() to not
> > > > trigger OOM in these situations I've experienced.
> > > 
> > > Pushing __GFP_NORETRY to __vmalloc doesn't have the effect you might
> > > think it would. It can still trigger the OOM killer becauset the flags
> > > are no propagated all the way down to all allocations requests (e.g.
> > > page tables). This is the same reason why GFP_NOFS is not supported in
> > > vmalloc.
> > 
> > Ok, good to know, is that somewhere clearly documented (like for the
> > case with kmalloc())?
> 
> I am afraid that we really suck on this front. I will add something.

So I have folded the following to the patch 1. It is in line with
kvmalloc and hopefully at least tell more than the current code.
---
diff --git a/mm/vmalloc.c b/mm/vmalloc.c
index d89034a393f2..6c1aa2c68887 100644
--- a/mm/vmalloc.c
+++ b/mm/vmalloc.c
@@ -1741,6 +1741,13 @@ void *__vmalloc_node_range(unsigned long size, unsigned long align,
  *	Allocate enough pages to cover @size from the page level
  *	allocator with @gfp_mask flags.  Map them into contiguous
  *	kernel virtual space, using a pagetable protection of @prot.
+ *
+ *	Reclaim modifiers in @gfp_mask - __GFP_NORETRY, __GFP_REPEAT
+ *	and __GFP_NOFAIL are not supported
+ *
+ *	Any use of gfp flags outside of GFP_KERNEL should be consulted
+ *	with mm people.
+ *
  */
 static void *__vmalloc_node(unsigned long size, unsigned long align,
 			    gfp_t gfp_mask, pgprot_t prot,
-- 
Michal Hocko
SUSE Labs

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


Thread

Re: [PATCH 0/6 v3] kvmalloc Alexei Starovoitov <alexei.starovoitov@gmail.com> - 2017-01-25 19:20 +0100
  Re: [PATCH 0/6 v3] kvmalloc Daniel Borkmann <daniel@iogearbox.net> - 2017-01-25 21:20 +0100
    Re: [PATCH 0/6 v3] kvmalloc Michal Hocko <mhocko@kernel.org> - 2017-01-26 08:50 +0100
      Re: [PATCH 0/6 v3] kvmalloc Daniel Borkmann <daniel@iogearbox.net> - 2017-01-26 10:40 +0100
        RE: [PATCH 0/6 v3] kvmalloc David Laight <David.Laight@ACULAB.COM> - 2017-01-26 10:50 +0100
        Re: [PATCH 0/6 v3] kvmalloc Michal Hocko <mhocko@kernel.org> - 2017-01-26 11:10 +0100
          Re: [PATCH 0/6 v3] kvmalloc Michal Hocko <mhocko@kernel.org> - 2017-01-26 11:40 +0100
            Re: [PATCH 0/6 v3] kvmalloc Daniel Borkmann <daniel@iogearbox.net> - 2017-01-26 12:10 +0100
              Re: [PATCH 0/6 v3] kvmalloc Michal Hocko <mhocko@kernel.org> - 2017-01-26 12:50 +0100
            Re: [PATCH 0/6 v3] kvmalloc Joe Perches <joe@perches.com> - 2017-01-26 13:20 +0100
              Re: [PATCH 0/6 v3] kvmalloc Michal Hocko <mhocko@kernel.org> - 2017-01-26 13:30 +0100
          Re: [PATCH 0/6 v3] kvmalloc Daniel Borkmann <daniel@iogearbox.net> - 2017-01-26 12:40 +0100
            Re: [PATCH 0/6 v3] kvmalloc Michal Hocko <mhocko@kernel.org> - 2017-01-26 13:00 +0100
              Re: [PATCH 0/6 v3] kvmalloc Daniel Borkmann <daniel@iogearbox.net> - 2017-01-26 14:20 +0100
                Re: [PATCH 0/6 v3] kvmalloc Michal Hocko <mhocko@kernel.org> - 2017-01-26 14:50 +0100
                Re: [PATCH 0/6 v3] kvmalloc Michal Hocko <mhocko@kernel.org> - 2017-01-26 15:20 +0100
                Re: [PATCH] net, bpf: use kvzalloc helper kbuild test robot <lkp@intel.com> - 2017-01-26 16:00 +0100
                Re: [PATCH 0/6 v3] kvmalloc Daniel Borkmann <daniel@iogearbox.net> - 2017-01-26 21:50 +0100
                Re: [PATCH 0/6 v3] kvmalloc Michal Hocko <mhocko@kernel.org> - 2017-01-27 11:20 +0100
                Re: [PATCH 0/6 v3] kvmalloc Daniel Borkmann <daniel@iogearbox.net> - 2017-01-27 22:00 +0100
                Re: [PATCH 0/6 v3] kvmalloc Michal Hocko <mhocko@kernel.org> - 2017-01-30 09:20 +0100
                Re: [PATCH 0/6 v3] kvmalloc Michal Hocko <mhocko@kernel.org> - 2017-01-30 17:40 +0100
                Re: [PATCH 0/6 v3] kvmalloc Daniel Borkmann <daniel@iogearbox.net> - 2017-01-30 18:20 +0100
                Re: [PATCH 0/6 v3] kvmalloc Daniel Borkmann <daniel@iogearbox.net> - 2017-01-30 18:20 +0100

csiph-web