On Tue, Dec 01, 2020 at 09:55:22PM -0800, Alexei Starovoitov wrote:
> On Tue, Dec 1, 2020 at 4:38 AM Brendan Jackman wrote:
> >
> > I guess it's also worth remembering other archs might have an atomic
> > subtract.
>
> which one?
> arm64 LSE implements atomic_fetch_sub as neg+ldadd.
> imo x64 and
On Tue, Dec 1, 2020 at 4:38 AM Brendan Jackman wrote:
>
> I guess it's also worth remembering other archs might have an atomic
> subtract.
which one?
arm64 LSE implements atomic_fetch_sub as neg+ldadd.
imo x64 and arm64 example outweighs choices by other archs if there are such.
Even without LSE
On Mon, Nov 30, 2020 at 09:18:09AM -0800, Yonghong Song wrote:
> On 11/28/20 5:34 PM, Alexei Starovoitov wrote:
> > On Fri, Nov 27, 2020 at 09:35:07PM -0800, Yonghong Song wrote:
> > > On 11/27/20 9:57 AM, Brendan Jackman wrote:
[...]
> > > > +#define BPF_ATOMIC_SUB(SIZE, DST, SRC, OFF)
On 11/28/20 5:34 PM, Alexei Starovoitov wrote:
On Fri, Nov 27, 2020 at 09:35:07PM -0800, Yonghong Song wrote:
On 11/27/20 9:57 AM, Brendan Jackman wrote:
Including only interpreter and x86 JIT support.
x86 doesn't provide an atomic exchange-and-subtract instruction that
could be used for
On Fri, Nov 27, 2020 at 09:35:07PM -0800, Yonghong Song wrote:
>
>
> On 11/27/20 9:57 AM, Brendan Jackman wrote:
> > Including only interpreter and x86 JIT support.
> >
> > x86 doesn't provide an atomic exchange-and-subtract instruction that
> > could be used for BPF_SUB | BPF_FETCH, however we
On 11/27/20 9:57 AM, Brendan Jackman wrote:
Including only interpreter and x86 JIT support.
x86 doesn't provide an atomic exchange-and-subtract instruction that
could be used for BPF_SUB | BPF_FETCH, however we can just emit a NEG
followed by an XADD to get the same effect.
Signed-off-by: Br
Hi Brendan,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on bpf-next/master]
url:
https://github.com/0day-ci/linux/commits/Brendan-Jackman/Atomics-for-eBPF/20201128-020057
base: https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master
confi
Including only interpreter and x86 JIT support.
x86 doesn't provide an atomic exchange-and-subtract instruction that
could be used for BPF_SUB | BPF_FETCH, however we can just emit a NEG
followed by an XADD to get the same effect.
Signed-off-by: Brendan Jackman
---
arch/x86/net/bpf_jit_comp.c
8 matches
Mail list logo