mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Liao, Chang" <liaochang1@huawei.com>
To: Andrii Nakryiko <andrii.nakryiko@gmail.com>,
	Oleg Nesterov <oleg@redhat.com>
Cc: Andrii Nakryiko <andrii@kernel.org>,
	<linux-trace-kernel@vger.kernel.org>, <peterz@infradead.org>,
	<rostedt@goodmis.org>, <mhiramat@kernel.org>,
	<bpf@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<jolsa@kernel.org>, <paulmck@kernel.org>
Subject: Re: [PATCH 0/8] uprobes: RCU-protected hot path optimizations
Date: Thu, 8 Aug 2024 15:51:08 +0800	[thread overview]
Message-ID: <3a43c363-427c-65d4-bc74-42ce13793331@huawei.com> (raw)
In-Reply-To: <CAEf4BzZ8SaFK4iMtPPxYZQjHOvaPqpKApE8=Bz+h29xq+xMEsA@mail.gmail.com>



在 2024/8/8 1:31, Andrii Nakryiko 写道:
> On Wed, Aug 7, 2024 at 10:11 AM Oleg Nesterov <oleg@redhat.com> wrote:
>>
>> On 08/07, Andrii Nakryiko wrote:
>>>
>>> Yes, I was waiting for more of Peter's comments, but I guess I'll just
>>> send a v2 today.
>>
>> OK,
>>
>>> I'll probably include the SRCU+timeout logic for
>>> return_instances, and maybe lockless VMA parts as well.
>>
>> Well, feel free to do what you think right, but perhaps it would be
>> better to push this series first? at least 1-4.
> 
> Ok, I can send those first 4 patches first and hopefully we can land
> them soon and move to the next part. I just also wrote up details
> about that crash in rb_find_rcu().
> 
>>
>> As for lockless VMA. To me this needs more discussions. I didn't read
> 
> We are still discussing, feel free to join the conversation.
> 
>> your conversation with Peter and Suren carefully, but I too have some
>> concerns. Most probably I am wrong, and until I saw this thread I didn't
>> even know that vm_area_free() uses call_rcu() if CONFIG_PER_VMA_LOCK,
>> but still.
>>
>>>> As for 8/8 - I leave it to you and Peter. I'd prefer SRCU though ;)
>>>
>>> Honestly curious, why the preference?
>>
>> Well, you can safely ignore me, but since you have asked ;)
>>
>> I understand what SRCU does, and years ago I even understood (I hope)
>> the implementation. More or less the same for rcu_tasks. But as for
>> the _trace flavour, I simply fail to understand its semantics.
> 
> Ok, I won't try to repeat Paul's explanations. If you are curious you
> can find them in comments to my previous batch register/unregister API
> patches.
> 
>>
>>> BTW, while you are here :) What can you say about
>>> current->sighand->siglock use in handle_singlestep()?
>>
>> It should die, and this looks simple. I disagree with the patches
>> from Liao, see the
>> https://lore.kernel.org/all/20240801082407.1618451-1-liaochang1@huawei.com/
>> thread, but I agree with the intent.
> 
> I wasn't aware of this patch, thanks for mentioning it. Strange that
> me or at least bpf@vger.kernel.org wasn't CC'ed.
> 
> Liao, please cc bpf@ mailing list for future patches like that.

OK, sorry about that.

> 
>>
>> IMO, we need a simple "bool restore_sigpending" in uprobe_task, it will make the
>> necessary changes really simple.
> 

[...]

>>
>> (To clarify. In fact I think that a new TIF_ or even PF_ flag makes more sense,
>>  afaics it can have more users. But I don't think that uprobes can provide enough
>>  justification for that right now)

I also face the same choice when Oleg suggested me to add new flag to track the denied
flag, due to I haven't encountered scenarios outside of uprobe that would deny signal,
so I'm not confident of introduce new TIF_ flag without a fully understanding of potential
potential impacts.

>>
>> Oleg.
>>

-- 
BR
Liao, Chang

      parent reply	other threads:[~2024-08-08  7:51 UTC|newest]

Thread overview: 51+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-31 21:42 Andrii Nakryiko
2024-07-31 21:42 ` [PATCH 1/8] rbtree: provide rb_find_rcu() / rb_find_add_rcu() Andrii Nakryiko
2024-07-31 21:42 ` [PATCH 2/8] uprobes: revamp uprobe refcounting and lifetime management Andrii Nakryiko
2024-08-01 11:09   ` Jiri Olsa
2024-08-01 16:49     ` Andrii Nakryiko
2024-08-01 22:07   ` Andrii Nakryiko
2024-08-02  8:50     ` Oleg Nesterov
2024-08-02 14:58       ` Andrii Nakryiko
2024-08-02 22:19         ` Oleg Nesterov
2024-08-02 11:11   ` Jiri Olsa
2024-08-02 15:03     ` Andrii Nakryiko
2024-08-05 13:44   ` Oleg Nesterov
2024-08-05 17:29     ` Andrii Nakryiko
2024-08-06 10:45       ` Oleg Nesterov
2024-07-31 21:42 ` [PATCH 3/8] uprobes: protected uprobe lifetime with SRCU Andrii Nakryiko
2024-08-01 12:23   ` Liao, Chang
2024-08-01 16:49     ` Andrii Nakryiko
2024-08-02  1:30       ` Liao, Chang
2024-08-05 14:51   ` Oleg Nesterov
2024-08-05 17:31     ` Andrii Nakryiko
2024-07-31 21:42 ` [PATCH 4/8] uprobes: get rid of enum uprobe_filter_ctx in uprobe filter callbacks Andrii Nakryiko
2024-07-31 21:42 ` [PATCH 5/8] uprobes: travers uprobe's consumer list locklessly under SRCU protection Andrii Nakryiko
2024-08-01 14:27   ` Jiri Olsa
2024-08-01 16:49     ` Andrii Nakryiko
2024-08-05 15:59   ` Oleg Nesterov
2024-08-05 17:31     ` Andrii Nakryiko
2024-08-06 10:54       ` Oleg Nesterov
2024-07-31 21:42 ` [PATCH 6/8] perf/uprobe: split uprobe_unregister() Andrii Nakryiko
2024-08-02  2:41   ` Liao, Chang
2024-08-02 15:05     ` Andrii Nakryiko
2024-08-05 20:01       ` Andrii Nakryiko
2024-08-06  1:50         ` Liao, Chang
2024-08-07 13:17   ` Oleg Nesterov
2024-08-07 15:24     ` Andrii Nakryiko
2024-07-31 21:42 ` [PATCH 7/8] uprobes: perform lockless SRCU-protected uprobes_tree lookup Andrii Nakryiko
2024-08-07 17:14   ` Andrii Nakryiko
2024-08-08 10:04     ` Oleg Nesterov
2024-08-08 14:29     ` Oleg Nesterov
2024-08-08 17:00       ` Andrii Nakryiko
2024-08-08 13:40   ` Oleg Nesterov
2024-08-10 14:00     ` Oleg Nesterov
2024-07-31 21:42 ` [PATCH 8/8] uprobes: switch to RCU Tasks Trace flavor for better performance Andrii Nakryiko
2024-08-01  9:35   ` Peter Zijlstra
2024-08-01 16:49     ` Andrii Nakryiko
2024-08-01 18:05     ` Paul E. McKenney
2024-08-07 13:29 ` [PATCH 0/8] uprobes: RCU-protected hot path optimizations Oleg Nesterov
2024-08-07 15:24   ` Andrii Nakryiko
2024-08-07 17:11     ` Oleg Nesterov
2024-08-07 17:31       ` Andrii Nakryiko
2024-08-07 18:24         ` Oleg Nesterov
2024-08-08  7:51         ` Liao, Chang [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=3a43c363-427c-65d4-bc74-42ce13793331@huawei.com \
    --to=liaochang1@huawei.com \
    --cc=andrii.nakryiko@gmail.com \
    --cc=andrii@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=jolsa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-trace-kernel@vger.kernel.org \
    --cc=mhiramat@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

all inboxes | Powered by JetHome®