mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: David <david@livux.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [patch/backport] CFS scheduler, -v24, for v2.6.24-rc3, v2.6.23.8,v2.6.22.13, v2.6.21.7
Date: Mon, 19 Nov 2007 21:50:00 +0100	[thread overview]
Message-ID: <20071119205000.GB25142@elte.hu> (raw)
In-Reply-To: <200711192051.44095.david@livux.com>


* David <david@livux.com> wrote:

> I have removed all other patches, and applied only cfs v24 above 
> 2.6.23.8, and the compiler ran into (with CONFIG_FAIR_GROUP_SCHED 
> enabled):

does the patch below help?

	Ingo

Index: linux-cfs-2.6.23.8.q/kernel/sched.c
===================================================================
--- linux-cfs-2.6.23.8.q.orig/kernel/sched.c
+++ linux-cfs-2.6.23.8.q/kernel/sched.c
@@ -221,11 +221,14 @@ static struct cfs_rq *init_cfs_rq_p[NR_C
 
 static DEFINE_MUTEX(doms_cur_mutex); /* serialize access to doms_curr[] array */
 
+#ifdef CONFIG_SMP
 /* kernel thread that runs rebalance_shares() periodically */
 static struct task_struct *lb_monitor_task;
 
-static void set_se_shares(struct sched_entity *se, unsigned long shares);
 static int load_balance_monitor(void *unused);
+#endif
+
+static void set_se_shares(struct sched_entity *se, unsigned long shares);
 
 /* Default task group.
  *	Every task in system belong to this group at bootup.
@@ -5178,6 +5181,8 @@ static int migration_thread(void *data)
 		struct migration_req *req;
 		struct list_head *head;
 
+		try_to_freeze();
+
 		spin_lock_irq(&rq->lock);
 
 		if (cpu_is_offline(cpu)) {
@@ -5595,6 +5600,7 @@ migration_call(struct notifier_block *nf
 		p = kthread_create(migration_thread, hcpu, "migration/%d", cpu);
 		if (IS_ERR(p))
 			return NOTIFY_BAD;
+		p->flags |= PF_NOFREEZE;
 		kthread_bind(p, cpu);
 		/* Must be high prio: stop_machine expects to yield to it. */
 		rq = task_rq_lock(p, &flags);
@@ -6050,7 +6056,7 @@ static int cpu_to_core_group(int cpu, co
 			     struct sched_group **sg)
 {
 	int group;
-	cpumask_t mask = per_cpu(cpu_sibling_map, cpu);
+	cpumask_t mask = cpu_sibling_map(cpu);
 	cpus_and(mask, mask, *cpu_map);
 	group = first_cpu(mask);
 	if (sg)
@@ -6079,7 +6085,7 @@ static int cpu_to_phys_group(int cpu, co
 	cpus_and(mask, mask, *cpu_map);
 	group = first_cpu(mask);
 #elif defined(CONFIG_SCHED_SMT)
-	cpumask_t mask = per_cpu(cpu_sibling_map, cpu);
+	cpumask_t mask = cpu_sibling_map(cpu);
 	cpus_and(mask, mask, *cpu_map);
 	group = first_cpu(mask);
 #else
@@ -6313,7 +6319,7 @@ static int build_sched_domains(const cpu
 		p = sd;
 		sd = &per_cpu(cpu_domains, i);
 		*sd = SD_SIBLING_INIT;
-		sd->span = per_cpu(cpu_sibling_map, i);
+		sd->span = cpu_sibling_map(i);
 		cpus_and(sd->span, sd->span, *cpu_map);
 		sd->parent = p;
 		p->child = sd;
@@ -6324,7 +6330,7 @@ static int build_sched_domains(const cpu
 #ifdef CONFIG_SCHED_SMT
 	/* Set up CPU (sibling) groups */
 	for_each_cpu_mask(i, *cpu_map) {
-		cpumask_t this_sibling_map = per_cpu(cpu_sibling_map, i);
+		cpumask_t this_sibling_map = cpu_sibling_map(i);
 		cpus_and(this_sibling_map, this_sibling_map, *cpu_map);
 		if (i != first_cpu(this_sibling_map))
 			continue;
@@ -6742,7 +6748,7 @@ void __init sched_init_smp(void)
 		BUG();
 	sched_init_granularity();
 
-#ifdef CONFIG_FAIR_GROUP_SCHED
+#if defined(CONFIG_FAIR_GROUP_SCHED) && defined(CONFIG_SMP)
 	lb_monitor_task = kthread_create(load_balance_monitor, NULL,
 					 "load_balance_monitor");
 	if (!IS_ERR(lb_monitor_task))
@@ -7006,7 +7012,7 @@ void set_curr_task(int cpu, struct task_
 
 #endif
 
-#ifdef CONFIG_FAIR_GROUP_SCHED
+#if defined(CONFIG_FAIR_GROUP_SCHED) && defined(CONFIG_SMP)
 
 /* distribute shares of all task groups among their schedulable entities,
  * to reflect load distrbution across cpus.
@@ -7138,6 +7144,9 @@ static int load_balance_monitor(void *un
 	return 0;
 }
 
+#endif
+
+#ifdef CONFIG_FAIR_GROUP_SCHED
 /* allocate runqueue etc for a new task group */
 struct task_group *sched_create_group(void)
 {


  parent reply	other threads:[~2007-11-19 20:50 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-19 18:25 David
2007-11-19 18:57 ` Ingo Molnar
2007-11-19 19:51   ` David
2007-11-19 20:44     ` Ingo Molnar
2007-11-19 20:50     ` Ingo Molnar [this message]
2007-11-19 21:39       ` David
2007-11-20  6:13         ` Ingo Molnar
2007-11-20  9:23           ` David
  -- strict thread matches above, loose matches on Subject: below --
2007-11-23  8:23 [patch/backport] CFS scheduler, -v24, for v2.6.24-rc3, v2.6.23.8, v2.6.22.13, v2.6.21.7 Durand
2007-11-23 12:23 ` Ingo Molnar
2007-11-23 16:44   ` Durand
2007-11-20 22:48 Matthew
2007-11-20 22:59 ` Ingo Molnar
2007-11-19 15:17 Ingo Molnar
2007-11-19 16:04 ` [patch/backport] CFS scheduler, -v24, for v2.6.24-rc3, v2.6.23.8,v2.6.22.13, v2.6.21.7 Fortier,Vincent [Montreal]
2007-11-19 18:59   ` Ingo Molnar
2007-11-19 18:12 ` [patch/backport] CFS scheduler, -v24, for v2.6.24-rc3, v2.6.23.8, v2.6.22.13, v2.6.21.7 Erik Andersen
2007-11-19 18:52   ` Ingo Molnar
2007-11-19 19:24     ` Erik Andersen
2007-11-19 19:46     ` [patch/backport] CFS scheduler, -v24, for v2.6.24-rc3,v2.6.23.8, " Fortier,Vincent [Montreal]
2007-11-20 11:24 ` [patch/backport] CFS scheduler, -v24, for v2.6.24-rc3, v2.6.23.8, " Damien Wyart
2007-11-20 12:41   ` Srivatsa Vaddagiri
2007-11-20 12:55   ` Ingo Molnar
2007-11-20 13:22     ` Damien Wyart
2007-11-20 20:00 ` Vincent Fortier
2007-11-20 20:38 ` Fabio Comolli
2007-11-20 20:41   ` Ingo Molnar
2007-11-20 20:47     ` Fabio Comolli
2007-11-20 21:53       ` Ingo Molnar
2007-11-21  8:50         ` Fabio Comolli
2007-11-21 10:39           ` Ingo Molnar
2007-11-21 11:11             ` Fabio Comolli

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20071119205000.GB25142@elte.hu \
    --to=mingo@elte.hu \
    --cc=david@livux.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®