From: chenqiwu <qiwuchen55@gmail.com>
To: Vincent Guittot <vincent.guittot@linaro.org>
Cc: Ingo Molnar <mingo@redhat.com>,
Peter Zijlstra <peterz@infradead.org>,
Juri Lelli <juri.lelli@redhat.com>,
Dietmar Eggemann <dietmar.eggemann@arm.com>,
Steven Rostedt <rostedt@goodmis.org>,
Ben Segall <bsegall@google.com>, Mel Gorman <mgorman@suse.de>,
linux-kernel <linux-kernel@vger.kernel.org>,
chenqiwu <chenqiwu@xiaomi.com>
Subject: Re: [PATCH] sched/fair: add !se->on_rq check before dequeue entity
Date: Thu, 20 Feb 2020 22:42:51 +0800 [thread overview]
Message-ID: <20200220144251.GA15604@cqw-OptiPlex-7050> (raw)
In-Reply-To: <CAKfTPtBS=HhBvp2ps1SZXc--WoXO_ZOY=+5o7RJ9vDgi9eLAqA@mail.gmail.com>
>
> Hmm i have been too quick in my reply. I wanted to say:
> AFAICT, there is no other way to dequeue a task from a cfs_rq for
> which the group entity is not enqueued
But we should notice the potential racy pathes called by deactivate_task().
For example:
One path is dequeue a task from its cfs_rq called by schedule():
__schedule
deactivate_task
dequeue_task
dequeue_task_fair
Another path is trying to migrate the same task to a CPU on the preferred node:
numa_migrate_preferred
task_numa_migrate
migrate_swap
stop_two_cpus
migrate_swap_stop
__migrate_swap_task
deactivate_task
dequeue_task_fair
There could be a racy if the task is dequeued form its cfs_rq in parallel.
prev parent reply other threads:[~2020-02-20 14:42 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-20 7:29 [PATCH] sched/fair: add !se->on_rq check before dequeue entity qiwuchen55
2020-02-20 9:38 ` Vincent Guittot
2020-02-20 10:09 ` chenqiwu
2020-02-20 10:31 ` Vincent Guittot
2020-02-20 12:15 ` Vincent Guittot
2020-02-20 14:42 ` chenqiwu [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=20200220144251.GA15604@cqw-OptiPlex-7050 \
--to=qiwuchen55@gmail.com \
--cc=bsegall@google.com \
--cc=chenqiwu@xiaomi.com \
--cc=dietmar.eggemann@arm.com \
--cc=juri.lelli@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mgorman@suse.de \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=vincent.guittot@linaro.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