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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 22 Oct 2014 16:38:10 -0400 (EDT)
From:	Nicolas Pitre <nicolas.pitre@...aro.org>
To:	Daniel Lezcano <daniel.lezcano@...aro.org>
cc:	rjw@...ysocki.net, peterz@...radead.org, linux-pm@...r.kernel.org,
	linux-kernel@...r.kernel.org, linaro-kernel@...ts.linaro.org
Subject: Re: [PATCH 2/5] sched: idle: Get the next timer event and pass it
 the cpuidle framework

On Mon, 20 Oct 2014, Daniel Lezcano wrote:

> Following the logic of the previous patch, retrieve from the idle task the
> expected timer sleep duration and pass it to the cpuidle framework.
> 
> Take the opportunity to remove the unused headers in the menu.c file.
> 
> This patch does not change the current behavior.
> 
> Signed-off-by: Daniel Lezcano <daniel.lezcano@...aro.org>

One minor nit below.

> @@ -211,6 +212,12 @@ static void cpu_idle_loop(void)
>  			latency_req = pm_qos_request(PM_QOS_CPU_DMA_LATENCY);
>  
>  			/*
> +			 * The next timer event in us
> +			 */

This 3-line comment is redundant. The code is obvious enough on its own.

> +			next_timer_event = ktime_to_us(
> +				tick_nohz_get_sleep_length());

I'd suggest this form for better readability:

			next_timer_event =
				ktime_to_us(tick_nohz_get_sleep_length());

Other than that...

Acked-by: Nicolas Pitre <nico@...aro.org>

> +
> +			/*
>  			 * In poll mode we reenable interrupts and spin.
>  			 *
>  			 * If the latency req is zero, we don't want to
> @@ -227,7 +234,8 @@ static void cpu_idle_loop(void)
>  			    tick_check_broadcast_expired())
>  				cpu_idle_poll();
>  			else
> -				cpuidle_idle_call(latency_req);
> +				cpuidle_idle_call(latency_req,
> +						  next_timer_event);
>  
>  			arch_cpu_idle_exit();
>  		}
> -- 
> 1.9.1
> 
> 
--
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