From: Dan Carpenter <dan.carpenter@oracle.com>
To: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: linux-perf-users@vger.kernel.org,
Peter Zijlstra <peterz@infradead.org>,
Thomas Gleixner <tglx@linutronix.de>
Subject: Re: [bug report] irq_work: Allow irq_work_sync() to sleep if irq_work() no IRQ support.
Date: Wed, 26 Jan 2022 16:24:57 +0300 [thread overview]
Message-ID: <20220126132457.GZ1978@kadam> (raw)
In-Reply-To: <YfE6YV7V2s89A55f@linutronix.de>
On Wed, Jan 26, 2022 at 01:11:13PM +0100, Sebastian Andrzej Siewior wrote:
>
> > __perf_event_exit_context() <- disables preempt
> don't see additional one.
>
> > -> __perf_remove_from_context()
In linux-next perf_remove_from_context() calls raw_spin_lock() which
disabled preemption.
kernel/events/core.c
13343 static void __perf_event_exit_context(void *__info)
13344 {
13345 struct perf_event_context *ctx = __info;
13346 struct perf_cpu_context *cpuctx = __get_cpu_context(ctx);
13347 struct perf_event *event;
13348
13349 raw_spin_lock(&ctx->lock);
^^^^^^^^^^^^^^^^^^^^^^^^^
13350 ctx_sched_out(ctx, cpuctx, EVENT_TIME);
13351 list_for_each_entry(event, &ctx->event_list, event_entry)
13352 __perf_remove_from_context(event, cpuctx, ctx, (void *)DETACH_GROUP);
^^^^^^^^^^^^^^^^^^^^^^^^^^^
13353 raw_spin_unlock(&ctx->lock);
13354 }
regards,
dan carpenter
prev parent reply other threads:[~2022-01-26 13:25 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-19 13:37 [bug report] irq_work: Allow irq_work_sync() to sleep if irq_work() no IRQ support Dan Carpenter
2022-01-26 12:11 ` Sebastian Andrzej Siewior
2022-01-26 13:24 ` Dan Carpenter [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=20220126132457.GZ1978@kadam \
--to=dan.carpenter@oracle.com \
--cc=bigeasy@linutronix.de \
--cc=linux-perf-users@vger.kernel.org \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
/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.