lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 28 Oct 2016 01:03:09 -0700
From:   Vikram Mulukutla <markivx@...eaurora.org>
To:     Peter Zijlstra <peterz@...radead.org>
Cc:     linux-kernel@...r.kernel.org, Ingo Molnar <mingo@...nel.org>,
        Srivatsa Vaddagiri <vatsa@...eaurora.org>,
        Steve Muckle <steve.muckle@...aro.org>,
        Olav Haugan <ohaugan@...eaurora.org>,
        Syed Rameez Mustafa <rameezmustafa@...eaurora.org>,
        Joonwoo Park <joonwoop@...eaurora.org>,
        Pavankumar Kondeti <pkondeti@...eaurora.org>,
        Saravana Kannan <skannan@...eaurora.org>,
        Bryan Huntsman <bryanh@...eaurora.org>,
        Juri Lelli <juri.lelli@....com>,
        Morten Rasmussen <morten.rasmussen@....com>,
        Dietmar Eggemann <dietmar.eggemann@....com>,
        Chris Redpath <chris.redpath@....com>,
        Robin Randhawa <robin.randhawa@....com>,
        Patrick Bellasi <patrick.bellasi@....com>,
        Todd Kjos <tkjos@...gle.com>,
        Srinath Sridharan <srinathsr@...gle.com>,
        Andres Oportus <andresoportus@...gle.com>,
        Leo Yan <leo.yan@...aro.org>,
        Vincent Guittot <vincent.guittot@...aro.org>,
        Vikram Mulukutla <markivx@...eauorora.org>
Subject: Re: [RFC PATCH 2/3] sched: Introduce Window-Assisted CPU utilization
 Tracking

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 :-)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ