From dc716e96f5a467835e8121e1caaf25d66a901cb3 Mon Sep 17 00:00:00 2001 From: Marcos Paulo de Souza Date: Wed, 21 Mar 2012 16:33:43 -0700 Subject: drivers/idle/intel_idle.c: fix confusing code identation Fix a code indentation in the function intel_idle_cpu_init that looks confusing.o Suggested-by: Srivatsa S. Bhat Reviewed-by: Srivatsa S. Bhat Signed-off-by: Marcos Paulo de Souza Cc: "Brown, Len" Cc: Len Brown Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/idle/intel_idle.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'drivers') diff --git a/drivers/idle/intel_idle.c b/drivers/idle/intel_idle.c index 1c15e9b33575..d0f59c3f87ef 100644 --- a/drivers/idle/intel_idle.c +++ b/drivers/idle/intel_idle.c @@ -507,8 +507,7 @@ int intel_idle_cpu_init(int cpu) int num_substates; if (cstate > max_cstate) { - printk(PREFIX "max_cstate %d reached\n", - max_cstate); + printk(PREFIX "max_cstate %d reached\n", max_cstate); break; } @@ -524,8 +523,9 @@ int intel_idle_cpu_init(int cpu) dev->states_usage[dev->state_count].driver_data = (void *)get_driver_data(cstate); - dev->state_count += 1; - } + dev->state_count += 1; + } + dev->cpu = cpu; if (cpuidle_register_device(dev)) { -- cgit v1.2.3 From 08ab9b10d43aca091fdff58b69fc1ec89c5b8a83 Mon Sep 17 00:00:00 2001 From: David Rientjes Date: Wed, 21 Mar 2012 16:34:04 -0700 Subject: mm, oom: force oom kill on sysrq+f The oom killer chooses not to kill a thread if: - an eligible thread has already been oom killed and has yet to exit, and - an eligible thread is exiting but has yet to free all its memory and is not the thread attempting to currently allocate memory. SysRq+F manually invokes the global oom killer to kill a memory-hogging task. This is normally done as a last resort to free memory when no progress is being made or to test the oom killer itself. For both uses, we always want to kill a thread and never defer. This patch causes SysRq+F to always kill an eligible thread and can be used to force a kill even if another oom killed thread has failed to exit. Signed-off-by: David Rientjes Acked-by: KOSAKI Motohiro Acked-by: Pekka Enberg Acked-by: KAMEZAWA Hiroyuki Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/tty/sysrq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/tty/sysrq.c b/drivers/tty/sysrq.c index ecb8e2203ac8..136e86faa1e1 100644 --- a/drivers/tty/sysrq.c +++ b/drivers/tty/sysrq.c @@ -346,7 +346,7 @@ static struct sysrq_key_op sysrq_term_op = { static void moom_callback(struct work_struct *ignored) { - out_of_memory(node_zonelist(0, GFP_KERNEL), GFP_KERNEL, 0, NULL); + out_of_memory(node_zonelist(0, GFP_KERNEL), GFP_KERNEL, 0, NULL, true); } static DECLARE_WORK(moom_work, moom_callback); -- cgit v1.2.3