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]
Message-Id: <20140730144752.8c931d9ed997324632d5f2fd@linux-foundation.org>
Date:	Wed, 30 Jul 2014 14:47:52 -0700
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	Chintan Pandya <cpandya@...eaurora.org>
Cc:	tglx@...utronix.de, john.stultz@...aro.org, peterz@...radead.org,
	mingo@...hat.com, hughd@...gle.com, linux-kernel@...r.kernel.org,
	linux-mm@...ck.org
Subject: Re: [PATCH v2 2/2] ksm: Provide support to use deferrable timers
 for scanner thread

On Fri, 25 Jul 2014 20:18:18 +0530 Chintan Pandya <cpandya@...eaurora.org> wrote:

> KSM thread to scan pages is scheduled on definite timeout. That wakes
> up CPU from idle state and hence may affect the power consumption.
> Provide an optional support to use deferrable timer which suites
> low-power use-cases.
> 
> Typically, on our setup we observed, 10% less power consumption with
> some use-cases in which CPU goes to power collapse frequently. For
> example, playing audio while typically CPU remains idle.
> 
> To enable deferrable timers,
> $ echo 1 > /sys/kernel/mm/ksm/deferrable_timer

This could not have been the version which you tested.  What's up?

--- a/mm/ksm.c~ksm-provide-support-to-use-deferrable-timers-for-scanner-thread-fix-fix-2
+++ a/mm/ksm.c
@@ -1720,8 +1720,6 @@ static int ksmd_should_run(void)
 
 static int ksm_scan_thread(void *nothing)
 {
-	signed long to;
-
 	set_freezable();
 	set_user_nice(current, 5);
 
@@ -1735,7 +1733,9 @@ static int ksm_scan_thread(void *nothing
 		try_to_freeze();
 
 		if (ksmd_should_run()) {
-			timeout = msecs_to_jiffies(ksm_thread_sleep_millisecs);
+			signed long to;
+
+			to = msecs_to_jiffies(ksm_thread_sleep_millisecs);
 			if (use_deferrable_timer)
 				schedule_timeout_deferrable_interruptible(to);
 			else
_

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