[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20201002141250.GH29330@paulmck-ThinkPad-P72>
Date: Fri, 2 Oct 2020 07:12:50 -0700
From: "Paul E. McKenney" <paulmck@...nel.org>
To: Michal Hocko <mhocko@...e.com>
Cc: rcu@...r.kernel.org, linux-kernel@...r.kernel.org,
kernel-team@...com, mingo@...nel.org, jiangshanlai@...il.com,
akpm@...ux-foundation.org, mathieu.desnoyers@...icios.com,
josh@...htriplett.org, tglx@...utronix.de, peterz@...radead.org,
rostedt@...dmis.org, dhowells@...hat.com, edumazet@...gle.com,
fweisbec@...il.com, oleg@...hat.com, joel@...lfernandes.org,
mgorman@...hsingularity.net, torvalds@...ux-foundation.org,
"Uladzislau Rezki (Sony)" <urezki@...il.com>
Subject: Re: [PATCH tip/core/rcu 14/15] rcu/tree: Allocate a page when caller
is preemptible
On Fri, Oct 02, 2020 at 08:57:46AM +0200, Michal Hocko wrote:
> On Thu 01-10-20 09:27:09, Paul E. McKenney wrote:
> [...]
> > commit ea5c19d21233b5e8d3d06c0d4ecd6be9f2829dc3
> > Author: Paul E. McKenney <paulmck@...nel.org>
> > Date: Thu Oct 1 09:24:40 2020 -0700
> >
> > kvfree_rcu: Use __GFP_NOMEMALLOC for single-argument kvfree_rcu()
> >
> > This commit applies the __GFP_NOMEMALLOC gfp flag to memory allocations
> > carried out by the single-argument variant of kvfree_rcu(), thus avoiding
> > this can-sleep code path from dipping into the emergency reserves.
> >
> > Suggested-by: Michal Hocko <mhocko@...e.com>
> > Signed-off-by: Paul E. McKenney <paulmck@...nel.org>
>
> LGTM. At least for this one I feel competent to give you
> Acked-by: Michal Hocko <mhocko@...e.com>
Thank you very much! I will apply this on the next rebase later today,
Pacific Time.
Thanx, Paul
> > diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c
> > index 242f0f0..6132452 100644
> > --- a/kernel/rcu/tree.c
> > +++ b/kernel/rcu/tree.c
> > @@ -3364,7 +3364,8 @@ add_ptr_to_bulk_krc_lock(struct kfree_rcu_cpu **krcp,
> > {
> > struct kvfree_rcu_bulk_data *bnode;
> > bool can_alloc_page = preemptible();
> > - gfp_t gfp = (can_sleep ? GFP_KERNEL | __GFP_RETRY_MAYFAIL : GFP_ATOMIC) | __GFP_NOWARN;
> > + gfp_t gfp = (can_sleep ? GFP_KERNEL | __GFP_RETRY_MAYFAIL | __GFP_NOMEMALLOC
> > + : GFP_ATOMIC) | __GFP_NOWARN;
> > int idx;
> >
> > *krcp = krc_this_cpu_lock(flags);
>
> --
> Michal Hocko
> SUSE Labs
Powered by blists - more mailing lists