From: Wu Zhangjin <wuzhangjin@gmail.com>
To: Ralf Baechle <ralf@linux-mips.org>
Cc: Zhang Le <r0bertz@gentoo.org>,
linux-kernel@vger.kernel.org, Nicholas Mc Guire <hofrat@hofr.at>,
Ingo Molnar <mingo@elte.hu>, Thomas Gleixner <tglx@linutronix.de>,
zhangfx@lemote.com, loongson-dev@googlegroups.com,
yanh@lemote.com, linux-mips@linux-mips.org,
linux-rt-users@vger.kernel.org
Subject: Re: "RT_PREEMPT for loongson" is updated to patch-2.6.29.1-rt8
Date: Mon, 20 Apr 2009 22:22:03 +0800 [thread overview]
Message-ID: <1240237323.8884.42.camel@falcon> (raw)
In-Reply-To: <20090420131022.GA10183@linux-mips.org>
On Mon, 2009-04-20 at 15:10 +0200, Ralf Baechle wrote:
> On Mon, Apr 20, 2009 at 10:01:55AM +0200, Ralf Baechle wrote:
>
> > > I have divided ftrace to several commits in the above git tree, hope you
> > > can check it, thx :-)
> > >
> > > in addition to the static/dynamic/graph function tracer & system call
> > > tracer implementation, a mips specific ring_buffer_time_stamp
> > > (kernel/trace/ring_buffer.c) is also implemented to get 1us precision
> > > time, this is very important to make ftrace available in mips,
> > > otherwise, we can only get 1ms precision time for the original
> > > ring_buffer_time_stamp is based on sched_clock(jiffies based).
> > >
> > > perhaps we can implement a more precise sched_clock directly, just as
> > > x86 does(native_sched_clock, tsc based), but in mips, there is only a
> > > 32bit timer count which will quickly overflow, so it will need an extra
> > > overflow protection, which may influence the other parts of the kernel.
> >
> > My git clone is still running to I'm commenting only on the patches you
> > posted earlier. #ifdef-MIPS'ing things into the generic kernel code
> > definately won't be an acceptable way to get µs resolution.
>
just fix it via moving mips specific ring_buffer_time_stamp to
arch/mips/kernel/ftrace.c via defining the original one as
__attribute__(weak).
in arch/mips/kernel/ftrace.c:
u64 native_ring_buffer_time_stamp(...) {
...
}
u64 ring_buffer_time_stamp(...)
__attribute__((alias("native_ring_buffer_time_stamp")));
in kernel/trace/ring_buffer.c:
-u64 ring_buffer_time_stamp(struct ring_buffer *buffer, int cpu)
+ u64 __attribute__((weak)) ring_buffer_time_stamp(struct ring_buffer
*buffer, int cpu)
*** not push to the git tree yet.
> In changeset e67f78d663a84ef93aa12c3c8c1adf3033c4f9a1 you introduce
> <asm/rwsem.h> but because RWSEM_GENERIC_SPINLOCK is always set that file
> won't ever be included.
>
Yes, currently, I'm trying to fix it.
> Ralf
WARNING: multiple messages have this Message-ID (diff)
From: Wu Zhangjin <wuzhangjin@gmail.com>
To: Ralf Baechle <ralf@linux-mips.org>
Cc: Zhang Le <r0bertz@gentoo.org>,
linux-kernel@vger.kernel.org, Nicholas Mc Guire <hofrat@hofr.at>,
Ingo Molnar <mingo@elte.hu>, Thomas Gleixner <tglx@linutronix.de>,
zhangfx@lemote.com, loongson-dev@googlegroups.com,
yanh@lemote.com, linux-mips@linux-mips.org,
linux-rt-users@vger.kernel.org
Subject: Re: "RT_PREEMPT for loongson" is updated to patch-2.6.29.1-rt8
Date: Mon, 20 Apr 2009 22:22:03 +0800 [thread overview]
Message-ID: <1240237323.8884.42.camel@falcon> (raw)
In-Reply-To: <20090420131022.GA10183@linux-mips.org>
On Mon, 2009-04-20 at 15:10 +0200, Ralf Baechle wrote:
> On Mon, Apr 20, 2009 at 10:01:55AM +0200, Ralf Baechle wrote:
>
> > > I have divided ftrace to several commits in the above git tree, hope you
> > > can check it, thx :-)
> > >
> > > in addition to the static/dynamic/graph function tracer & system call
> > > tracer implementation, a mips specific ring_buffer_time_stamp
> > > (kernel/trace/ring_buffer.c) is also implemented to get 1us precision
> > > time, this is very important to make ftrace available in mips,
> > > otherwise, we can only get 1ms precision time for the original
> > > ring_buffer_time_stamp is based on sched_clock(jiffies based).
> > >
> > > perhaps we can implement a more precise sched_clock directly, just as
> > > x86 does(native_sched_clock, tsc based), but in mips, there is only a
> > > 32bit timer count which will quickly overflow, so it will need an extra
> > > overflow protection, which may influence the other parts of the kernel.
> >
> > My git clone is still running to I'm commenting only on the patches you
> > posted earlier. #ifdef-MIPS'ing things into the generic kernel code
> > definately won't be an acceptable way to get µs resolution.
>
just fix it via moving mips specific ring_buffer_time_stamp to
arch/mips/kernel/ftrace.c via defining the original one as
__attribute__(weak).
in arch/mips/kernel/ftrace.c:
u64 native_ring_buffer_time_stamp(...) {
...
}
u64 ring_buffer_time_stamp(...)
__attribute__((alias("native_ring_buffer_time_stamp")));
in kernel/trace/ring_buffer.c:
-u64 ring_buffer_time_stamp(struct ring_buffer *buffer, int cpu)
+ u64 __attribute__((weak)) ring_buffer_time_stamp(struct ring_buffer
*buffer, int cpu)
*** not push to the git tree yet.
> In changeset e67f78d663a84ef93aa12c3c8c1adf3033c4f9a1 you introduce
> <asm/rwsem.h> but because RWSEM_GENERIC_SPINLOCK is always set that file
> won't ever be included.
>
Yes, currently, I'm trying to fix it.
> Ralf
--
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
next prev parent reply other threads:[~2009-04-20 14:22 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-20 2:12 "RT_PREEMPT for loongson" is updated to patch-2.6.29.1-rt8 Wu Zhangjin
2009-04-20 5:04 ` Zhang Le
2009-04-20 7:18 ` Wu Zhangjin
2009-04-20 8:01 ` Ralf Baechle
2009-04-20 13:10 ` Ralf Baechle
2009-04-20 14:22 ` Wu Zhangjin [this message]
2009-04-20 14:22 ` Wu Zhangjin
2009-04-28 12:29 ` Ralf Baechle
2009-04-28 12:29 ` Ralf Baechle
2009-04-28 15:57 ` Wu Zhangjin
2009-04-28 17:21 ` Wu Zhangjin
2009-04-29 19:38 ` Wu Zhangjin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1240237323.8884.42.camel@falcon \
--to=wuzhangjin@gmail.com \
--cc=hofrat@hofr.at \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@linux-mips.org \
--cc=linux-rt-users@vger.kernel.org \
--cc=loongson-dev@googlegroups.com \
--cc=mingo@elte.hu \
--cc=r0bertz@gentoo.org \
--cc=ralf@linux-mips.org \
--cc=tglx@linutronix.de \
--cc=yanh@lemote.com \
--cc=zhangfx@lemote.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.