From: Peter Zijlstra <peterz@infradead.org>
To: Lei Wen <adrian.wenl@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>,
mingo@redhat.com, leiwen@marvell.com,
linux-kernel@vger.kernel.org
Subject: Re: Question regarding list_for_each_entry_safe usage in move_one_task
Date: Mon, 9 Sep 2013 13:15:08 +0200 [thread overview]
Message-ID: <20130909111508.GO31370@twins.programming.kicks-ass.net> (raw)
In-Reply-To: <CALZhoST+i8TOfQtu-z-bFrwmAVERZ6gHO1k_M_J24se8Hq_qyw@mail.gmail.com>
On Mon, Sep 02, 2013 at 02:26:45PM +0800, Lei Wen wrote:
> Hi Peter,
>
> I find one list API usage may not be correct in current fair.c code.
> In move_one_task function, it may iterate through whole cfs_tasks
> list to get one task to move.
>
> But in dequeue_task(), it would delete one task node from list
> without the lock protection. So that we could see from
> list_for_each_entry_safe API definitoin:
Both sites hold the required rq->lock.
next prev parent reply other threads:[~2013-09-09 11:15 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-02 6:26 Lei Wen
2013-09-09 11:15 ` Peter Zijlstra [this message]
2013-09-10 2:50 ` Lei Wen
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=20130909111508.GO31370@twins.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=adrian.wenl@gmail.com \
--cc=leiwen@marvell.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=mingo@redhat.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
Powered by JetHome