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: <Pine.LNX.4.64.0611071113390.4582@schroedinger.engr.sgi.com>
Date:	Tue, 7 Nov 2006 11:17:07 -0800 (PST)
From:	Christoph Lameter <clameter@....com>
To:	"Siddha, Suresh B" <suresh.b.siddha@...el.com>
cc:	Ingo Molnar <mingo@...e.hu>, akpm@...l.org,
	mm-commits@...r.kernel.org, nickpiggin@...oo.com.au,
	linux-kernel@...r.kernel.org
Subject: Re: + sched-use-tasklet-to-call-balancing.patch added to -mm tree

Tasklets are scheduled on the same cpu that triggered the tasklet. They 
are just moved to other processors if the processor goes down. So that 
aspect is fine. We just need a tasklet struct per cpu.



User a per cpu tasklet to schedule rebalancing

Turns out that tasklets have a flag that only allows one instance to run
on all processors. So we need a tasklet structure for each processor.

Signed-off-by: Christoph Lameter <clameter@....com>

Index: linux-2.6.19-rc4-mm2/kernel/sched.c
===================================================================
--- linux-2.6.19-rc4-mm2.orig/kernel/sched.c	2006-11-06 13:58:38.000000000 -0600
+++ linux-2.6.19-rc4-mm2/kernel/sched.c	2006-11-07 13:05:56.236343144 -0600
@@ -2918,7 +2918,8 @@ static void rebalance_domains(unsigned l
 	this_rq->next_balance = next_balance;
 }
 
-DECLARE_TASKLET(rebalance, &rebalance_domains, 0L);
+static DEFINE_PER_CPU(struct tasklet_struct, rebalance) =
+		{ NULL, 0, ATOMIC_INIT(0), rebalance_domains, 0L };
 #else
 /*
  * on UP we do not need to balance between CPUs:
@@ -3171,7 +3172,7 @@ void scheduler_tick(void)
 #ifdef CONFIG_SMP
 	update_load(rq);
 	if (time_after_eq(jiffies, rq->next_balance))
-		tasklet_schedule(&rebalance);
+		tasklet_schedule(&__get_cpu_var(rebalance));
 #endif
 }
 

-
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