From: Dipankar Sarma <dipankar@in.ibm.com>
To: linux-kernel@vger.kernel.org
Cc: Andrew Morton <akpm@osdl.org>, Ingo Molnar <mingo@elte.hu>,
Paul E McKenney <paulmck@us.ibm.com>
Subject: Re: [PATCH 2/4] RCU: use a separate softirq
Date: Mon, 28 Aug 2006 21:41:12 +0530 [thread overview]
Message-ID: <20060828161112.GD3325@in.ibm.com> (raw)
In-Reply-To: <20060828160845.GB3325@in.ibm.com>
Finally, RCU gets its own softirq. With it being used extensively,
the per-cpu tasklet used earlier was just a softirq with overheads.
This makes things more efficient.
Signed-off-by: Dipankar Sarma <dipankar@in.ibm.com>
---
include/linux/interrupt.h | 3 ++-
kernel/rcuclassic.c | 12 +++++-------
2 files changed, 7 insertions(+), 8 deletions(-)
diff -puN kernel/rcuclassic.c~rcu-softirq kernel/rcuclassic.c
--- linux-2.6.18-rc3-rcu/kernel/rcuclassic.c~rcu-softirq 2006-08-27 01:01:15.000000000 +0530
+++ linux-2.6.18-rc3-rcu-dipankar/kernel/rcuclassic.c 2006-08-27 01:01:15.000000000 +0530
@@ -69,7 +69,6 @@ DEFINE_PER_CPU(struct rcu_data, rcu_data
DEFINE_PER_CPU(struct rcu_data, rcu_bh_data) = { 0L };
/* Fake initialization required by compiler */
-static DEFINE_PER_CPU(struct tasklet_struct, rcu_tasklet) = {NULL};
static int blimit = 10;
static int qhimark = 10000;
static int qlowmark = 100;
@@ -212,7 +211,7 @@ static void rcu_do_batch(struct rcu_data
if (!rdp->donelist)
rdp->donetail = &rdp->donelist;
else
- tasklet_schedule(&per_cpu(rcu_tasklet, rdp->cpu));
+ raise_softirq(RCU_SOFTIRQ);
}
/*
@@ -363,7 +362,6 @@ static void rcu_offline_cpu(int cpu)
&per_cpu(rcu_bh_data, cpu));
put_cpu_var(rcu_data);
put_cpu_var(rcu_bh_data);
- tasklet_kill_immediate(&per_cpu(rcu_tasklet, cpu), cpu);
}
#else
@@ -375,7 +373,7 @@ static void rcu_offline_cpu(int cpu)
#endif
/*
- * This does the RCU processing work from tasklet context.
+ * This does the RCU processing work from softirq context.
*/
static void __rcu_process_callbacks(struct rcu_ctrlblk *rcp,
struct rcu_data *rdp)
@@ -420,7 +418,7 @@ static void __rcu_process_callbacks(stru
rcu_do_batch(rdp);
}
-static void rcu_process_callbacks(unsigned long unused)
+static void rcu_process_callbacks(struct softirq_action *unused)
{
__rcu_process_callbacks(&rcu_ctrlblk, &__get_cpu_var(rcu_data));
__rcu_process_callbacks(&rcu_bh_ctrlblk, &__get_cpu_var(rcu_bh_data));
@@ -484,7 +482,7 @@ void rcu_check_callbacks(int cpu, int us
rcu_bh_qsctr_inc(cpu);
} else if (!in_softirq())
rcu_bh_qsctr_inc(cpu);
- tasklet_schedule(&per_cpu(rcu_tasklet, cpu));
+ raise_softirq(RCU_SOFTIRQ);
}
static void rcu_init_percpu_data(int cpu, struct rcu_ctrlblk *rcp,
@@ -507,7 +505,7 @@ static void __devinit rcu_online_cpu(int
rcu_init_percpu_data(cpu, &rcu_ctrlblk, rdp);
rcu_init_percpu_data(cpu, &rcu_bh_ctrlblk, bh_rdp);
- tasklet_init(&per_cpu(rcu_tasklet, cpu), rcu_process_callbacks, 0UL);
+ open_softirq(RCU_SOFTIRQ, rcu_process_callbacks, NULL);
}
static int __devinit rcu_cpu_notify(struct notifier_block *self,
diff -puN include/linux/interrupt.h~rcu-softirq include/linux/interrupt.h
--- linux-2.6.18-rc3-rcu/include/linux/interrupt.h~rcu-softirq 2006-08-27 01:01:15.000000000 +0530
+++ linux-2.6.18-rc3-rcu-dipankar/include/linux/interrupt.h 2006-08-27 01:01:15.000000000 +0530
@@ -219,7 +219,8 @@ enum
NET_TX_SOFTIRQ,
NET_RX_SOFTIRQ,
BLOCK_SOFTIRQ,
- TASKLET_SOFTIRQ
+ TASKLET_SOFTIRQ,
+ RCU_SOFTIRQ /* Preferable RCU should always be the last softirq */
};
/* softirq mask and active fields moved to irq_cpustat_t in
_
next prev parent reply other threads:[~2006-08-28 16:11 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-28 16:08 [PATCH 0/4] RCU: various merge candidates Dipankar Sarma
2006-08-28 16:10 ` [PATCH 1/4] RCU: split classic rcu Dipankar Sarma
2006-08-31 1:12 ` Paul E. McKenney
2006-08-28 16:11 ` Dipankar Sarma [this message]
2006-08-31 1:13 ` [PATCH 2/4] RCU: use a separate softirq Paul E. McKenney
2006-08-28 16:12 ` [PATCH 3/4] RCU: preemptible RCU implementation Dipankar Sarma
2006-08-28 20:46 ` Christoph Hellwig
2006-08-29 1:33 ` Dipankar Sarma
2006-08-28 16:13 ` [PATCH 4/4] RCU: clean up RCU trace Dipankar Sarma
2006-08-28 16:15 ` [PATCH 0/4] RCU: various merge candidates Arjan van de Ven
2006-08-28 16:29 ` Dipankar Sarma
2006-08-28 16:33 ` Arjan van de Ven
2006-08-28 16:43 ` Dipankar Sarma
2006-08-28 19:06 ` Andrew Morton
2006-08-28 19:16 ` Dipankar Sarma
2006-08-28 19:40 ` Andrew Morton
2006-08-29 0:23 ` Dipankar Sarma
2006-08-29 0:28 ` Andrew Morton
2006-08-30 0:40 ` Paul E. McKenney
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=20060828161112.GD3325@in.ibm.com \
--to=dipankar@in.ibm.com \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=paulmck@us.ibm.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