login
Login
/
Register
Search
Search this site:
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2008
»
May
»
28
Re: 2.6.26-rc4: RIP find_pid_ns+0x6b/0xa0
view
thread
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
[view in full thread]
From: Paul E. McKenney
Subject:
Re: 2.6.26-rc4: RIP find_pid_ns+0x6b/0xa0
Date: Wednesday, May 28, 2008 - 12:26 am
On Tue, May 27, 2008 at 10:01:50PM -0700, Paul E. McKenney wrote:
quoted text
> On Tue, May 27, 2008 at 10:06:11AM -0700, Paul E. McKenney wrote: > > On Tue, May 27, 2008 at 09:11:33AM -0700, Linus Torvalds wrote: > > > On Tue, 27 May 2008, Paul E. McKenney wrote: > > > > > > > > But this will only help until preemptible spinlocks arrive, right? > > > > > > I don't think we will ever have preemptible spinlocks. > > > > > > If you preempt spinlocks, you have serious issues with contention and > > > priority inversion etc, and you basically need to turn them into sleeping > > > mutexes. So now you also need to do interrupts as sleepable threads etc > > > etc. > > > > Indeed, all of these are required in that case. > > > > > And it would break the existing non-preempt RCU usage anyway. > > > > Yes, preemptable spinlocks cannot work without preemptable RCU. > > > > > Yeah, maybe the RT people try to do that, but quite frankly, it is insane. > > > Spinlocks are *different* from sleeping locks, for a damn good reason. > > > > Well, I guess I never claimed to be sane... > > > > Anyway, will look at a preemptable RCU that waits for preempt-disable > > sections of code. > > And here is a just-now hacked up patch. Untested, probably fails to compile. > Just kicked off a light test run, will let you know how it goes.
And it passes light testing on a 4-CPU x86 box. Thanx, Paul
quoted text
> Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> > --- > > include/linux/rcupreempt.h | 15 ++++++++- > kernel/Kconfig.preempt | 15 +++++++++ > kernel/rcupreempt.c | 71 ++++++++++++++++++++++++++++++++++++++++++++- > 3 files changed, 99 insertions(+), 2 deletions(-) > > diff -urpNa -X dontdiff linux-2.6.26-rc3/include/linux/rcupreempt.h linux-2.6.26-rc3-rcu-gcwnp/include/linux/rcupreempt.h > --- linux-2.6.26-rc3/include/linux/rcupreempt.h 2008-05-23 02:26:06.000000000 -0700 > +++ linux-2.6.26-rc3-rcu-gcwnp/include/linux/rcupreempt.h 2008-05-27 21:27:35.000000000 -0700 > @@ -40,7 +40,20 @@ > #include <linux/cpumask.h> > #include <linux/seqlock.h> > > -#define rcu_qsctr_inc(cpu) > +struct rcu_dyntick_sched { > + int qs; > + int rcu_qs_snap; > +}; > + > +DECLARE_PER_CPU(struct rcu_dyntick_sched, rcu_dyntick_sched); > + > +static inline void rcu_qsctr_inc(int cpu) > +{ > + struct rcu_dyntick_sched *rdssp = &per_cpu(rcu_dyntick_sched, cpu); > + > + rdssp->qs++; > +} > + > #define rcu_bh_qsctr_inc(cpu) > #define call_rcu_bh(head, rcu) call_rcu(head, rcu) > > diff -urpNa -X dontdiff linux-2.6.26-rc3/kernel/Kconfig.preempt linux-2.6.26-rc3-rcu-gcwnp/kernel/Kconfig.preempt > --- linux-2.6.26-rc3/kernel/Kconfig.preempt 2008-04-16 19:49:44.000000000 -0700 > +++ linux-2.6.26-rc3-rcu-gcwnp/kernel/Kconfig.preempt 2008-05-27 21:27:39.000000000 -0700 > @@ -77,3 +77,18 @@ config RCU_TRACE > > Say Y here if you want to enable RCU tracing > Say N if you are unsure. > + > +config PREEMPT_RCU_WAIT_PREEMPT_DISABLE > + bool "Cause preemptible RCU to wait for preempt_disable code" > + depends on PREEMPT_RCU > + default y > + help > + This option causes preemptible RCU's grace periods to wait > + on preempt_disable() code sections (such as spinlock critical > + sections in CONFIG_PREEMPT kernels) as well as for RCU > + read-side critical sections. This preserves this semantic > + from Classic RCU. Longer term, explicit RCU read-side critical > + sections need to be added. > + > + Say N here if you want strict RCU semantics. > + Say Y if you are unsure. > diff -urpNa -X dontdiff linux-2.6.26-rc3/kernel/rcupreempt.c linux-2.6.26-rc3-rcu-gcwnp/kernel/rcupreempt.c > --- linux-2.6.26-rc3/kernel/rcupreempt.c 2008-05-23 02:26:07.000000000 -0700 > +++ linux-2.6.26-rc3-rcu-gcwnp/kernel/rcupreempt.c 2008-05-27 21:46:51.000000000 -0700 > @@ -123,6 +123,12 @@ enum rcu_try_flip_states { > rcu_try_flip_waitzero_state, > > /* > + * Wait here for all CPUs to pass through a quiescent state, but > + * only if CONFIG_PREEMPT_RCU_WAIT_PREEMPT_DISABLE. > + */ > + rcu_try_flip_waitqs_state, > + > + /* > * Wait here for each of the other CPUs to execute a memory barrier. > * This is necessary to ensure that these other CPUs really have > * completed executing their RCU read-side critical sections, despite > @@ -131,6 +137,14 @@ enum rcu_try_flip_states { > rcu_try_flip_waitmb_state, > }; > > +/* Plumb the grace-period state machine based on Kconfig parameters. */ > + > +#ifdef CONFIG_PREEMPT_RCU_WAIT_PREEMPT_DISABLE > +#define rcu_try_flip_waitzero_next_state rcu_try_flip_waitqs_state > +#else /* #ifdef CONFIG_PREEMPT_RCU_WAIT_PREEMPT_DISABLE */ > +#define rcu_try_flip_waitzero_next_state rcu_try_flip_waitmb_state > +#endif /* #else #ifdef CONFIG_PREEMPT_RCU_WAIT_PREEMPT_DISABLE */ > + > struct rcu_ctrlblk { > spinlock_t fliplock; /* Protect state-machine transitions. */ > long completed; /* Number of last completed batch. */ > @@ -413,6 +427,8 @@ static void __rcu_advance_callbacks(stru > } > } > > +DEFINE_PER_CPU_SHARED_ALIGNED(struct rcu_dyntick_sched, rcu_dyntick_sched); > + > #ifdef CONFIG_NO_HZ > > DEFINE_PER_CPU(long, dynticks_progress_counter) = 1; > @@ -619,6 +635,25 @@ rcu_try_flip_waitmb_needed(int cpu) > > #endif /* CONFIG_NO_HZ */ > > +#ifdef CONFIG_PREEMPT_RCU_WAIT_PREEMPT_DISABLE > + > +void rcu_try_flip_take_qs_snapshot(void) > +{ > + struct rcu_dyntick_sched *rdssp; > + int cpu; > + > + for_each_cpu_mask(cpu, rcu_cpu_online_map) { > + rdssp = &per_cpu(rcu_dyntick_sched, cpu); > + rdssp->rcu_qs_snap = rdssp->qs; > + } > +} > + > +#else /* #ifdef CONFIG_PREEMPT_RCU_WAIT_PREEMPT_DISABLE */ > + > +#define rcu_try_flip_take_qs_snapshot() > + > +#endif /* #else #ifdef CONFIG_PREEMPT_RCU_WAIT_PREEMPT_DISABLE */ > + > /* > * Get here when RCU is idle. Decide whether we need to > * move out of idle state, and return non-zero if so. > @@ -662,6 +697,13 @@ rcu_try_flip_idle(void) > dyntick_save_progress_counter(cpu); > } > > + /* > + * And take quiescent-state snapshot if we are also to wait > + * on preempt_disable() code sequences. > + */ > + > + rcu_try_flip_take_qs_snapshot(); > + > return 1; > } > > @@ -731,6 +773,26 @@ rcu_try_flip_waitzero(void) > return 1; > } > > +static int > +rcu_try_flip_waitqs(void) > +{ > + int cpu; > + struct rcu_dyntick_sched *rdssp; > + > + /* RCU_TRACE_ME(rcupreempt_trace_try_flip_q1); */ > + for_each_cpu_mask(cpu, rcu_cpu_online_map) { > + rdssp = &per_cpu(rcu_dyntick_sched, cpu); > + if (rcu_try_flip_waitack_needed(cpu) && > + (rdssp->qs == rdssp->rcu_qs_snap)) { > + /* RCU_TRACE_ME(rcupreempt_trace_try_flip_qe1); */ > + return 0; > + } > + } > + > + /* RCU_TRACE_ME(rcupreempt_trace_try_flip_q2); */ > + return 1; > +} > + > /* > * Wait for all CPUs to do their end-of-grace-period memory barrier. > * Return 0 once all CPUs have done so. > @@ -775,7 +837,9 @@ static void rcu_try_flip(void) > > /* > * Take the next transition(s) through the RCU grace-period > - * flip-counter state machine. > + * flip-counter state machine. The _next_state transition > + * is defined by the "plumbing" definitions following the > + * rcu_try_flip_states enum. > */ > > switch (rcu_ctrlblk.rcu_try_flip_state) { > @@ -792,6 +856,11 @@ static void rcu_try_flip(void) > case rcu_try_flip_waitzero_state: > if (rcu_try_flip_waitzero()) > rcu_ctrlblk.rcu_try_flip_state = > + rcu_try_flip_waitzero_next_state; > + break; > + case rcu_try_flip_waitqs_state: > + if (rcu_try_flip_waitqs()) > + rcu_ctrlblk.rcu_try_flip_state = > rcu_try_flip_waitmb_state; > break; > case rcu_try_flip_waitmb_state:
--
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:
Linux 2.6.26-rc4
, Linus Torvalds
, (Mon May 26, 11:41 am)
Re: Linux 2.6.26-rc4
, Jesper Krogh
, (Mon May 26, 2:24 pm)
Re: Linux 2.6.26-rc4
, Linus Torvalds
, (Mon May 26, 2:42 pm)
Re: Linux 2.6.26-rc4
, Arjan van de Ven
, (Mon May 26, 5:25 pm)
Re: Linux 2.6.26-rc4
, Arjan van de Ven
, (Mon May 26, 5:31 pm)
Re: Linux 2.6.26-rc4
, Carl-Daniel Hailfinger
, (Mon May 26, 6:16 pm)
Re: Linux 2.6.26-rc4
, Carl-Daniel Hailfinger
, (Mon May 26, 6:23 pm)
Re: Linux 2.6.26-rc4
, Abhijit Menon-Sen
, (Mon May 26, 6:52 pm)
Re: Linux 2.6.26-rc4
, Jesper Krogh
, (Mon May 26, 10:19 pm)
2.6.26-rc4: RIP find_pid_ns+0x6b/0xa0
, Alexey Dobriyan
, (Mon May 26, 10:23 pm)
[MTD] [MAPS] ck804rom: fix driver_data in probe table.
, David Woodhouse
, (Mon May 26, 10:31 pm)
Re: Linux 2.6.26-rc4
, David Woodhouse
, (Mon May 26, 10:31 pm)
Re: Linux 2.6.26-rc4
, David Woodhouse
, (Mon May 26, 10:43 pm)
Re: Linux 2.6.26-rc4
, Arjan van de Ven
, (Mon May 26, 11:00 pm)
Re: Linux 2.6.26-rc4
, David Woodhouse
, (Mon May 26, 11:24 pm)
Re: 2.6.26-rc4: RIP find_pid_ns+0x6b/0xa0
, Oleg Nesterov
, (Tue May 27, 2:06 am)
Re: Linux 2.6.26-rc4
, J.A.
, (Tue May 27, 3:01 am)
Re: Linux 2.6.26-rc4
, Jeff Garzik
, (Tue May 27, 3:35 am)
Re: Linux 2.6.26-rc4
, Carl-Daniel Hailfinger
, (Tue May 27, 3:53 am)
Re: Linux 2.6.26-rc4
, Jeff Garzik
, (Tue May 27, 3:54 am)
Re: Linux 2.6.26-rc4
, Carl-Daniel Hailfinger
, (Tue May 27, 3:58 am)
Re: 2.6.26-rc4: RIP find_pid_ns+0x6b/0xa0
, Linus Torvalds
, (Tue May 27, 8:03 am)
Re: 2.6.26-rc4: RIP find_pid_ns+0x6b/0xa0
, Paul E. McKenney
, (Tue May 27, 8:40 am)
Re: 2.6.26-rc4: RIP find_pid_ns+0x6b/0xa0
, Linus Torvalds
, (Tue May 27, 9:11 am)
Re: 2.6.26-rc4: RIP find_pid_ns+0x6b/0xa0
, Oleg Nesterov
, (Tue May 27, 9:45 am)
Re: 2.6.26-rc4: RIP find_pid_ns+0x6b/0xa0
, Paul E. McKenney
, (Tue May 27, 10:06 am)
Re: 2.6.26-rc4: RIP find_pid_ns+0x6b/0xa0
, Oleg Nesterov
, (Tue May 27, 10:37 am)
Re: 2.6.26-rc4: RIP find_pid_ns+0x6b/0xa0
, Alexey Dobriyan
, (Tue May 27, 2:26 pm)
Re: 2.6.26-rc4: RIP find_pid_ns+0x6b/0xa0
, Paul E. McKenney
, (Tue May 27, 10:01 pm)
Re: 2.6.26-rc4: RIP find_pid_ns+0x6b/0xa0
, Paul E. McKenney
, (Wed May 28, 12:26 am)
Re: Linux 2.6.26-rc4
, Bill Davidsen
, (Wed May 28, 4:59 pm)
Re: Linux 2.6.26-rc4
, Jesper Krogh
, (Tue Jun 3, 2:49 am)
Re: Linux 2.6.26-rc4
, Al Viro
, (Tue Jun 3, 2:57 am)
Re: Linux 2.6.26-rc4
, Jesper Krogh
, (Tue Jun 3, 3:04 am)
Re: Linux 2.6.26-rc4
, Miklos Szeredi
, (Tue Jun 3, 3:13 am)
Re: Linux 2.6.26-rc4
, Al Viro
, (Tue Jun 3, 3:35 am)
Re: Linux 2.6.26-rc4
, Miklos Szeredi
, (Tue Jun 3, 3:37 am)
Re: Linux 2.6.26-rc4
, Al Viro
, (Tue Jun 3, 3:40 am)
Re: Linux 2.6.26-rc4
, Miklos Szeredi
, (Tue Jun 3, 3:45 am)
Re: Linux 2.6.26-rc4
, Al Viro
, (Tue Jun 3, 3:48 am)
Re: Linux 2.6.26-rc4
, Al Viro
, (Tue Jun 3, 3:52 am)
Re: Linux 2.6.26-rc4
, Ian Kent
, (Tue Jun 3, 6:27 am)
Re: Linux 2.6.26-rc4
, Ian Kent
, (Tue Jun 3, 6:31 am)
Re: Linux 2.6.26-rc4
, Ian Kent
, (Tue Jun 3, 6:32 am)
Re: Linux 2.6.26-rc4
, Linus Torvalds
, (Tue Jun 3, 8:01 am)
Re: Linux 2.6.26-rc4
, Ian Kent
, (Tue Jun 3, 9:07 am)
Re: Linux 2.6.26-rc4
, Linus Torvalds
, (Tue Jun 3, 9:35 am)
Re: Linux 2.6.26-rc4
, Al Viro
, (Tue Jun 3, 9:41 am)
Re: Linux 2.6.26-rc4
, Al Viro
, (Tue Jun 3, 9:50 am)
Re: Linux 2.6.26-rc4
, Linus Torvalds
, (Tue Jun 3, 9:59 am)
Re: Linux 2.6.26-rc4
, Ian Kent
, (Tue Jun 3, 10:13 am)
Re: Linux 2.6.26-rc4
, Ian Kent
, (Tue Jun 3, 10:28 am)
Re: Linux 2.6.26-rc4
, Al Viro
, (Tue Jun 3, 10:30 am)
Re: Linux 2.6.26-rc4
, Ian Kent
, (Tue Jun 3, 10:30 am)
Re: Linux 2.6.26-rc4
, Ian Kent
, (Tue Jun 3, 10:38 am)
Re: Linux 2.6.26-rc4
, Al Viro
, (Tue Jun 3, 10:41 am)
Re: Linux 2.6.26-rc4
, Ian Kent
, (Tue Jun 3, 10:41 am)
Re: Linux 2.6.26-rc4
, Jeff Moyer
, (Tue Jun 3, 10:46 am)
Re: Linux 2.6.26-rc4
, Ian Kent
, (Tue Jun 3, 10:49 am)
Re: Linux 2.6.26-rc4
, Al Viro
, (Tue Jun 3, 10:50 am)
Re: Linux 2.6.26-rc4
, Al Viro
, (Tue Jun 3, 12:18 pm)
Re: Linux 2.6.26-rc4
, Jeff Moyer
, (Tue Jun 3, 12:53 pm)
Re: Linux 2.6.26-rc4
, Al Viro
, (Tue Jun 3, 4:00 pm)
Re: Linux 2.6.26-rc4
, Ian Kent
, (Tue Jun 3, 6:36 pm)
Re: Linux 2.6.26-rc4
, Ian Kent
, (Tue Jun 3, 7:42 pm)
Re: Linux 2.6.26-rc4
, Miklos Szeredi
, (Tue Jun 3, 10:34 pm)
Re: Linux 2.6.26-rc4
, Ian Kent
, (Tue Jun 3, 10:41 pm)
Re: Linux 2.6.26-rc4
, Jesper Krogh
, (Wed Jun 4, 10:51 am)
Re: Linux 2.6.26-rc4
, Ian Kent
, (Thu Jun 5, 12:31 am)
Re: Linux 2.6.26-rc4
, Linus Torvalds
, (Thu Jun 5, 2:29 pm)
Re: Linux 2.6.26-rc4
, Jesper Krogh
, (Thu Jun 5, 2:34 pm)
Re: Linux 2.6.26-rc4
, Andrew Morton
, (Thu Jun 5, 3:30 pm)
Re: Linux 2.6.26-rc4
, Ian Kent
, (Thu Jun 5, 7:39 pm)
Re: Linux 2.6.26-rc4
, Ian Kent
, (Thu Jun 5, 7:47 pm)
Re: Linux 2.6.26-rc4
, Jesper Krogh
, (Thu Jun 5, 11:23 pm)
Re: Linux 2.6.26-rc4
, Ian Kent
, (Fri Jun 6, 1:21 am)
Re: Linux 2.6.26-rc4
, Ian Kent
, (Fri Jun 6, 1:25 am)
Re: Linux 2.6.26-rc4
, Ian Kent
, (Mon Jun 9, 9:57 pm)
Re: Linux 2.6.26-rc4
, Jesper Krogh
, (Mon Jun 9, 11:28 pm)
Re: Linux 2.6.26-rc4
, Ian Kent
, (Mon Jun 9, 11:40 pm)
Re: Linux 2.6.26-rc4
, Ian Kent
, (Tue Jun 10, 2:09 am)
Re: Linux 2.6.26-rc4
, Ian Kent
, (Wed Jun 11, 8:03 pm)
Re: Linux 2.6.26-rc4
, Jesper Krogh
, (Thu Jun 12, 12:02 am)
Re: Linux 2.6.26-rc4
, Ian Kent
, (Thu Jun 12, 4:19 am)
Re: Linux 2.6.26-rc4
, Ian Kent
, (Thu Jun 12, 4:21 am)
Re: Linux 2.6.26-rc4
, Ian Kent
, (Thu Jun 26, 9:18 pm)
Navigation
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Greg Kroah-Hartman
[PATCH 041/196] kobject: add kobject_init_and_add function
Lukas Hejtmanek
Re: Another libata error related to OCZ SSD
Greg Kroah-Hartman
[PATCH 023/196] MCP_UCB1200: Convert from class_device to device
Florian Fainelli
Re: System clock runs too fast after 2.6.27 -> 2.6.28.1 upgrade
Christoph Lameter
[patch 1/4] mmu_notifier: Core code
git
:
Johannes Schindelin
Re: [PATCH 1/2] Add strbuf_initf()
John Bito
[EGIT] Push to GitHub caused corruption
Jakub Narebski
Re: [PATCH 0/2] gitweb: patch view
Junio C Hamano
Re: [PATCH] When a remote is added but not fetched, tell the user.
Andy Parkins
Re: [RFC] Submodules in GIT
git-commits-head
:
Linux Kernel Mailing List
ahci: Workaround HW bug for SB600/700 SATA controller PMP support
Linux Kernel Mailing List
V4L/DVB (11086): au0828: rename macro for currently non-function VBI support
Linux Kernel Mailing List
ceph: client types
Linux Kernel Mailing List
ceph: on-wire types
Linux Kernel Mailing List
crypto: chainiv - Use kcrypto_wq instead of keventd_wq
linux-netdev
:
Andrew Morton
Re: [Bugme-new] [Bug 14969] New: b44: WOL does not work in suspended state
Giuseppe CAVALLARO
Re: [PATCH 03/13] stmmac: add the new Header file for stmmac platform data
Taku Izumi
[PATCH 3/3] ixgbe: add registers etc. printout code just before resetting adapters
Eric Dumazet
rps: some comments
Thomas Gleixner
Re: [RFC PATCH 02/12] On Tue, 23 Sep 2008, David Miller wrote:
openbsd-misc
:
Stephan Andreas
problems with login after xlock in OpenBSD release 4.7
pmc
Make A Change. Alcoholism and Drug Addiction Treatment
ropers
Re: what exactly is enc0?
Fuad NAHDI
Re: What does your environment look like?
Matthew Szudzik
Typo on OpenBSD 4.4 CD Set
Colocation donated by:
Syndicate