* [PATCH] PREEMPT_RT_FULL Build error fix
@ 2011-08-26 12:06 John Kacur
2011-09-01 19:14 ` Thomas Gleixner
0 siblings, 1 reply; 3+ messages in thread
From: John Kacur @ 2011-08-26 12:06 UTC (permalink / raw)
To: Thomas Gleixner, rt-users; +Cc: Peter Zijlstra, lkml, John Kacur
Problem:
make O=/bld/3.0.3-rt11/ kernel/fork.o
/home/jkacur/jk-2.6/kernel/fork.c:91: error: section of ‘name’ conflicts with previous declaration
__cacheline_aligned is already part of the definition of DEFINE_RWLOCK
for -rt
However it is not always used for the tasklist_lock in non-rt, so it can't
simply be added to the definition of DEFINE_RWLOCK in non-rt, so I modified
the definition in fork.c
Signed-off-by: John Kacur
---
kernel/fork.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/kernel/fork.c b/kernel/fork.c
index aa5fe26..0d264ec 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -87,7 +87,11 @@ int max_threads; /* tunable limit on nr_threads */
DEFINE_PER_CPU(unsigned long, process_counts) = 0;
+#ifndef CONFIG_PREEMPT_RT_FULL
__cacheline_aligned DEFINE_RWLOCK(tasklist_lock); /* outer */
+#else
+DEFINE_RWLOCK(tasklist_lock); /* outer */
+#endif
#ifdef CONFIG_PROVE_RCU
int lockdep_tasklist_lock_is_held(void)
--
1.7.2.3
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] PREEMPT_RT_FULL Build error fix
2011-08-26 12:06 [PATCH] PREEMPT_RT_FULL Build error fix John Kacur
@ 2011-09-01 19:14 ` Thomas Gleixner
2011-09-06 9:25 ` John Kacur
0 siblings, 1 reply; 3+ messages in thread
From: Thomas Gleixner @ 2011-09-01 19:14 UTC (permalink / raw)
To: John Kacur; +Cc: rt-users, Peter Zijlstra, lkml
[-- Attachment #1: Type: TEXT/PLAIN, Size: 651 bytes --]
On Fri, 26 Aug 2011, John Kacur wrote:
> Problem:
> make O=/bld/3.0.3-rt11/ kernel/fork.o
> /home/jkacur/jk-2.6/kernel/fork.c:91: error: section of ‘name’ conflicts with previous declaration
>
> __cacheline_aligned is already part of the definition of DEFINE_RWLOCK
> for -rt
>
> However it is not always used for the tasklist_lock in non-rt, so it can't
> simply be added to the definition of DEFINE_RWLOCK in non-rt, so I modified
> the definition in fork.c
-ENOPARSE
The real question is whether RWLOCKS should be cacheline aligned in
general or the RT addon is just overkill. Slapping an ifdef around
does not answer that.
Thanks,
tglx
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] PREEMPT_RT_FULL Build error fix
2011-09-01 19:14 ` Thomas Gleixner
@ 2011-09-06 9:25 ` John Kacur
0 siblings, 0 replies; 3+ messages in thread
From: John Kacur @ 2011-09-06 9:25 UTC (permalink / raw)
To: Thomas Gleixner; +Cc: rt-users, Peter Zijlstra, lkml
On Thu, Sep 1, 2011 at 9:14 PM, Thomas Gleixner <tglx@linutronix.de> wrote:
> On Fri, 26 Aug 2011, John Kacur wrote:
>
>> Problem:
>> make O=/bld/3.0.3-rt11/ kernel/fork.o
>> /home/jkacur/jk-2.6/kernel/fork.c:91: error: section of ‘name’ conflicts with previous declaration
>>
>> __cacheline_aligned is already part of the definition of DEFINE_RWLOCK
>> for -rt
>>
>> However it is not always used for the tasklist_lock in non-rt, so it can't
>> simply be added to the definition of DEFINE_RWLOCK in non-rt, so I modified
>> the definition in fork.c
>
> -ENOPARSE
>
> The real question is whether RWLOCKS should be cacheline aligned in
> general or the RT addon is just overkill. Slapping an ifdef around
> does not answer that.
>
Right, this was just a "put out a build-break fire" for now patch and
not a good long term patch. I noticed that of all the mainline
DEFINE_RWLOCKs that only the tasklist_lock is cache aligned. I'm
wondering if there is a reason for that, or just more of a historical
accident.
Regarding cache aligning the rwlocks in -rt, I also can't find the
historical reason for it, do you remember if it was for latency
performance, or did we have a atomicity issue on some architectures
when we didn't cache align it?
Thanks
--
To unsubscribe from this list: send the line "unsubscribe linux-rt-users" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-09-06 9:25 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-26 12:06 [PATCH] PREEMPT_RT_FULL Build error fix John Kacur
2011-09-01 19:14 ` Thomas Gleixner
2011-09-06 9:25 ` John Kacur
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox