From: Minfei Huang <mnfhuang@gmail.com>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: yalin wang <yalin.wang2010@gmail.com>,
tj@kernel.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 23:05:23 +0800 [thread overview]
Message-ID: <20150803150523.GA3116@t440s.lenovo> (raw)
In-Reply-To: <20150803100449.52f4dadb@gandalf.local.home>
On 08/03/15 at 10:04am, Steven Rostedt wrote:
> On Mon, 3 Aug 2015 17:15:53 +0800
> yalin wang <yalin.wang2010@gmail.com> wrote:
>
> > better to also provide a wrapper function with name schedule_on_each_cpu(),
> > as this function is used frequently .
> >
> > #define schedule_on_each_cpu(f) schedule_on_each_cpu_gfp(f, GFP_KERNEL)
>
> I was about to say pretty much the same thing. But please make it an
> inline function:
>
> static inline int schedule_on_each_cpu(work_func_t func)
> {
> return schedule_on_each_cpu_gfp(func, GFP_KERNEL);
> }
>
> Otherwise, NACK to the patch to the ftrace code.
Hi, Steve.
The main reason I posted this patch is to fix the data race bug, when
ftrace tries to free the ops->trampoline in arch x86.
Function schedule_on_each_cpu may fail to alloc percpu work to
synchronise each online cpu. In such situation, trying to free the
trampoline may casue the kernel crash, because one cpu may be executing
the trampoline at this moment.
So I add a new wrapper function to fix it.
Thanks
Minfei
next prev parent reply other threads:[~2015-08-03 15:05 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 [this message]
2015-08-03 14:16 ` 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=20150803150523.GA3116@t440s.lenovo \
--to=mnfhuang@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mhuang@redhat.com \
--cc=mingo@redhat.com \
--cc=rostedt@goodmis.org \
--cc=tj@kernel.org \
--cc=yalin.wang2010@gmail.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
all inboxes | Powered by JetHome®