From: Gautham R Shenoy <ego@in.ibm.com>
To: akpm@osdl.org, paulmck@us.ibm.com, mingo@elte.hu
Cc: vatsa@in.ibm.com, dipankar@in.ibm.com,
venkatesh.pallipadi@intel.com, linux-kernel@vger.kernel.org,
oleg@tv-sign.ru, rjw@sisk.pl, kiran@scalex86.org
Subject: [RFC PATCH(Experimental) 3/4] Revert changes to sched.c and slab.c
Date: Wed, 14 Feb 2007 20:13:50 +0530 [thread overview]
Message-ID: <20070214144350.GC19789@in.ibm.com> (raw)
In-Reply-To: <20070214144305.GB19789@in.ibm.com>
This patch removes the per-subsystem hotcpu mutexes from sched and
slab subsystems.
Signed-off-by : Gautham R Shenoy <ego@in.ibm.com>
--
kernel/sched.c | 16 ----------------
mm/slab.c | 6 ------
2 files changed, 22 deletions(-)
Index: hotplug/kernel/sched.c
===================================================================
--- hotplug.orig/kernel/sched.c
+++ hotplug/kernel/sched.c
@@ -280,7 +280,6 @@ struct rq {
};
static DEFINE_PER_CPU(struct rq, runqueues);
-static DEFINE_MUTEX(sched_hotcpu_mutex);
static inline int cpu_of(struct rq *rq)
{
@@ -4454,13 +4453,11 @@ long sched_setaffinity(pid_t pid, cpumas
struct task_struct *p;
int retval;
- mutex_lock(&sched_hotcpu_mutex);
read_lock(&tasklist_lock);
p = find_process_by_pid(pid);
if (!p) {
read_unlock(&tasklist_lock);
- mutex_unlock(&sched_hotcpu_mutex);
return -ESRCH;
}
@@ -4487,7 +4484,6 @@ long sched_setaffinity(pid_t pid, cpumas
out_unlock:
put_task_struct(p);
- mutex_unlock(&sched_hotcpu_mutex);
return retval;
}
@@ -4544,7 +4540,6 @@ long sched_getaffinity(pid_t pid, cpumas
struct task_struct *p;
int retval;
- mutex_lock(&sched_hotcpu_mutex);
read_lock(&tasklist_lock);
retval = -ESRCH;
@@ -4560,7 +4555,6 @@ long sched_getaffinity(pid_t pid, cpumas
out_unlock:
read_unlock(&tasklist_lock);
- mutex_unlock(&sched_hotcpu_mutex);
if (retval)
return retval;
@@ -5483,9 +5477,6 @@ migration_call(struct notifier_block *nf
struct rq *rq;
switch (action) {
- case CPU_LOCK_ACQUIRE:
- mutex_lock(&sched_hotcpu_mutex);
- break;
case CPU_UP_PREPARE:
p = kthread_create(migration_thread, hcpu, "migration/%d",cpu);
@@ -5549,9 +5540,6 @@ migration_call(struct notifier_block *nf
rq->migration_thread = NULL;
break;
#endif
- case CPU_LOCK_RELEASE:
- mutex_unlock(&sched_hotcpu_mutex);
- break;
}
return NOTIFY_OK;
}
@@ -6895,10 +6883,8 @@ int arch_reinit_sched_domains(void)
{
int err;
- mutex_lock(&sched_hotcpu_mutex);
detach_destroy_domains(&cpu_online_map);
err = arch_init_sched_domains(&cpu_online_map);
- mutex_unlock(&sched_hotcpu_mutex);
return err;
}
@@ -7003,12 +6989,10 @@ void __init sched_init_smp(void)
{
cpumask_t non_isolated_cpus;
- mutex_lock(&sched_hotcpu_mutex);
arch_init_sched_domains(&cpu_online_map);
cpus_andnot(non_isolated_cpus, cpu_possible_map, cpu_isolated_map);
if (cpus_empty(non_isolated_cpus))
cpu_set(smp_processor_id(), non_isolated_cpus);
- mutex_unlock(&sched_hotcpu_mutex);
/* XXX: Theoretical race here - CPU may be hotplugged now */
hotcpu_notifier(update_sched_domains, 0);
Index: hotplug/mm/slab.c
===================================================================
--- hotplug.orig/mm/slab.c
+++ hotplug/mm/slab.c
@@ -1179,9 +1179,6 @@ static int __cpuinit cpuup_callback(stru
int memsize = sizeof(struct kmem_list3);
switch (action) {
- case CPU_LOCK_ACQUIRE:
- mutex_lock(&cache_chain_mutex);
- break;
case CPU_UP_PREPARE:
/*
* We need to do this right in the beginning since
@@ -1342,9 +1339,6 @@ free_array_cache:
drain_freelist(cachep, l3, l3->free_objects);
}
break;
- case CPU_LOCK_RELEASE:
- mutex_unlock(&cache_chain_mutex);
- break;
}
return NOTIFY_OK;
bad:
--
Gautham R Shenoy
Linux Technology Center
IBM India.
"Freedom comes with a price tag of responsibility, which is still a bargain,
because Freedom is priceless!"
next prev parent reply other threads:[~2007-02-14 14:44 UTC|newest]
Thread overview: 92+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-02-14 14:40 [RFC PATCH(Experimental) 0/4] Freezer based Cpu-hotplug Gautham R Shenoy
2007-02-14 14:42 ` [RFC PATCH(Experimental) 1/4] freezer-cpu-hotplug core Gautham R Shenoy
2007-02-14 14:43 ` [RFC PATCH(Experimental) 2/4] Revert changes to workqueue.c Gautham R Shenoy
2007-02-14 14:43 ` Gautham R Shenoy [this message]
2007-02-14 14:44 ` [RFC PATCH(Experimental) 4/4] Rip out lock_cpu_hotplug from linux Gautham R Shenoy
2007-02-14 14:59 ` [RFC PATCH(Experimental) 2/4] Revert changes to workqueue.c Srivatsa Vaddagiri
2007-02-14 15:24 ` Srivatsa Vaddagiri
2007-02-14 20:23 ` Oleg Nesterov
2007-02-14 20:09 ` Oleg Nesterov
2007-02-16 5:26 ` Srivatsa Vaddagiri
2007-02-16 15:33 ` Oleg Nesterov
2007-02-16 16:47 ` Srivatsa Vaddagiri
2007-02-16 18:45 ` Oleg Nesterov
2007-02-16 23:59 ` Oleg Nesterov
2007-02-17 2:29 ` Srivatsa Vaddagiri
2007-02-17 21:59 ` Oleg Nesterov
2007-02-20 15:12 ` Srivatsa Vaddagiri
2007-02-20 20:09 ` Oleg Nesterov
2007-02-21 6:29 ` Srivatsa Vaddagiri
2007-02-21 14:30 ` Oleg Nesterov
2007-02-21 14:37 ` Gautham R Shenoy
2007-02-21 15:53 ` Srivatsa Vaddagiri
2007-02-14 15:31 ` [RFC PATCH(Experimental) 1/4] freezer-cpu-hotplug core Srivatsa Vaddagiri
2007-02-14 19:47 ` Oleg Nesterov
2007-02-16 6:48 ` Srivatsa Vaddagiri
2007-02-16 15:47 ` Oleg Nesterov
2007-02-14 20:22 ` Oleg Nesterov
2007-02-16 7:16 ` Srivatsa Vaddagiri
2007-02-16 8:12 ` Srivatsa Vaddagiri
2007-02-16 9:29 ` Rafael J. Wysocki
2007-02-16 9:59 ` Srivatsa Vaddagiri
2007-02-16 11:06 ` Rafael J. Wysocki
2007-02-16 19:46 ` Oleg Nesterov
2007-02-17 2:31 ` Srivatsa Vaddagiri
2007-02-17 5:32 ` Gautham R Shenoy
2007-02-17 11:19 ` Gautham R Shenoy
2007-02-16 16:06 ` Oleg Nesterov
2007-02-14 21:43 ` [RFC PATCH(Experimental) 0/4] Freezer based Cpu-hotplug Rafael J. Wysocki
2007-02-15 6:34 ` Gautham R Shenoy
2007-02-15 8:09 ` Rafael J. Wysocki
2007-02-15 12:20 ` Gautham R Shenoy
2007-02-15 13:31 ` Rafael J. Wysocki
2007-02-15 14:25 ` Gautham R Shenoy
2007-02-17 11:24 ` Rafael J. Wysocki
2007-02-17 21:34 ` Oleg Nesterov
2007-02-17 22:24 ` Rafael J. Wysocki
2007-02-17 23:42 ` Oleg Nesterov
2007-02-17 23:47 ` Oleg Nesterov
2007-02-18 10:43 ` Rafael J. Wysocki
2007-02-18 11:31 ` Oleg Nesterov
2007-02-18 12:14 ` Rafael J. Wysocki
2007-02-18 14:52 ` freezer problems Oleg Nesterov
2007-02-18 15:14 ` Rafael J. Wysocki
2007-02-18 16:19 ` Oleg Nesterov
2007-02-18 18:14 ` Rafael J. Wysocki
2007-02-18 18:56 ` Rafael J. Wysocki
2007-02-18 22:01 ` Oleg Nesterov
2007-02-18 23:19 ` Rafael J. Wysocki
2007-02-19 20:23 ` Oleg Nesterov
2007-02-19 21:21 ` Rafael J. Wysocki
2007-02-19 22:41 ` Oleg Nesterov
2007-02-19 23:35 ` Rafael J. Wysocki
2007-02-20 0:12 ` Oleg Nesterov
2007-02-20 0:32 ` Rafael J. Wysocki
2007-02-20 0:50 ` Oleg Nesterov
2007-02-20 18:28 ` Rafael J. Wysocki
2007-02-20 18:29 ` Rafael J. Wysocki
2007-02-21 18:14 ` Paul E. McKenney
2007-02-21 18:13 ` Rafael J. Wysocki
2007-02-21 18:27 ` Paul E. McKenney
2007-02-21 20:03 ` Oleg Nesterov
2007-02-21 20:47 ` Rafael J. Wysocki
2007-02-21 21:06 ` Paul E. McKenney
2007-02-21 23:10 ` Rafael J. Wysocki
2007-02-22 10:47 ` Oleg Nesterov
2007-02-22 11:33 ` Oleg Nesterov
2007-02-22 17:03 ` Rafael J. Wysocki
2007-02-22 17:44 ` Oleg Nesterov
2007-02-22 21:56 ` Rafael J. Wysocki
2007-02-23 18:15 ` Oleg Nesterov
2007-02-23 3:02 ` Gautham R Shenoy
2007-02-18 15:09 ` [RFC PATCH(Experimental) 0/4] Freezer based Cpu-hotplug Rafael J. Wysocki
2007-02-18 16:11 ` Oleg Nesterov
2007-02-18 18:51 ` Rafael J. Wysocki
2007-02-18 10:32 ` Rafael J. Wysocki
2007-02-18 11:32 ` Oleg Nesterov
2007-02-18 12:12 ` Rafael J. Wysocki
2007-02-18 15:06 ` Oleg Nesterov
2007-02-18 12:56 ` Pavel Machek
2007-02-21 14:52 ` Gautham R Shenoy
2007-02-21 19:42 ` Pavel Machek
[not found] ` <200702231041.17136.rjw@sisk.pl>
[not found] ` <20070223100817.GA10973@in.ibm.com>
[not found] ` <200702231115.00718.rjw@sisk.pl>
[not found] ` <20070223104723.GB10973@in.ibm.com>
[not found] ` <20070223110201.GC10973@in.ibm.com>
2007-02-23 19:03 ` freezer problems Gautham R Shenoy
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=20070214144350.GC19789@in.ibm.com \
--to=ego@in.ibm.com \
--cc=akpm@osdl.org \
--cc=dipankar@in.ibm.com \
--cc=kiran@scalex86.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=oleg@tv-sign.ru \
--cc=paulmck@us.ibm.com \
--cc=rjw@sisk.pl \
--cc=vatsa@in.ibm.com \
--cc=venkatesh.pallipadi@intel.com \
/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