From: "Liao, Chang" <liaochang1@huawei.com>
To: Oleg Nesterov <oleg@redhat.com>
Cc: <mhiramat@kernel.org>, <peterz@infradead.org>, <mingo@redhat.com>,
<acme@kernel.org>, <namhyung@kernel.org>, <mark.rutland@arm.com>,
<alexander.shishkin@linux.intel.com>, <jolsa@kernel.org>,
<irogers@google.com>, <adrian.hunter@intel.com>,
<kan.liang@linux.intel.com>, <linux-kernel@vger.kernel.org>,
<linux-trace-kernel@vger.kernel.org>,
<linux-perf-users@vger.kernel.org>, <bpf@vger.kernel.org>,
Andrii Nakryiko <andrii@kernel.org>,
Masami Hiramatsu <mhiramat@kernel.org>,
Steven Rostedt <rostedt@goodmis.org>, <paulmck@kernel.org>
Subject: Re: [PATCH] uprobes: Improve scalability by reducing the contention on siglock
Date: Thu, 8 Aug 2024 20:31:40 +0800 [thread overview]
Message-ID: <ef7b6889-7e15-1ff3-c7a5-b3c6dabb13d4@huawei.com> (raw)
In-Reply-To: <20240808102837.GC8020@redhat.com>
在 2024/8/8 18:28, Oleg Nesterov 写道:
> On 08/08, Liao, Chang wrote:
>>
>> - pre_ssout() resets the deny signal flag
>>
>> - uprobe_deny_signal() sets the deny signal flag when TIF_SIGPENDING is cleared.
>>
>> - handle_singlestep() check the deny signal flag and restore TIF_SIGPENDING if necessary.
>>
>> Does this approach look correct to you,do do you have any other way to implement the "flag"?
>
> Yes. But I don't think pre_ssout() needs to clear this flag. handle_singlestep() resets/clears
> state, active_uprobe, frees insn slot. So I guess we only need
>
>
> --- x/kernel/events/uprobes.c
> +++ x/kernel/events/uprobes.c
> @@ -2308,9 +2308,10 @@ static void handle_singlestep(struct upr
> utask->state = UTASK_RUNNING;
> xol_free_insn_slot(current);
>
> - spin_lock_irq(¤t->sighand->siglock);
> - recalc_sigpending(); /* see uprobe_deny_signal() */
> - spin_unlock_irq(¤t->sighand->siglock);
> + if (utask->xxx) {
> + set_thread_flag(TIF_SIGPENDING);
> + utask->xxx = 0;
> + }
Agree, if no more discussion about this flag, I will just send v2 today.
Thanks.
>
> if (unlikely(err)) {
> uprobe_warn(current, "execute the probed insn, sending SIGILL.");
>
> and that is all.
>
> Oleg.
>
>
--
BR
Liao, Chang
next parent reply other threads:[~2024-08-08 12:31 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20240801082407.1618451-1-liaochang1@huawei.com>
[not found] ` <20240801140639.GE4038@redhat.com>
[not found] ` <51a756b7-3c2f-9aeb-1418-b38b74108ee6@huawei.com>
[not found] ` <20240802092406.GC12343@redhat.com>
[not found] ` <0c69ef28-26d8-4b6e-fa78-2211a7b84eca@huawei.com>
[not found] ` <20240806172529.GC20881@redhat.com>
[not found] ` <20240807101746.GA27715@redhat.com>
[not found] ` <3bb87fb4-c32e-0a35-0e93-5e1971fe8268@huawei.com>
[not found] ` <20240808102837.GC8020@redhat.com>
2024-08-08 12:31 ` Liao, Chang [this message]
2024-08-08 13:17 ` [PATCH] uprobes: Improve scalability by reducing the contention on siglock Oleg Nesterov
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=ef7b6889-7e15-1ff3-c7a5-b3c6dabb13d4@huawei.com \
--to=liaochang1@huawei.com \
--cc=acme@kernel.org \
--cc=adrian.hunter@intel.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=andrii@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=irogers@google.com \
--cc=jolsa@kernel.org \
--cc=kan.liang@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mhiramat@kernel.org \
--cc=mingo@redhat.com \
--cc=namhyung@kernel.org \
--cc=oleg@redhat.com \
--cc=paulmck@kernel.org \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.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