login
Login
/
Register
Search
Search this site:
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2008
»
July
»
31
Re: [PATCH] Fix Bug messages
view
thread
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
[view in full thread]
From: Peter Zijlstra
Subject:
Re: [PATCH] Fix Bug messages
Date: Wednesday, July 30, 2008 - 11:06 pm
On Wed, 2008-07-30 at 22:48 +0530, Chirag Jog wrote:
quoted text
> * J?rgen Mell <j.mell@t-online.de> [2008-07-30 11:01:32]: > > > Hello Thomas, > > > > On Wednesday, 30. July 2008, Thomas Gleixner wrote: > > > We are pleased to announce the 2.6.26-rt1 tree, which can be > > > downloaded from the location: > > > > I have tried the new kernel and have some good news and some bad news: > > > > The good news: The machine boots and seems to run without major problems. > > > > The bad news: It produces continuously lots of bug messages in the error > > logs (cf. attached dmesg.tgz). The error at rtmutex.c:743 was already > > present in 2.6.25-rt* when ACPI was enabled. The 'using smp_processor_id > > () in preemptible code' is new here with 2.6.26. > > > > Machine is an old Athlon XP (single core) on an EPOX mainboard with VIA > > chipset. > > > > If I can help with testing, please let me know. > > > > Bye, > > Jürgen > > > > > This patch should solve some of the bug messages. > It does two things: > 1. Change rt_runtime_lock to be a raw spinlock as the comment above it > says: it is nested inside the rq lock. > > 2. Change mnt_writers to be a per_cpu locked variable. > This eliminates the need for the codepath to disable preemption and > then potentially sleep, leading to the BUG messages
Looks sane, thanks Chirag!
quoted text
> Signed-Off-By: Chirag <chirag@linux.vnet.ibm.com> > > > > Index: linux-2.6.26-rt1/kernel/sched.c > =================================================================== > --- linux-2.6.26-rt1.orig/kernel/sched.c 2008-07-30 22:37:19.000000000 +0530 > +++ linux-2.6.26-rt1/kernel/sched.c 2008-07-30 22:37:24.000000000 +0530 > @@ -208,7 +208,7 @@ > > struct rt_bandwidth { > /* nests inside the rq lock: */ > - spinlock_t rt_runtime_lock; > + raw_spinlock_t rt_runtime_lock; > ktime_t rt_period; > u64 rt_runtime; > struct hrtimer rt_period_timer; > @@ -472,7 +472,7 @@ > u64 rt_time; > u64 rt_runtime; > /* Nests inside the rq lock: */ > - spinlock_t rt_runtime_lock; > + raw_spinlock_t rt_runtime_lock; > > #ifdef CONFIG_RT_GROUP_SCHED > unsigned long rt_nr_boosted; > Index: linux-2.6.26-rt1/fs/namespace.c > =================================================================== > --- linux-2.6.26-rt1.orig/fs/namespace.c 2008-07-30 22:39:30.000000000 +0530 > +++ linux-2.6.26-rt1/fs/namespace.c 2008-07-30 22:39:36.000000000 +0530 > @@ -178,13 +178,13 @@ > unsigned long count; > struct vfsmount *mnt; > } ____cacheline_aligned_in_smp; > -static DEFINE_PER_CPU(struct mnt_writer, mnt_writers); > +static DEFINE_PER_CPU_LOCKED(struct mnt_writer, mnt_writers); > > static int __init init_mnt_writers(void) > { > int cpu; > for_each_possible_cpu(cpu) { > - struct mnt_writer *writer = &per_cpu(mnt_writers, cpu); > + struct mnt_writer *writer = &per_cpu_var_locked(mnt_writers, cpu); > spin_lock_init(&writer->lock); > lockdep_set_class(&writer->lock, &writer->lock_class); > writer->count = 0; > @@ -199,7 +199,7 @@ > struct mnt_writer *cpu_writer; > > for_each_possible_cpu(cpu) { > - cpu_writer = &per_cpu(mnt_writers, cpu); > + cpu_writer = &per_cpu_var_locked(mnt_writers, cpu); > spin_unlock(&cpu_writer->lock); > } > } > @@ -251,8 +251,8 @@ > { > int ret = 0; > struct mnt_writer *cpu_writer; > - > - cpu_writer = &get_cpu_var(mnt_writers); > + int cpu = 0; > + cpu_writer = &get_cpu_var_locked(mnt_writers, &cpu); > spin_lock(&cpu_writer->lock); > if (__mnt_is_readonly(mnt)) { > ret = -EROFS; > @@ -262,7 +262,7 @@ > cpu_writer->count++; > out: > spin_unlock(&cpu_writer->lock); > - put_cpu_var(mnt_writers); > + put_cpu_var_locked(mnt_writers, cpu); > return ret; > } > EXPORT_SYMBOL_GPL(mnt_want_write); > @@ -273,7 +273,7 @@ > struct mnt_writer *cpu_writer; > > for_each_possible_cpu(cpu) { > - cpu_writer = &per_cpu(mnt_writers, cpu); > + cpu_writer = &per_cpu_var_locked(mnt_writers, cpu); > spin_lock(&cpu_writer->lock); > __clear_mnt_count(cpu_writer); > cpu_writer->mnt = NULL; > @@ -332,8 +332,8 @@ > { > int must_check_underflow = 0; > struct mnt_writer *cpu_writer; > - > - cpu_writer = &get_cpu_var(mnt_writers); > + int cpu = 0; > + cpu_writer = &get_cpu_var_locked(mnt_writers, &cpu); > spin_lock(&cpu_writer->lock); > > use_cpu_writer_for_mount(cpu_writer, mnt); > @@ -360,7 +360,7 @@ > * __mnt_writers can underflow. Without it, > * we could theoretically wrap __mnt_writers. > */ > - put_cpu_var(mnt_writers); > + put_cpu_var_locked(mnt_writers, cpu); > } > EXPORT_SYMBOL_GPL(mnt_drop_write); > > @@ -612,7 +612,7 @@ > * can come in. > */ > for_each_possible_cpu(cpu) { > - struct mnt_writer *cpu_writer = &per_cpu(mnt_writers, cpu); > + struct mnt_writer *cpu_writer = &per_cpu_var_locked(mnt_writers, cpu); > if (cpu_writer->mnt != mnt) > continue; > spin_lock(&cpu_writer->lock); > >
--
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:
2.6.24.7-rt15
, Thomas Gleixner
, (Fri Jul 25, 1:09 pm)
Re: 2.6.24.7-rt15
, Carsten Emde
, (Sat Jul 26, 4:03 am)
2.6.24.7-rt16
, Thomas Gleixner
, (Sun Jul 27, 9:16 am)
Re: 2.6.24.7-rt16
, Avuton Olrich
, (Sun Jul 27, 1:28 pm)
Re: 2.6.24.7-rt16
, Thomas Gleixner
, (Sun Jul 27, 1:37 pm)
Re: 2.6.24.7-rt16
, Wolfgang Grandegger
, (Mon Jul 28, 1:12 am)
Re: 2.6.24.7-rt16
, Peter Zijlstra
, (Mon Jul 28, 2:48 am)
Re: 2.6.24.7-rt16
, Wolfgang Grandegger
, (Mon Jul 28, 3:12 am)
Re: 2.6.24.7-rt16
, Thomas Gleixner
, (Tue Jul 29, 5:57 am)
2.6.26-rt1
, Thomas Gleixner
, (Tue Jul 29, 3:21 pm)
Re: 2.6.26-rt1
, Jürgen Mell
, (Wed Jul 30, 2:01 am)
Re: 2.6.26-rt1
, John Kacur
, (Wed Jul 30, 7:31 am)
Re: 2.6.26-rt1
, Ryan Hope
, (Wed Jul 30, 7:41 am)
[PATCH] Fix Bug messages
, Chirag Jog
, (Wed Jul 30, 10:18 am)
Re: [PATCH] Fix Bug messages
, Jürgen Mell
, (Wed Jul 30, 1:16 pm)
Re: [PATCH] Fix Bug messages
, Peter Zijlstra
, (Wed Jul 30, 11:06 pm)
Re: [PATCH] Fix Bug messages
, Sebastien Dugue
, (Thu Jul 31, 1:00 am)
Re: [PATCH] Fix Bug messages
, John Kacur
, (Thu Jul 31, 3:13 am)
Re: [PATCH] Fix Bug messages
, Sebastien Dugue
, (Thu Jul 31, 4:23 am)
Re: [PATCH] Fix Bug messages
, John Kacur
, (Thu Jul 31, 6:49 am)
Re: [PATCH] Fix Bug messages
, Peter Zijlstra
, (Thu Jul 31, 7:01 am)
Re: [PATCH] Fix Bug messages
, John Kacur
, (Thu Jul 31, 7:10 am)
Re: [PATCH] Fix Bug messages
, Peter Zijlstra
, (Thu Jul 31, 7:18 am)
Re: [PATCH] Fix Bug messages
, Sebastien Dugue
, (Thu Jul 31, 7:35 am)
Re: [PATCH] Fix Bug messages
, Clark Williams
, (Thu Jul 31, 8:01 am)
Re: [PATCH] Fix Bug messages
, Sebastien Dugue
, (Thu Jul 31, 8:14 am)
Re: 2.6.26-rt1
, Paul E. McKenney
, (Fri Aug 1, 2:11 pm)
Re: 2.6.26-rt1
, Paul E. McKenney
, (Fri Aug 1, 2:11 pm)
Re: 2.6.26-rt1
, Juergen Beisert
, (Mon Aug 11, 1:36 am)
Re: 2.6.26-rt1
, Juergen Beisert
, (Wed Aug 13, 6:30 am)
Re: 2.6.26-rt1
, Paul E. McKenney
, (Wed Aug 13, 9:37 am)
Navigation
Create content
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
David Howells
[PATCH] KEYS: Use the variable 'key' in keyctl_describe_key()
Greg Kroah-Hartman
[PATCH 17/36] sysdev: detect multiple driver registrations
Andy Walls
Re: [PATCH 11/32] v4l/cx18: update workqueue usage
Thomas Gleixner
[patch -mm 19/28] x86_64: Use generic cmos update
Greg Kroah-Hartman
[PATCH 09/36] driver core: register_memory/unregister_memory clean ups and bugfix
git
:
Mark Junker
git on MacOSX and files with decomposed utf-8 file names
Johannes Schindelin
Re: error: cannot lock ref 'refs/remotes/origin/*'
Pat Thoyts
[PATCH] git-gui: use themed tk widgets with Tk 8.5
Michael Witten
Re: 'git gc --aggressive' effectively unusable
Johannes Schindelin
Re: [PATCH 2/2] git-svn: support fetch with autocrlf on
linux-netdev
:
David Miller
Re: [PATCH 32/53] netns xfrm: finding policy in netns
Jean-Louis Dupond
Re: tg3 driver not advertising 1000mbit
Jan Engelhardt
[PATCH 1/3] net: tcp: make hybla selectable as default congestion module
Daniel Schaffrath
Re: tcp bw in 2.6
Matt Mackall
Re: [regression] nf_iterate(), BUG: unable to handle kernel NULL pointer dereference
git-commits-head
:
Linux Kernel Mailing List
V4L/DVB (8018): Add em2860 chip ID
Linux Kernel Mailing List
ipv6: fix an oops when force unload ipv6 module
Linux Kernel Mailing List
tracing: protect reader of cmdline output
Linux Kernel Mailing List
imxfb: Fix margin settings
Linux Kernel Mailing List
V4L/DVB (10826): cx88: Add IR support to pcHDTV HD3000 & HD5500
openbsd-misc
:
Stas Miasnikou
Re: Another question: device naming convention
Darrin Chandler
Re: That whole "Linux stealing our code" thing
Community First Financial
Teacher A+ Loan
Jan Stary
Re: audio recording levels
Andrej Elizarov
Re: Web Browsers
Colocation donated by:
Syndicate