From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
To: Qiang Huang <h.huangqiang@huawei.com>
Cc: Steven Rostedt <rostedt@goodmis.org>,
Thomas Gleixner <tglx@linutronix.de>,
linux-rt-users <linux-rt-users@vger.kernel.org>,
Li Zefan <lizefan@huawei.com>,
zhangwei <jovi.zhangwei@huawei.com>,
bitbucket@online.de
Subject: Re: [PATCH] sched: don't clear PF_THREAD_BOUND in select_fallback_rq
Date: Fri, 7 Jun 2013 22:59:17 +0200 [thread overview]
Message-ID: <20130607205917.GA3395@linutronix.de> (raw)
In-Reply-To: <20130607205048.GA22550@linutronix.de>
* Sebastian Andrzej Siewior | 2013-06-07 22:50:48 [+0200]:
>* Qiang Huang | 2013-04-25 17:01:18 [+0800]:
>
>>select_fallback_rq() is called and PF_THREAD_BOUND is cleared. In my
>>box, 1/3 bounded kernel threads will clear that flag after boot.
>
>Please tell me _which_ threads lose this flag. I don't see this…
The only way I lose this flag is by starting a workqueue on a CPU which
if offline. Now that is wrong. I am not sure if the workqueue re-uses
the "idle" workers later. In the up path it sets the CPU mask and
PF_THREAD_BOUND is usually set (unless it was lost due to
select_fallback_rq()). So we can set this back on:
Subject: [PATCH] kernel/workqueue: Add PF_THREAD_BOUND after set_cpu
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
---
kernel/workqueue.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/kernel/workqueue.c b/kernel/workqueue.c
index 11285e4..aff5841 100644
--- a/kernel/workqueue.c
+++ b/kernel/workqueue.c
@@ -1637,8 +1637,10 @@ __acquires(&gcwq->lock)
* it races with cpu hotunplug operation. Verify
* against GCWQ_DISASSOCIATED.
*/
- if (!(gcwq->flags & GCWQ_DISASSOCIATED))
+ if (!(gcwq->flags & GCWQ_DISASSOCIATED)) {
set_cpus_allowed_ptr(task, get_cpu_mask(gcwq->cpu));
+ task->flags |= PF_THREAD_BOUND;
+ }
spin_lock_irq(&gcwq->lock);
if (gcwq->flags & GCWQ_DISASSOCIATED)
--
1.7.10.4
Do you see any other?
Sebastian
--
To unsubscribe from this list: send the line "unsubscribe linux-rt-users" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2013-06-07 20:59 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-25 9:01 [PATCH] sched: don't clear PF_THREAD_BOUND in select_fallback_rq Qiang Huang
2013-05-03 20:46 ` Sebastian Andrzej Siewior
2013-05-03 22:39 ` Luis Claudio R. Goncalves
2013-05-05 6:38 ` Qiang Huang
2013-05-05 14:44 ` Sven-Thorsten Dietrich
2013-05-06 0:49 ` Li Zefan
2013-05-06 10:44 ` Qiang Huang
2013-05-14 13:08 ` Luis Claudio R. Goncalves
2013-06-21 10:48 ` Sebastian Andrzej Siewior
2013-06-07 20:50 ` Sebastian Andrzej Siewior
2013-06-07 20:59 ` Sebastian Andrzej Siewior [this message]
2013-06-22 3:27 ` Qiang Huang
2013-06-28 11:57 ` Sebastian Andrzej Siewior
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=20130607205917.GA3395@linutronix.de \
--to=bigeasy@linutronix.de \
--cc=bitbucket@online.de \
--cc=h.huangqiang@huawei.com \
--cc=jovi.zhangwei@huawei.com \
--cc=linux-rt-users@vger.kernel.org \
--cc=lizefan@huawei.com \
--cc=rostedt@goodmis.org \
--cc=tglx@linutronix.de \
/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;
as well as URLs for NNTP newsgroup(s).