mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Tejun Heo <tj@kernel.org>
To: Minfei Huang <mnfhuang@gmail.com>
Cc: rostedt@goodmis.org, mingo@redhat.com,
	linux-kernel@vger.kernel.org, mhuang@redhat.com
Subject: Re: [PATCH] workqueue: Add the allocation flags to function schedule_on_each_cpu_gfp
Date: Mon, 3 Aug 2015 10:16:59 -0400	[thread overview]
Message-ID: <20150803141659.GC32599@mtj.duckdns.org> (raw)
In-Reply-To: <1438590425-30307-1-git-send-email-mnfhuang@gmail.com>

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

      parent reply	other threads:[~2015-08-03 14:17 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-03  8:27 Minfei Huang
2015-08-03  9:15 ` yalin wang
2015-08-03 14:04   ` Steven Rostedt
2015-08-03 15:05     ` Minfei Huang
2015-08-03 14:16 ` Tejun Heo [this message]

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=20150803141659.GC32599@mtj.duckdns.org \
    --to=tj@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mhuang@redhat.com \
    --cc=mingo@redhat.com \
    --cc=mnfhuang@gmail.com \
    --cc=rostedt@goodmis.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

all inboxes | Powered by JetHome®