lkml.org 
[lkml]   [2008]   [Nov]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: ftrace: preemptoff selftest not working

* Heiko Carstens <heiko.carstens@de.ibm.com> wrote:

> Hi Steven,
>
> I was wondering why the preemptoff and preemptirqsoff tracer
> selftests don't work on s390. After all its just that they get
> called from non-preemptible context:
>
> kernel_init() will execute all initcalls, however the first line in
> kernel_init() is lock_kernel(), which causes the preempt_count to be
> increased. Any later calls to add_preempt_count() (especially those
> from the selftests) will therefore not result in a call to
> trace_preempt_off() since the check below in add_preempt_count()
> will be false:
>
> if (preempt_count() == val)
> trace_preempt_off(CALLER_ADDR0, get_parent_ip(CALLER_ADDR1));
>
> Hence the trace buffer will be empty.

ah, indeed :-)

side-effect of the removal of CONFIG_PREEMPT_BKL - these things were
written before that and nobody noticed that the self-test stopped
working for real.

> The patch below makes the selftests working for me, since then they
> run in preemptible context. But it is ugly and I'm not proposing it
> for upstream ;)
>
> Just wanted to make you aware that there is a bug.

indeed it's ugly. We could perhaps drop the BKL in the selftests?

Ingo


\
 
 \ /
  Last update: 2008-11-18 14:51    [W:0.043 / U:0.188 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site