linux-trace-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Zheng Yejian <zhengyejian@huaweicloud.com>
Cc: mhiramat@kernel.org, mathieu.desnoyers@efficios.com,
	linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org
Subject: Re: [PATCH] tracing: Mitigate possible softlockup in __tracing_open()
Date: Tue, 27 Aug 2024 07:52:41 -0400	[thread overview]
Message-ID: <20240827075241.5cd652ae@rorschach.local.home> (raw)
In-Reply-To: <d3c2ecfd-6590-dc17-4ea5-d80872d01016@huaweicloud.com>

On Tue, 27 Aug 2024 09:29:55 +0800
Zheng Yejian <zhengyejian@huaweicloud.com> wrote:

 
> > This is the wrong place to put this. If the problem is with
> > tracing_iter_reset(), then add it there.
> > 
> > 	while (ring_buffer_iter_peek(buf_iter, &ts)) {
> > 		if (ts >= iter->array_buffer->time_start)
> > 			break;
> > 		entries++;
> > 		ring_buffer_iter_advance(buf_iter);
> > 		/* This could be a big loop */
> > 		cond_resched();  
> 
> Do resched check every event peek, I'm afraid there will
> be too many 're-schedule'.

cond_resched() as the name suggests only schedules conditionally if
NEED_RESCHED is set. This isn't a fast path (obviously, as it requires
a cond_resched).

-- Steve

  reply	other threads:[~2024-08-27 11:52 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-24  3:03 [PATCH] tracing: Mitigate possible softlockup in __tracing_open() Zheng Yejian
2024-08-25 15:05 ` Masami Hiramatsu
2024-08-26  2:55   ` Zheng Yejian
2024-08-26 14:35 ` Steven Rostedt
2024-08-27  1:29   ` Zheng Yejian
2024-08-27 11:52     ` Steven Rostedt [this message]
2024-08-27 12:46       ` [PATCH v2] tracing: Avoid possible softlockup in tracing_iter_reset() Zheng Yejian

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=20240827075241.5cd652ae@rorschach.local.home \
    --to=rostedt@goodmis.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-trace-kernel@vger.kernel.org \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=mhiramat@kernel.org \
    --cc=zhengyejian@huaweicloud.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;
as well as URLs for NNTP newsgroup(s).