Re: [PATCH v4 4/5] powerpc/code-patching: introduce patch_instructions()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





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@xxxxxxxxxxxxx> 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@xxxxxxxxxxxxx>

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




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux