login
Login
/
Register
Search
Header Space
Forums
News
Jobs
Blogs
Features
Man Pages
Site
Home
»
Mailing list archives
»
linux-kernel
»
2008
»
May
»
6
Re: [PATCH 3/5] Add rcu_barrier_sched() and rcu_barrier_bh()
view
thread
Score:
Previous message: [
thread
] [
date
] [
author
]
Next message: [thread] [
date
] [
author
]
[view in full thread]
From:
Paul E. McKenney <paulmck@...>
To: Gautham R Shenoy <ego@...>
Cc: <linux-kernel@...>, <mathieu.desnoyers@...>, <mingo@...>, <akpm@...>, <hch@...>, <mmlnx@...>, <dipankar@...>, <dsmith@...>, <rostedt@...>, <adrian.bunk@...>, <a.p.zijlstra@...>, <niv@...>, <dvhltc@...>, <rusty@...>, <jkenisto@...>, <oleg@...>, <jamesclhuang@...>
Subject:
Re: [PATCH 3/5] Add rcu_barrier_sched() and rcu_barrier_bh()
Date: Tuesday, May 6, 2008 - 1:37 am
On Mon, May 05, 2008 at 11:12:11PM +0530, Gautham R Shenoy wrote:
quoted text
> On Mon, May 05, 2008 at 07:47:51AM -0700, Paul E. McKenney wrote: > > On Mon, May 05, 2008 at 02:52:40PM +0530, Gautham R Shenoy wrote: > > > On Mon, Apr 21, 2008 at 05:47:43PM -0700, Paul E. McKenney wrote: > > > > Add rcu_barrier_sched() and rcu_barrier_bh(). With these in place, > > > > rcutorture no longer gives the occasional oops when repeatedly starting > > > > and stopping torturing rcu_bh. Also adds the API needed to flush out > > > > pre-existing call_rcu_sched() callbacks. > > > > Thank you again for looking it over! > > > > > > Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> > > > > Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca> > > > > --- > > > > > > > > include/linux/rcupdate.h | 2 + > > > > kernel/rcupdate.c | 55 +++++++++++++++++++++++++++++++++++++++++------ > > > > 2 files changed, 51 insertions(+), 6 deletions(-) > > > > > > > > diff -urpNa -X dontdiff linux-2.6.25-C2-rcuclassic-fixes/include/linux/rcupdate.h linux-2.6.25-C3-rcu_barrier_sched/include/linux/rcupdate.h > > > > --- linux-2.6.25-C2-rcuclassic-fixes/include/linux/rcupdate.h 2008-04-17 08:10:33.000000000 -0700 > > > > +++ linux-2.6.25-C3-rcu_barrier_sched/include/linux/rcupdate.h 2008-04-21 11:33:07.000000000 -0700 > > > > @@ -260,6 +260,8 @@ extern void call_rcu_bh(struct rcu_head > > > > /* Exported common interfaces */ > > > > extern void synchronize_rcu(void); > > > > extern void rcu_barrier(void); > > > > +extern void rcu_barrier_bh(void); > > > > +extern void rcu_barrier_sched(void); > > > > extern long rcu_batches_completed(void); > > > > extern long rcu_batches_completed_bh(void); > > > > > > > > diff -urpNa -X dontdiff linux-2.6.25-C2-rcuclassic-fixes/kernel/rcupdate.c linux-2.6.25-C3-rcu_barrier_sched/kernel/rcupdate.c > > > > --- linux-2.6.25-C2-rcuclassic-fixes/kernel/rcupdate.c 2008-04-17 08:10:33.000000000 -0700 > > > > +++ linux-2.6.25-C3-rcu_barrier_sched/kernel/rcupdate.c 2008-04-21 11:33:08.000000000 -0700 > > > > @@ -45,6 +45,12 @@ > > > > #include <linux/mutex.h> > > > > #include <linux/module.h> > > > > > > > > +enum rcu_barrier { > > > > + RCU_BARRIER_STD, > > > STD: Standard, I take it ? > > > > Yep. Could say just "RCU_BARRIER", or perhaps "RCU_BARRIER_CLASSIC". > > Or comment each with the primitive they go with, perhaps better. > > A simple RCU_BARRIER should do I guess, since the corresponding > API is rcu_barrier(). With comments, that'll be even better :-)
Fair enough! ;-) Thanx, Paul
quoted text
> -- > Thanks and Regards > gautham. > > > > > > > + RCU_BARRIER_BH, > > > > + RCU_BARRIER_SCHED, > > > > +}; > > > > + > > > > static DEFINE_PER_CPU(struct rcu_head, rcu_barrier_head) = {NULL}; > > > > static atomic_t rcu_barrier_cpu_count; > > > > static DEFINE_MUTEX(rcu_barrier_mutex); > > > > @@ -83,19 +89,30 @@ static void rcu_barrier_callback(struct > > > > /* > > > > * Called with preemption disabled, and from cross-cpu IRQ context. > > > > */ > > > > -static void rcu_barrier_func(void *notused) > > > > +static void rcu_barrier_func(void *type) > > > > { > > > > int cpu = smp_processor_id(); > > > > struct rcu_head *head = &per_cpu(rcu_barrier_head, cpu); > > > > > > > > atomic_inc(&rcu_barrier_cpu_count); > > > > - call_rcu(head, rcu_barrier_callback); > > > > + switch ((enum rcu_barrier)type) { > > > > + case RCU_BARRIER_STD: > > > > + call_rcu(head, rcu_barrier_callback); > > > > + break; > > > > + case RCU_BARRIER_BH: > > > > + call_rcu_bh(head, rcu_barrier_callback); > > > > + break; > > > > + case RCU_BARRIER_SCHED: > > > > + call_rcu_sched(head, rcu_barrier_callback); > > > > + break; > > > > + } > > > > } > > > > > > > > -/** > > > > - * rcu_barrier - Wait until all the in-flight RCUs are complete. > > > > +/* > > > > + * Orchestrate the specified type of RCU barrier, waiting for all > > > > + * RCU callbacks of the specified type to complete. > > > > */ > > > > -void rcu_barrier(void) > > > > +static void _rcu_barrier(enum rcu_barrier type) > > > > { > > > > BUG_ON(in_interrupt()); > > > > /* Take cpucontrol mutex to protect against CPU hotplug */ > > > > @@ -111,13 +128,39 @@ void rcu_barrier(void) > > > > * until all the callbacks are queued. > > > > */ > > > > rcu_read_lock(); > > > > - on_each_cpu(rcu_barrier_func, NULL, 0, 1); > > > > + on_each_cpu(rcu_barrier_func, (void *)type, 0, 1); > > > > rcu_read_unlock(); > > > > wait_for_completion(&rcu_barrier_completion); > > > > mutex_unlock(&rcu_barrier_mutex); > > > > } > > > > + > > > > +/** > > > > + * rcu_barrier - Wait until all in-flight call_rcu() callbacks complete. > > > > + */ > > > > +void rcu_barrier(void) > > > > +{ > > > > + _rcu_barrier(RCU_BARRIER_STD); > > > > +} > > > > EXPORT_SYMBOL_GPL(rcu_barrier); > > > > > > > > +/** > > > > + * rcu_barrier_bh - Wait until all in-flight call_rcu_bh() callbacks complete. > > > > + */ > > > > +void rcu_barrier_bh(void) > > > > +{ > > > > + _rcu_barrier(RCU_BARRIER_BH); > > > > +} > > > > +EXPORT_SYMBOL_GPL(rcu_barrier_bh); > > > > + > > > > +/** > > > > + * rcu_barrier_sched - Wait for in-flight call_rcu_sched() callbacks. > > > > + */ > > > > +void rcu_barrier_sched(void) > > > > +{ > > > > + _rcu_barrier(RCU_BARRIER_SCHED); > > > > +} > > > > +EXPORT_SYMBOL_GPL(rcu_barrier_sched); > > > > + > > > > void __init rcu_init(void) > > > > { > > > > __rcu_init(); > > > > > > -- > > > Thanks and Regards > > > gautham
--
unsubscribe notice
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to
majordomo@vger.kernel.org
More majordomo info at
http://vger.kernel.org/majordomo-info.html
Please read the FAQ at
http://www.tux.org/lkml/
Previous message: [
thread
] [
date
] [
author
]
Next message: [thread] [
date
] [
author
]
Messages in current thread:
[PATCH 0/5] call_rcu_sched() series
, Paul E. McKenney
, (Mon Apr 21, 8:44 pm)
[PATCH 5/5] 1Q08 RCU doc update, add call_rcu_sched()
, Paul E. McKenney
, (Mon Apr 21, 8:49 pm)
Re: [PATCH 0/5] call_rcu_sched() series
, Paul E. McKenney
, (Mon Apr 21, 8:48 pm)
[PATCH 4/5] Add call_rcu_sched() and friends to rcutorture
, Paul E. McKenney
, (Mon Apr 21, 8:52 pm)
Re: [PATCH 0/5] call_rcu_sched() series
, Paul E. McKenney
, (Mon Apr 21, 8:51 pm)
[PATCH 3/5] Add rcu_barrier_sched() and rcu_barrier_bh()
, Paul E. McKenney
, (Mon Apr 21, 8:47 pm)
Re: [PATCH 3/5] Add rcu_barrier_sched() and rcu_barrier_bh()
, Gautham R Shenoy
, (Mon May 5, 5:22 am)
Re: [PATCH 3/5] Add rcu_barrier_sched() and rcu_barrier_bh()
, Paul E. McKenney
, (Mon May 5, 10:47 am)
Re: [PATCH 3/5] Add rcu_barrier_sched() and rcu_barrier_bh()
, Gautham R Shenoy
, (Mon May 5, 1:42 pm)
Re: [PATCH 3/5] Add rcu_barrier_sched() and rcu_barrier_bh()
, Paul E. McKenney
, (Tue May 6, 1:37 am)
[PATCH 2/5] Add memory barriers and comments to rcu_check_ca...
, Paul E. McKenney
, (Mon Apr 21, 8:46 pm)
Re: [PATCH 0/5] call_rcu_sched() series
, Paul E. McKenney
, (Mon Apr 21, 8:45 pm)
[PATCH 1/5] Add call_rcu_sched()
, Paul E. McKenney
, (Mon Apr 21, 8:50 pm)
Re: [PATCH 1/5] Add call_rcu_sched()
, Gautham R Shenoy
, (Mon May 5, 5:14 am)
Re: [PATCH 1/5] Add call_rcu_sched()
, Paul E. McKenney
, (Mon May 5, 10:43 am)
Navigation
Create content
Mailing list archives
Recent posts
Mail archive search
Enter your search terms.
all mailing lists
alsa-devel
dragonflybsd-bugs
dragonflybsd-commit
dragonflybsd-docs
dragonflybsd-kernel
dragonflybsd-submit
dragonflybsd-user
freebsd-announce
freebsd-bugs
freebsd-chat
freebsd-cluster
freebsd-current
freebsd-drivers
freebsd-embeded
freebsd-fs
freebsd-hackers
freebsd-hardware
freebsd-mobile
freebsd-net
freebsd-performance
freebsd-pf
freebsd-security
freebsd-security-notifications
freebsd-threads
git
git-commits-head
linux-activists
linux-arm
linux-ath5k-devel
linux-btrfs
linux-c-programming
linux-driver-devel
linux-ext4
linux-fsdevel
linux-ia64
linux-input
linux-kernel
linux-kernel-janitors
linux-kernel-mentors
linux-kernel-newbies
linux-kvm
linux-net
linux-netdev
linux-newbie
linux-nfs
linux-raid
linux-scsi
linux-security-module
linux-sparse
linux-usb
linux-usb-devel
madwifi-devel
netbsd-announce
netbsd-tech-kern
open-graphics
open-graphics-announce-kt
openbsd-announce
openbsd-bugs
openbsd-ipv6
openbsd-misc
openbsd-security-announce
openbsd-smp
openbsd-source-changes
openbsd-tech
openfabrics-general
openmoko-community
openmoko-devel
openmoko-kernel
reiserfs-devel
tux3
ucarp
Optionally limit your search to a specific mailing list.
advanced
Popular discussions
linux-kernel
:
Manu Abraham
PCIE
Jared Hulbert
[PATCH 00/10] AXFS: Advanced XIP filesystem
Pardo
Re: pthread_create() slow for many threads; also time to revisit 64b context switc...
Tomasz Chmielewski
Re: [PATCH] Intel IXP4xx network drivers v.2 - Ethernet and HSS
git
:
Thomas Glanzmann
fatal: serious inflate inconsistency
Jeff Garzik
Re: Using GIT to store /etc (Or: How to make GIT store all file permission bits)
Andy Parkins
Re: git-fetch and unannotated tags
Yossi Leybovich
corrupt object on git-gc
openbsd-misc
:
Richard Stallman
Real men don't attack straw men
Bertram Scharpf
First install: Grub doesn't find partitions
Unix Fan
Chatting with developers? Is it soo 1996?
Joel Wiramu Pauling
Re: Suggested PF Setup when using BitTorrent?
linux-netdev
:
Vegard Nossum
Re: [bug, netconsole, SLUB] BUG skbuff_head_cache: Poison overwritten
Jarek Poplawski
Re: NMI lockup, 2.6.26 release
Tomas Winkler
[PATCH] iwlwifi: RS small compile warnings without CONFIG_IWLWIFI_DEBUG
Simon Horman
Re: [PATCH] sendfile() and UDP socket
Latest forum posts
Serial Driver Implementation Help
12 hours ago
Linux kernel
aacraid bad
12 hours ago
Linux general
Tools: GCC 3.4.6, Final GCC 3 Release
1 day ago
Applications and Utilities
GNU/Hurd is so awful
2 days ago
GNU/Hurd
read /dev/mem not working in 2.6
4 days ago
Linux general
Issues with NETLINK sockets
5 days ago
Linux kernel
Anyone experiancing compiling issues with 2.6.26.6 patching with rt patch 2.6.26.6-rt11?
5 days ago
Linux kernel
Change network interface from eth0 to ppp0
5 days ago
Linux general
kernel module to intercept socket creation
5 days ago
Linux kernel
command to set Subnet Mask
6 days ago
Linux general
Show all forums...
Recent Tags
more tags
Colocation donated by:
Who's online
There are currently
4 users
and
851 guests
online.
Online users
Jeremy
Mr_Z
jnareb
bartman
Syndicate
speck-geostationary