From: Peter Zijlstra <peterz@infradead.org>
To: Viktor Rosendahl <viktor.rosendahl@gmail.com>
Cc: Steven Rostedt <rostedt@goodmis.org>,
Ingo Molnar <mingo@redhat.com>,
linux-kernel@vger.kernel.org,
Joel Fernandes <joel@joelfernandes.org>,
"Rafael J . Wysocki" <rafael.j.wysocki@intel.com>
Subject: Re: [PATCH v4 1/4] ftrace: Implement fs notification for tracing_max_latency
Date: Wed, 22 May 2019 16:35:45 +0200 [thread overview]
Message-ID: <20190522143545.GG16275@worktop.programming.kicks-ass.net> (raw)
In-Reply-To: <20190522003014.1359-1-viktor.rosendahl@gmail.com>
On Wed, May 22, 2019 at 02:30:14AM +0200, Viktor Rosendahl wrote:
> diff --git a/kernel/sched/core.c b/kernel/sched/core.c
> index 874c427742a9..440cd1a62722 100644
> --- a/kernel/sched/core.c
> +++ b/kernel/sched/core.c
> @@ -3374,6 +3374,7 @@ static void __sched notrace __schedule(bool preempt)
> struct rq *rq;
> int cpu;
>
> + trace_disable_fsnotify();
> cpu = smp_processor_id();
> rq = cpu_rq(cpu);
> prev = rq->curr;
> @@ -3449,6 +3450,7 @@ static void __sched notrace __schedule(bool preempt)
> }
>
> balance_callback(rq);
> + trace_enable_fsnotify();
> }
>
> void __noreturn do_task_dead(void)
> diff --git a/kernel/sched/idle.c b/kernel/sched/idle.c
> index 80940939b733..1a38bcdb3652 100644
> --- a/kernel/sched/idle.c
> +++ b/kernel/sched/idle.c
> @@ -225,6 +225,7 @@ static void cpuidle_idle_call(void)
> static void do_idle(void)
> {
> int cpu = smp_processor_id();
> + trace_disable_fsnotify();
> /*
> * If the arch has a polling bit, we maintain an invariant:
> *
> @@ -284,6 +285,7 @@ static void do_idle(void)
> smp_mb__after_atomic();
>
> sched_ttwu_pending();
> + /* schedule_idle() will call trace_enable_fsnotify() */
> schedule_idle();
>
> if (unlikely(klp_patch_pending(current)))
I still hate this.. why are we doing this? We already have this
stop_critical_timings() nonsense and are now adding more gunk.
> +static DEFINE_PER_CPU(atomic_t, notify_disabled) = ATOMIC_INIT(0);
> + atomic_set(&per_cpu(notify_disabled, cpu), 1);
> + atomic_set(&per_cpu(notify_disabled, cpu), 0);
> + if (!atomic_read(&per_cpu(notify_disabled, cpu)))
That's just wrong on so many levels..
next prev parent reply other threads:[~2019-05-22 14:36 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-17 20:34 [PATCH v4 0/4] Some new features for the latency tracers Viktor Rosendahl
2019-05-17 20:34 ` [PATCH v4 1/4] ftrace: Implement fs notification for tracing_max_latency Viktor Rosendahl
2019-05-21 16:01 ` Steven Rostedt
2019-05-22 0:30 ` Viktor Rosendahl
2019-05-22 1:09 ` Steven Rostedt
2019-05-22 14:35 ` Peter Zijlstra [this message]
2019-05-22 14:43 ` Steven Rostedt
2019-05-22 14:31 ` Peter Zijlstra
2019-05-17 20:34 ` [PATCH v4 2/4] preemptirq_delay_test: Add the burst feature and a sysfs trigger Viktor Rosendahl
2019-05-17 20:34 ` [PATCH v4 3/4] Add the latency-collector to tools Viktor Rosendahl
2019-05-17 20:34 ` [PATCH v4 4/4] ftrace: Add an option for tracing console latencies Viktor Rosendahl
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=20190522143545.GG16275@worktop.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=joel@joelfernandes.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=rafael.j.wysocki@intel.com \
--cc=rostedt@goodmis.org \
--cc=viktor.rosendahl@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox