From: Michal Hocko <mhocko@kernel.org>
To: Tahsin Erdogan <tahsin@google.com>
Cc: Tejun Heo <tj@kernel.org>, Christoph Lameter <cl@linux.com>,
Andrew Morton <akpm@linux-foundation.org>,
Chris Wilson <chris@chris-wilson.co.uk>,
Andrey Ryabinin <aryabinin@virtuozzo.com>,
Roman Pen <r.peniaev@gmail.com>,
Joonas Lahtinen <joonas.lahtinen@linux.intel.com>,
zijun_hu <zijun_hu@htc.com>, Joonsoo Kim <iamjoonsoo.kim@lge.com>,
David Rientjes <rientjes@google.com>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 3/3] percpu: improve allocation success rate for non-GFP_KERNEL callers
Date: Mon, 27 Feb 2017 20:47:11 +0100 [thread overview]
Message-ID: <20170227194711.GS26504@dhcp22.suse.cz> (raw)
In-Reply-To: <CAAeU0aNVMf6KD7oHNOjzZNqHwBDBpkpx1mtT1O4HipUv1CeLDQ@mail.gmail.com>
On Mon 27-02-17 11:32:50, Tahsin Erdogan wrote:
> >> >
> >> > Yes, this prevents adding more pcpu chunks and so cause "atomic" allocations
> >> > to fail more easily.
> >>
> >> Then I fail to see what is the problem you are trying to fix.
> >
> > To be more specific. Could you describe what more can we do in the
> > vmalloc layer for GFP_NOWAIT allocations? They certainly cannot sleep
> > and cannot perform the reclaim so you have to rely on the background
> > work.
>
> The main problem that I am trying to fix is in percpu.c code. It
> currently doesn't even attempt to call vmalloc() for GFP_NOWAIT
> case. It solely relies on the background allocator to replenish the
> reserves. I would like percpu.c to call __vmalloc(GFP_NOWAIT) inline
> and see whether that succeeds. If that fails, it is fair to fail the
> call.
OK, that wasn't really clean from the patch to me. I guess it would be
much more easier if a preparatory patch did the gfp mask propagation and
then have patch that changes the pcpu allocator the way you need.
> For this to work, __vmalloc() should be ready to serve a caller
> that is holding a spinlock. The might_sleep() in alloc_vmap_area()
> basically prevents us calling vmalloc in this context.
--
Michal Hocko
SUSE Labs
--
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:[~2017-02-27 19:47 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-25 21:00 [PATCH " Tahsin Erdogan
2017-02-25 23:54 ` kbuild test robot
2017-02-26 0:48 ` kbuild test robot
2017-02-26 4:38 ` [PATCH v2 " Tahsin Erdogan
2017-02-27 9:52 ` Michal Hocko
2017-02-27 13:00 ` Tahsin Erdogan
2017-02-27 15:25 ` Michal Hocko
2017-02-27 17:01 ` Tahsin Erdogan
2017-02-27 17:07 ` Michal Hocko
2017-02-27 17:14 ` Michal Hocko
2017-02-27 19:32 ` Tahsin Erdogan
2017-02-27 19:47 ` Michal Hocko [this message]
2017-02-27 19:51 ` Tejun Heo
2017-02-27 20:27 ` Tahsin Erdogan
2017-02-27 20:29 ` Tejun Heo
2017-02-27 20:37 ` Tahsin Erdogan
2017-02-27 20:45 ` Tejun Heo
2017-02-27 21:12 ` Tahsin Erdogan
2017-02-27 21:28 ` Tejun Heo
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=20170227194711.GS26504@dhcp22.suse.cz \
--to=mhocko@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=aryabinin@virtuozzo.com \
--cc=chris@chris-wilson.co.uk \
--cc=cl@linux.com \
--cc=iamjoonsoo.kim@lge.com \
--cc=joonas.lahtinen@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=r.peniaev@gmail.com \
--cc=rientjes@google.com \
--cc=tahsin@google.com \
--cc=tj@kernel.org \
--cc=zijun_hu@htc.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