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:	Thu, 25 Jun 2015 16:30:31 +0100
From:	Sudeep Holla <sudeep.holla@....com>
To:	Thomas Gleixner <tglx@...utronix.de>
CC:	Sudeep Holla <sudeep.holla@....com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Suzuki Poulose <Suzuki.Poulose@....com>,
	Lorenzo Pieralisi <Lorenzo.Pieralisi@....com>,
	Catalin Marinas <Catalin.Marinas@....com>,
	"Rafael J. Wysocki" <rafael.j.wysocki@...el.com>,
	Preeti U Murthy <preeti@...ux.vnet.ibm.com>
Subject: Re: [PATCH] clockevents: return error from tick_broadcast_oneshot_control
 if !GENERIC_CLOCKEVENTS_BROADCAST



On 25/06/15 14:55, Thomas Gleixner wrote:
> On Thu, 25 Jun 2015, Sudeep Holla wrote:
>
>> tick_broadcast_enter returns 0 when CPU can switch to broadcast
>> timer and non-zero otherwise. However when GENERIC_CLOCKEVENTS_BROADCAST
>> and TICK_ONESHOT are disabled, tick_broadcast_oneshot_control returns 0
>> which indicates to the CPUIdle framework that the CPU can enter deeper
>> idle states even when the CPU local timer will be shutdown. If the
>> target state needs broadcast but not broadcast timer is available, then
>> the CPU can not resume back from that idle state.
>>
>> This patch returns error when there's no broadcast timer support
>> available so that CPUIdle framework prevents the CPU from entering any
>> idle states losing the local timer.
>
> That's wrong and breaks stuff which does not require the broadcast
> nonsense.
>

OK, sorry for not considering that case.

> If TICK_ONESHOT is disabled, then everything is in periodic mode and
> tick_broadcast_enter() rightfully returns 0. Ditto for 'highres=off'
> on the command line.
>
> But there is a case which is not correctly handled right now. That's
> what you are trying to solve in the wrong way.
>

Correct I was trying to solve exactly the case mentioned below.

> If
>     GENERIC_CLOCKEVENTS_BROADCAST=n
>
> or
>
>     GENERIC_CLOCKEVENTS_BROADCAST=y and no broadcast device is available,
>
> AND cpu local tick device has the C3STOP flag set,
>
> then we have no way to tell the idle code that going deep is not
> allowed.
>
> So we need to be smarter than blindly changing a return
> value. Completely untested patch below.
>

Agreed, thanks for the quick patch, I have tested it and it works fine.
You can add

Tested-by: Sudeep Holla <sudeep.holla@....com>

Regards,
Sudeep
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ