login
Login
/
Register
Search
Search this site:
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2008
»
August
»
8
Re: [PATCH] printk: robustify printk
view
thread
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
[view in full thread]
From: Peter Zijlstra
Subject:
Re: [PATCH] printk: robustify printk
Date: Friday, August 8, 2008 - 12:49 pm
On Fri, 2008-08-08 at 12:37 -0700, Andrew Morton wrote:
quoted text
> On Fri, 08 Aug 2008 21:21:08 +0200 > Peter Zijlstra <a.p.zijlstra@chello.nl> wrote: > > > On Fri, 2008-08-08 at 12:14 -0700, Andrew Morton wrote: > > > On Fri, 08 Aug 2008 20:14:28 +0200 > > > Peter Zijlstra <a.p.zijlstra@chello.nl> wrote: > > > > > > > void wake_up_klogd(void) > > > > { > > > > - if (!oops_in_progress && waitqueue_active(&log_wait)) > > > > - wake_up_interruptible(&log_wait); > > > > + unsigned long flags; > > > > + struct klogd_wakeup_state *kws; > > > > + > > > > + if (!waitqueue_active(&log_wait)) > > > > + return; > > > > + > > > > + local_irq_save(flags); > > > > + kws = &__get_cpu_var(kws); > > > > + if (!kws->pending) { > > > > + kws->pending = 1; > > > > + call_rcu(&kws->head, __wake_up_klogd); > > > > + } > > > > + local_irq_restore(flags); > > > > } > > > > > > Note that kernel/rcupreempt.c's flavour of call_rcu() takes > > > RCU_DATA_ME().lock, so there are still code sites from which a printk > > > can deadlock. Only now, it is config-dependent. > > > > > > From a quick look it appears that large amounts of kernel/rcupreempt.c > > > are now a printk-free zone. > > > > Drad, missed that bit, I did look at the calling end, but forgot the > > call_rcu() end :-/ > > > > The initial printk_tick() based implementation didn't suffer this > > problem, should we revert to that scheme? > > Dunno. Perhaps we could convert RCU_DATA_ME's spinlock_t into an > rwlock and do read_lock() in call_rcu()? Then we can should be able to > call printk from inside that read_lock(), but not inside write_lock(), > which, with suitable warning comments might be acceptable. > > afacit everything in call_rcu()'s *rdp is cpu-local and is protected by > local_irq_save(). rcu_ctrlblk.completed and rcu_flipped need some > protection, but a) rdp->lock isn't sufficient anyway and b) > read_lock protection would suffice. Maybe other CPUs can alter *rdp > while __rcu_advance_callbacks() is running. > > Anyway, that's all handwaving. My point is that making rcupreempt.c > more robust and more concurrent might be an alternative fix, and might > be beneficial in its own right. Working out the details is what we > have Pauls for ;)
Hehe :-) Just in case Paul shows he's human and cannot work his way around it, I just posted a new version of the printk_tick() stuff.. --
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/2] printk vs rq->lock and xtime lock
, Peter Zijlstra
, (Mon Mar 24, 5:24 am)
Re: [PATCH 0/2] printk vs rq->lock and xtime lock
, Marcin Slusarz
, (Mon Mar 24, 7:31 am)
Re: [PATCH 0/2] printk vs rq->lock and xtime lock
, Linus Torvalds
, (Mon Mar 24, 10:58 am)
Re: [PATCH 0/2] printk vs rq->lock and xtime lock
, Peter Zijlstra
, (Mon Mar 24, 11:15 am)
Re: [PATCH 0/2] printk vs rq->lock and xtime lock
, Linus Torvalds
, (Mon Mar 24, 11:16 am)
Re: [PATCH 0/2] printk vs rq->lock and xtime lock
, Andrew Morton
, (Mon Mar 24, 11:57 am)
Re: [PATCH 0/2] printk vs rq->lock and xtime lock
, Peter Zijlstra
, (Fri Aug 8, 6:30 am)
Re: [PATCH 0/2] printk vs rq->lock and xtime lock
, Peter Zijlstra
, (Fri Aug 8, 6:46 am)
Re: [PATCH 0/2] printk vs rq->lock and xtime lock
, Linus Torvalds
, (Fri Aug 8, 9:41 am)
Re: [PATCH 0/2] printk vs rq->lock and xtime lock
, Peter Zijlstra
, (Fri Aug 8, 10:10 am)
Re: [PATCH 0/2] printk vs rq->lock and xtime lock
, Linus Torvalds
, (Fri Aug 8, 10:25 am)
Re: [PATCH 0/2] printk vs rq->lock and xtime lock
, Peter Zijlstra
, (Fri Aug 8, 10:40 am)
Re: [PATCH 0/2] printk vs rq->lock and xtime lock
, Linus Torvalds
, (Fri Aug 8, 10:48 am)
Re: [PATCH 0/2] printk vs rq->lock and xtime lock
, Steven Rostedt
, (Fri Aug 8, 10:52 am)
[PATCH] printk: robustify printk
, Peter Zijlstra
, (Fri Aug 8, 11:14 am)
Re: [PATCH] printk: robustify printk
, Linus Torvalds
, (Fri Aug 8, 11:30 am)
Re: [PATCH] printk: robustify printk
, Peter Zijlstra
, (Fri Aug 8, 11:33 am)
Re: [PATCH] printk: robustify printk
, Andrew Morton
, (Fri Aug 8, 12:14 pm)
Re: [PATCH] printk: robustify printk
, Peter Zijlstra
, (Fri Aug 8, 12:21 pm)
Re: [PATCH] printk: robustify printk
, Andrew Morton
, (Fri Aug 8, 12:37 pm)
Re: [PATCH] printk: robustify printk
, Peter Zijlstra
, (Fri Aug 8, 12:47 pm)
Re: [PATCH] printk: robustify printk
, Peter Zijlstra
, (Fri Aug 8, 12:49 pm)
Re: [PATCH] printk: robustify printk
, Paul E. McKenney
, (Fri Aug 8, 1:20 pm)
Re: [PATCH] printk: robustify printk
, Paul E. McKenney
, (Fri Aug 8, 1:30 pm)
Re: [PATCH] printk: robustify printk
, Paul E. McKenney
, (Fri Aug 8, 1:32 pm)
Re: [PATCH] printk: robustify printk
, Peter Zijlstra
, (Fri Aug 8, 1:37 pm)
Re: [PATCH] printk: robustify printk
, Andrew Morton
, (Fri Aug 8, 1:46 pm)
Re: [PATCH] printk: robustify printk
, Steven Rostedt
, (Fri Aug 8, 1:50 pm)
Re: [PATCH] printk: robustify printk
, Linus Torvalds
, (Fri Aug 8, 1:57 pm)
Re: [PATCH] printk: robustify printk
, Andrew Morton
, (Fri Aug 8, 2:13 pm)
Re: [PATCH] printk: robustify printk
, Andi Kleen
, (Fri Aug 8, 2:35 pm)
Re: [PATCH] printk: robustify printk
, David Miller
, (Fri Aug 8, 4:02 pm)
Re: [PATCH] printk: robustify printk
, Paul E. McKenney
, (Fri Aug 8, 5:18 pm)
Re: [PATCH] printk: robustify printk
, Ingo Molnar
, (Mon Aug 11, 3:45 am)
Re: [PATCH] printk: robustify printk
, Andi Kleen
, (Mon Aug 11, 4:03 am)
Re: [PATCH] printk: robustify printk
, Peter Zijlstra
, (Mon Aug 11, 4:04 am)
Re: [PATCH] printk: robustify printk
, Peter Zijlstra
, (Mon Aug 11, 4:22 am)
Re: [PATCH] printk: robustify printk
, Andi Kleen
, (Mon Aug 11, 4:42 am)
Re: [PATCH] printk: robustify printk
, Ingo Molnar
, (Mon Aug 11, 4:51 am)
Re: [PATCH] printk: robustify printk
, Ingo Molnar
, (Mon Aug 11, 5:02 am)
Re: [PATCH] printk: robustify printk
, Andi Kleen
, (Mon Aug 11, 5:14 am)
Re: [PATCH] printk: robustify printk
, Ingo Molnar
, (Mon Aug 11, 5:36 am)
Re: [PATCH] printk: robustify printk
, Paul E. McKenney
, (Mon Aug 11, 6:22 am)
Re: [PATCH] printk: robustify printk
, Valdis.Kletnieks
, (Mon Aug 11, 7:15 am)
Re: [PATCH] printk: robustify printk
, Andi Kleen
, (Mon Aug 11, 7:29 am)
Re: [PATCH] printk: robustify printk
, Steven Rostedt
, (Mon Aug 11, 7:55 am)
Re: [PATCH] printk: robustify printk
, Paul E. McKenney
, (Mon Aug 11, 9:09 am)
Re: [PATCH] printk: robustify printk
, Jiri Kosina
, (Wed Aug 20, 5:40 am)
Re: [PATCH] printk: robustify printk
, Peter Zijlstra
, (Wed Aug 20, 5:43 am)
Re: [PATCH] printk: robustify printk
, Ingo Molnar
, (Wed Aug 20, 6:40 am)
Navigation
Create content
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
swhiteho
[PATCH 42/51] [GFS2] Move inode deletion out of blocking_cb
FUJITA Tomonori
Re: [Scst-devel] Integration of SCST in the mainstream Linux kernel
Benjamin Herrenschmidt
[git pull] Please pull powerpc.git merge branch
Ingo Molnar
Re: [RFC/RFT PATCH] sched: automated per tty task groups
Vivek Goyal
Re: [PATCH v4] sched: automated per session task groups
git
:
Mike Miller
git message
Junio C Hamano
Re: [PATCH] Detached HEAD (experimental)
Stefan Richter
Re: [kernel.org users] [RFD] On deprecating "git-foo" for builtins
Jeff King
Re: [PATCH] t7004: test that "git-tag -u" implies "-s"
A Large Angry SCM
Re: [RFC] origin link for cherry-pick and revert
linux-netdev
:
Arnaldo Carvalho de Melo
Re: [PATCH 06/37] dccp: Limit feature negotiation to connection setup phase
Gerrit Renker
[PATCH 1/5] dccp: Initialisation framework for feature negotiation
David Miller
Re: 2.6.27.18: bnx2/tg3: BUG: "scheduling while atomic" trying to ifenslave a seco...
Jeff Garzik
Re: [PATCH] drivers/net: remove network drivers' last few uses of IRQF_SAMPLE_RANDOM
David Miller
Re: [PATCH 2/5] dccp: Auto-load (when supported) CCID plugins for negotiation
git-commits-head
:
Linux Kernel Mailing List
libata: disable ATAPI AN by default
Linux Kernel Mailing List
i915: Don't whine when pci_enable_msi() fails.
Linux Kernel Mailing List
Documentation/timers/hpet_example.c: only build on X86
Linux Kernel Mailing List
ALSA: hda - Enable beep on Realtek codecs with PCI SSID override
Linux Kernel Mailing List
kbuild: move bounds.h to include/generated
openbsd-misc
:
Stuart Henderson
Re: Kuro5hin: OpenBSD Founder Theo deRaadt Has Conflict of Interest With AMD
Christian Weisgerber
Re: CARP with a single public IP address
Marco Peereboom
Re: OpenBSD culture?
"RALOVICH, Kristóf"
Re: thinkpad windows refund
Kevin
Re: uvm_mapent_alloc: out of static map entries on 4.3 i386
Colocation donated by:
Syndicate