From: "Naveen N. Rao" <naveen.n.rao@linux.vnet.ibm.com>
To: Christophe Leroy <christophe.leroy@csgroup.eu>,
Jordan Niethe <jniethe5@gmail.com>,
linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH 3/3] powerpc/bpf: Reallocate BPF registers to volatile registers when possible on PPC64
Date: Wed, 02 Mar 2022 22:10:03 +0530 [thread overview]
Message-ID: <1646238972.4ud3oenbsd.naveen@linux.ibm.com> (raw)
In-Reply-To: <468b04e9-4fa6-883d-fb9a-96a1371c6d8d@csgroup.eu>
Christophe Leroy wrote:
>
>
> Le 27/07/2021 à 08:55, Jordan Niethe a écrit :
>> Implement commit 40272035e1d0 ("powerpc/bpf: Reallocate BPF registers to
>> volatile registers when possible on PPC32") for PPC64.
>>
>> When the BPF routine doesn't call any function, the non volatile
>> registers can be reallocated to volatile registers in order to avoid
>> having to save them/restore on the stack. To keep track of which
>> registers can be reallocated to make sure registers are set seen when
>> used.
>>
>> Before this patch, the test #359 ADD default X is:
>> 0: nop
>> 4: nop
>> 8: std r27,-40(r1)
>> c: std r28,-32(r1)
>> 10: xor r8,r8,r8
>> 14: rotlwi r8,r8,0
>> 18: xor r28,r28,r28
>> 1c: rotlwi r28,r28,0
>> 20: mr r27,r3
>> 24: li r8,66
>> 28: add r8,r8,r28
>> 2c: rotlwi r8,r8,0
>> 30: ld r27,-40(r1)
>> 34: ld r28,-32(r1)
>> 38: mr r3,r8
>> 3c: blr
>>
>> After this patch, the same test has become:
>> 0: nop
>> 4: nop
>> 8: xor r8,r8,r8
>> c: rotlwi r8,r8,0
>> 10: xor r5,r5,r5
>> 14: rotlwi r5,r5,0
>> 18: mr r4,r3
>> 1c: li r8,66
>> 20: add r8,r8,r5
>> 24: rotlwi r8,r8,0
>> 28: mr r3,r8
>> 2c: blr
>>
>> Signed-off-by: Jordan Niethe <jniethe5@gmail.com>
>
> If this series is still applicable, it needs to be rebased of Naveen's
> series https://patchwork.ozlabs.org/project/linuxppc-dev/list/?series=286000
Thanks for bringing this up. My apologies - I missed copying you and
Jordan on the new series.
I have included the first patch and a variant of the second patch in
this series, in the new series I posted. For patch 3/3, it might be
simpler to not track temp register usage on ppc64.
Thanks,
Naveen
next prev parent reply other threads:[~2022-03-02 16:41 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-27 6:55 [PATCH 1/3] powerpc64/bpf: Store temp registers' bpf to ppc mapping Jordan Niethe
2021-07-27 6:55 ` [PATCH 2/3] powerpc/bpf: Use helper for mapping bpf to ppc registers on PPC64 Jordan Niethe
2022-01-07 17:25 ` Naveen N. Rao
2021-07-27 6:55 ` [PATCH 3/3] powerpc/bpf: Reallocate BPF registers to volatile registers when possible " Jordan Niethe
2021-08-05 8:21 ` Christophe Leroy
2022-01-07 17:58 ` Naveen N. Rao
2022-02-22 14:23 ` Christophe Leroy
2022-03-02 16:40 ` Naveen N. Rao [this message]
2022-01-07 17:13 ` [PATCH 1/3] powerpc64/bpf: Store temp registers' bpf to ppc mapping Naveen N. Rao
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=1646238972.4ud3oenbsd.naveen@linux.ibm.com \
--to=naveen.n.rao@linux.vnet.ibm.com \
--cc=christophe.leroy@csgroup.eu \
--cc=jniethe5@gmail.com \
--cc=linuxppc-dev@lists.ozlabs.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 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.