From: Hari Bathini <hbathini@linux.ibm.com>
To: Christophe Leroy <christophe.leroy@csgroup.eu>,
Song Liu <song@kernel.org>
Cc: Song Liu <songliubraving@fb.com>,
Daniel Borkmann <daniel@iogearbox.net>,
Alexei Starovoitov <ast@kernel.org>,
Andrii Nakryiko <andrii@kernel.org>,
"Naveen N. Rao" <naveen.n.rao@linux.ibm.com>,
"bpf@vger.kernel.org" <bpf@vger.kernel.org>,
linuxppc-dev <linuxppc-dev@lists.ozlabs.org>
Subject: Re: [PATCH v4 4/5] powerpc/code-patching: introduce patch_instructions()
Date: Fri, 29 Sep 2023 01:39:31 +0530 [thread overview]
Message-ID: <2fccf899-ca5b-4c77-4357-b6c6e1f72201@linux.ibm.com> (raw)
In-Reply-To: <2dffb52c-39f5-4d27-8a51-e5af643c1be4@csgroup.eu>
On 26/09/23 12:21 pm, Christophe Leroy wrote:
>
>
> Le 26/09/2023 à 00:50, Song Liu a écrit :
>> On Fri, Sep 8, 2023 at 6:28 AM Hari Bathini <hbathini@linux.ibm.com> wrote:
>>>
>>> patch_instruction() entails setting up pte, patching the instruction,
>>> clearing the pte and flushing the tlb. If multiple instructions need
>>> to be patched, every instruction would have to go through the above
>>> drill unnecessarily. Instead, introduce function patch_instructions()
>>> that sets up the pte, clears the pte and flushes the tlb only once per
>>> page range of instructions to be patched. This adds a slight overhead
>>> to patch_instruction() call while improving the patching time for
>>> scenarios where more than one instruction needs to be patched.
>>>
>>> Signed-off-by: Hari Bathini <hbathini@linux.ibm.com>
>>
>> I didn't see this one when I reviewed 1/5. Please ignore that comment.
>
> If I remember correctry, patch 1 introduces a huge performance
> degradation, which gets then improved with this patch.
>
> As I said before, I'd expect patch 4 to go first then get
> bpf_arch_text_copy() be implemented with patch_instructions() directly.
>
Thanks for the reviews, Christophe & Song.
Posted v5 based on your inputs.
- Hari
next prev parent reply other threads:[~2023-09-28 20:10 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-08 13:27 [PATCH v4 0/5] powerpc/bpf: use BPF prog pack allocator Hari Bathini
2023-09-08 13:27 ` [PATCH v4 1/5] powerpc/bpf: implement bpf_arch_text_copy Hari Bathini
2023-09-25 22:01 ` Song Liu
2023-09-08 13:27 ` [PATCH v4 2/5] powerpc/bpf: implement bpf_arch_text_invalidate for bpf_prog_pack Hari Bathini
2023-09-08 13:27 ` [PATCH v4 3/5] powerpc/bpf: use bpf_jit_binary_pack_[alloc|finalize|free] Hari Bathini
2023-09-25 22:15 ` Song Liu
2023-09-08 13:27 ` [PATCH v4 4/5] powerpc/code-patching: introduce patch_instructions() Hari Bathini
2023-09-25 22:50 ` Song Liu
2023-09-26 6:51 ` Christophe Leroy
2023-09-28 20:09 ` Hari Bathini [this message]
2023-09-08 13:27 ` [PATCH v4 5/5] powerpc/bpf: use patch_instructions() Hari Bathini
2023-09-25 6:56 ` [PATCH v4 0/5] powerpc/bpf: use BPF prog pack allocator Hari Bathini
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=2fccf899-ca5b-4c77-4357-b6c6e1f72201@linux.ibm.com \
--to=hbathini@linux.ibm.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=christophe.leroy@csgroup.eu \
--cc=daniel@iogearbox.net \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=naveen.n.rao@linux.ibm.com \
--cc=song@kernel.org \
--cc=songliubraving@fb.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