linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Daniel Bristot de Oliveira <bristot@redhat.com>
To: Joel Fernandes <joel@joelfernandes.org>
Cc: linux-kernel@vger.kernel.org,
	Steven Rostedt <rostedt@goodmis.org>,
	Arnaldo Carvalho de Melo <acme@kernel.org>,
	Ingo Molnar <mingo@redhat.com>, Andy Lutomirski <luto@kernel.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Borislav Petkov <bp@alien8.de>,
	Peter Zijlstra <peterz@infradead.org>,
	"H. Peter Anvin" <hpa@zytor.com>, Jiri Olsa <jolsa@redhat.com>,
	Namhyung Kim <namhyung@kernel.org>,
	Alexander Shishkin <alexander.shishkin@linux.intel.com>,
	Tommaso Cucinotta <tommaso.cucinotta@santannapisa.it>,
	Romulo Silva de Oliveira <romulo.deoliveira@ufsc.br>,
	paulmck@linux.vnet.ibm.com, Clark Williams <williams@redhat.com>,
	x86@kernel.org
Subject: Re: [RFC PATCH 0/7] Early task context tracking
Date: Mon, 8 Apr 2019 14:54:54 +0200	[thread overview]
Message-ID: <09416831-0c99-16ea-9ff0-128dd75f1b1f@redhat.com> (raw)
In-Reply-To: <20190404174037.GA183378@google.com>

On 4/4/19 7:40 PM, Joel Fernandes wrote:
>> Currently, recursion control uses the preempt_counter to
>> identify the current context. The NMI/HARD/SOFT IRQ counters
>> are set in the preempt_counter in the irq_enter/exit functions.
> Just started looking.
> 
> Thinking out loud... can we not just update the preempt_count as early on
> entry and as late on exit, as possible, and fix it that way? (Haven't fully
> yet looked into what could break if we did that.)
> 
> I also feel the context tracking should be unified, right now we already have
> two methods AFAIK - preempt_count and lockdep. Now this is yet another third.
> Granted lockdep cannot be enabled in production, but still. It will be nice
> to unify these tracking methods and if there is a single point of all such
> context tracking that works well, and even better if we can just fix
> preempt_count and use that for non-debugging usecases.
> 
> Also I feel in_interrupt() etc should be updated to rely on such tracking
> methods if something other than preempt_count is used..

Hi Joel,

I agree with you that it is important to have a single method to identify the
context.

I did the RFC using a specific percpu variable to make things simpler. Also
because I tried to move set/unset of the preempt_counter and my dev VM stopped
booting. So it looked, somehow, risky to move the preempt_counter.

Still, if people believe it is better to use the preempt_counter... I am not
against...

-- Daniel


> thanks,
> 
>  - Joel
> 
> 


      reply	other threads:[~2019-04-08 12:55 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-02 20:03 [RFC PATCH 0/7] Early task context tracking Daniel Bristot de Oliveira
2019-04-02 20:03 ` [RFC PATCH 1/7] x86/entry: Add support for early " Daniel Bristot de Oliveira
2019-04-02 20:03 ` [RFC PATCH 2/7] trace: Move the trace recursion context enum to trace.h and reuse it Daniel Bristot de Oliveira
2019-04-02 20:03 ` [RFC PATCH 3/7] trace: Optimize trace_get_context_bit() Daniel Bristot de Oliveira
2019-04-02 20:03 ` [RFC PATCH 4/7] trace/ring_buffer: Use trace_get_context_bit() Daniel Bristot de Oliveira
2019-04-02 20:03 ` [RFC PATCH 5/7] trace: Use early task context tracking if available Daniel Bristot de Oliveira
2019-04-02 20:03 ` [RFC PATCH 6/7] events: Create an trace_get_context_bit() Daniel Bristot de Oliveira
2019-04-02 20:03 ` [RFC PATCH 7/7] events: Use early task context tracking if available Daniel Bristot de Oliveira
2019-04-04  0:01 ` [RFC PATCH 0/7] Early task context tracking Andy Lutomirski
2019-04-04  9:42   ` Peter Zijlstra
2019-04-08 12:47   ` Daniel Bristot de Oliveira
2019-04-08 16:08     ` Andy Lutomirski
2019-04-04 17:40 ` Joel Fernandes
2019-04-08 12:54   ` Daniel Bristot de Oliveira [this message]

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=09416831-0c99-16ea-9ff0-128dd75f1b1f@redhat.com \
    --to=bristot@redhat.com \
    --cc=acme@kernel.org \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=bp@alien8.de \
    --cc=hpa@zytor.com \
    --cc=joel@joelfernandes.org \
    --cc=jolsa@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@kernel.org \
    --cc=mingo@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=paulmck@linux.vnet.ibm.com \
    --cc=peterz@infradead.org \
    --cc=romulo.deoliveira@ufsc.br \
    --cc=rostedt@goodmis.org \
    --cc=tglx@linutronix.de \
    --cc=tommaso.cucinotta@santannapisa.it \
    --cc=williams@redhat.com \
    --cc=x86@kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).