From: Vikram Mulukutla <markivx@codeaurora.org>
To: Peter Zijlstra <peterz@infradead.org>
Cc: linux-kernel@vger.kernel.org, Ingo Molnar <mingo@kernel.org>,
Srivatsa Vaddagiri <vatsa@codeaurora.org>,
Steve Muckle <steve.muckle@linaro.org>,
Olav Haugan <ohaugan@codeaurora.org>,
Syed Rameez Mustafa <rameezmustafa@codeaurora.org>,
Joonwoo Park <joonwoop@codeaurora.org>,
Pavankumar Kondeti <pkondeti@codeaurora.org>,
Saravana Kannan <skannan@codeaurora.org>,
Bryan Huntsman <bryanh@codeaurora.org>,
Juri Lelli <juri.lelli@arm.com>,
Morten Rasmussen <morten.rasmussen@arm.com>,
Dietmar Eggemann <dietmar.eggemann@arm.com>,
Chris Redpath <chris.redpath@arm.com>,
Robin Randhawa <robin.randhawa@arm.com>,
Patrick Bellasi <patrick.bellasi@arm.com>,
Todd Kjos <tkjos@google.com>,
Srinath Sridharan <srinathsr@google.com>,
Andres Oportus <andresoportus@google.com>,
Leo Yan <leo.yan@linaro.org>,
Vincent Guittot <vincent.guittot@linaro.org>,
Vikram Mulukutla <markivx@codeauorora.org>
Subject: Re: [RFC PATCH 2/3] sched: Introduce Window-Assisted CPU utilization Tracking
Date: Fri, 28 Oct 2016 01:03:09 -0700 [thread overview]
Message-ID: <1841a9f1d3f56c38a71812b4a7b4e43e@codeaurora.org> (raw)
In-Reply-To: <20161028074616.GT3102@twins.programming.kicks-ass.net>
On 2016-10-28 00:46, Peter Zijlstra wrote:
> On Fri, Oct 28, 2016 at 12:10:41AM -0700, Vikram Mulukutla wrote:
>> +void walt_finish_migrate(struct task_struct *p, struct rq *dest_rq,
>> bool locked)
>> +{
>> + u64 wallclock;
>> + unsigned long flags;
>> +
>> + if (!p->on_rq && p->state != TASK_WAKING)
>> + return;
>> +
>> + if (locked == false)
>> + raw_spin_lock_irqsave(&dest_rq->lock, flags);
>> +
>
>> +
>> + if (locked == false)
>> + raw_spin_unlock_irqrestore(&dest_rq->lock, flags);
>> +}
>> +
>> +void walt_prepare_migrate(struct task_struct *p, struct rq *src_rq,
>> bool locked)
>> +{
>> + u64 wallclock;
>> + unsigned long flags;
>> +
>> + if (!p->on_rq && p->state != TASK_WAKING)
>> + return;
>> +
>> + if (locked == false)
>> + raw_spin_lock_irqsave(&src_rq->lock, flags);
>> +
>
>> +
>> + if (locked == false)
>> + raw_spin_unlock_irqrestore(&src_rq->lock, flags);
>> +}
>
> Seriously bad style that. Please, less bonghits before writing code.
This was my bad personal attempt at eliminating double-locking from the
original code.
This was pointed out earlier and shall go away once I can come up with a
way to merge
this into enqeue/dequeue sans bonghits :-)
next prev parent reply other threads:[~2016-10-28 8:03 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-28 7:10 [RFC PATCH 0/3] sched: Introduce Window Assisted Load Tracking Vikram Mulukutla
2016-10-28 7:10 ` [RFC PATCH 1/3] sched: Introduce structures necessary for WALT Vikram Mulukutla
2016-10-28 7:10 ` [RFC PATCH 2/3] sched: Introduce Window-Assisted CPU utilization Tracking Vikram Mulukutla
2016-10-28 7:38 ` Peter Zijlstra
2016-10-28 7:43 ` Peter Zijlstra
2016-10-28 7:58 ` Vikram Mulukutla
2016-10-28 7:46 ` Peter Zijlstra
2016-10-28 8:03 ` Vikram Mulukutla [this message]
2016-10-28 7:52 ` Peter Zijlstra
2016-10-28 7:10 ` [RFC PATCH 3/3] sched: Introduce WALT hooks into core and scheduling classes Vikram Mulukutla
2016-10-28 7:57 ` Peter Zijlstra
2016-10-28 7:29 ` [RFC PATCH 0/3] sched: Introduce Window Assisted Load Tracking Peter Zijlstra
2016-10-28 7:55 ` Vikram Mulukutla
2016-10-28 9:23 ` Peter Zijlstra
2016-10-28 7:49 ` Peter Zijlstra
2016-10-28 7:57 ` Vikram Mulukutla
2016-10-28 8:49 ` Peter Zijlstra
2016-10-31 15:07 ` Vikram Mulukutla
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=1841a9f1d3f56c38a71812b4a7b4e43e@codeaurora.org \
--to=markivx@codeaurora.org \
--cc=andresoportus@google.com \
--cc=bryanh@codeaurora.org \
--cc=chris.redpath@arm.com \
--cc=dietmar.eggemann@arm.com \
--cc=joonwoop@codeaurora.org \
--cc=juri.lelli@arm.com \
--cc=leo.yan@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=markivx@codeauorora.org \
--cc=mingo@kernel.org \
--cc=morten.rasmussen@arm.com \
--cc=ohaugan@codeaurora.org \
--cc=patrick.bellasi@arm.com \
--cc=peterz@infradead.org \
--cc=pkondeti@codeaurora.org \
--cc=rameezmustafa@codeaurora.org \
--cc=robin.randhawa@arm.com \
--cc=skannan@codeaurora.org \
--cc=srinathsr@google.com \
--cc=steve.muckle@linaro.org \
--cc=tkjos@google.com \
--cc=vatsa@codeaurora.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