[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150803141659.GC32599@mtj.duckdns.org>
Date: Mon, 3 Aug 2015 10:16:59 -0400
From: Tejun Heo <tj@...nel.org>
To: Minfei Huang <mnfhuang@...il.com>
Cc: rostedt@...dmis.org, mingo@...hat.com,
linux-kernel@...r.kernel.org, mhuang@...hat.com
Subject: Re: [PATCH] workqueue: Add the allocation flags to function
schedule_on_each_cpu_gfp
On Mon, Aug 03, 2015 at 04:27:05PM +0800, Minfei Huang wrote:
> Rename the function schedule_on_each_cpu to schedule_on_each_cpu_gfp to
> add the allocation flags as parameter.
>
> In several situation in ftrace, we are nervous and never come back, once
> schedule_on_each_cpu fails to alloc the percpu work. Add the allocation
> flags __GFP_NOFAIL to guarantee it.
I don't know the context well here but new usages of __GFP_NOFAIL are
strongly frowned upon. __GFP_NOFAIL was introduced to replace
explicit infinite allocation loops and its main purpose is marking
"this site is broken and a deadlock possibility, somebody please
figure out how to fix it". After all, retrying over and over again
can't possibly guarantee to create more memory. Maybe the constant
should be renamed to something more vulgar.
So, please reconsider.
Thanks.
--
tejun
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists