lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Tue, 14 Dec 2021 15:35:50 +0100
From:   Daniel Borkmann <daniel@...earbox.net>
To:     Magnus Karlsson <magnus.karlsson@...il.com>,
        Maciej Fijalkowski <maciej.fijalkowski@...el.com>
Cc:     "Karlsson, Magnus" <magnus.karlsson@...el.com>,
        Björn Töpel <bjorn@...nel.org>,
        Alexei Starovoitov <ast@...nel.org>,
        Network Development <netdev@...r.kernel.org>,
        Jonathan Lemon <jonathan.lemon@...il.com>,
        bpf <bpf@...r.kernel.org>
Subject: Re: [PATCH bpf-next] xsk: add test for tx_writeable to batched path

On 12/14/21 3:29 PM, Magnus Karlsson wrote:
> On Tue, Dec 14, 2021 at 3:28 PM Maciej Fijalkowski
> <maciej.fijalkowski@...el.com> wrote:
>> On Tue, Dec 14, 2021 at 11:26:47AM +0100, Magnus Karlsson wrote:
>>> From: Magnus Karlsson <magnus.karlsson@...el.com>
>>>
>>> Add a test for the tx_writeable condition to the batched Tx processing
>>> path. This test is in the skb and non-batched code paths but not in the
>>> batched code path. So add it there. This test makes sure that a
>>> process is not woken up until there are a sufficiently large number of
>>> free entries in the Tx ring. Currently, any driver using the batched
>>> interface will be woken up even if there is only one free entry,
>>> impacting performance negatively.
>>
>> I gave this patch a shot on ice driver with the Tx batching patch that i'm
>> about to send which is using the xsk_tx_peek_release_desc_batch(). I ran
>> the 2 core setup with no busy poll and it turned out that this change has
>> a negative impact on performance - it degrades by 5%.
>>
>> After a short chat with Magnus he said it's due to the touch to the global
>> state of a ring that xsk_tx_writeable() is doing.
>>
>> So maintainers, please do not apply this yet, we'll come up with a
>> solution.
>>
>> Also, should this be sent to bpf tree (not bpf-next) ?
> 
> It is just a performance fix, so I would say bpf-next.

Ok, np. I'm tossing it from patchwork in that case now, and wait for a v2.
Given the fix is a two-liner, I'll leave it up to you which tree you think
it would be best.

Thanks,
Daniel

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ