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
| ||
|
Message-ID: <CA+FuTSdEhZ3GdODpvdkw8_icnTrawf45WNNtohHCkje4TpqD4g@mail.gmail.com> Date: Thu, 14 Feb 2019 19:39:20 -0500 From: Willem de Bruijn <willemdebruijn.kernel@...il.com> To: Cong Wang <xiyou.wangcong@...il.com> Cc: Alexander Duyck <alexander.duyck@...il.com>, Eric Dumazet <edumazet@...gle.com>, sridhar.samudrala@...el.com, Linux Kernel Network Developers <netdev@...r.kernel.org> Subject: Re: Three questions about busy poll On Thu, Feb 14, 2019 at 3:15 PM Cong Wang <xiyou.wangcong@...il.com> wrote: > > Hello, > > While looking into the busy polling in Linux kernel, three questions > come into my mind: > > 1. In the document[1], it claims sysctl.net.busy_poll depends on > either SO_BUSY_POLL or sysctl.net.busy_read. However, from the code in > ep_set_busy_poll_napi_id(), I don't see such a dependency. It simply > checks sysctl_net_busy_poll and sk->sk_napi_id, but sk->sk_napi_id is > always set as long as we enable CONFIG_NET_RX_BUSY_POLL. So what I am > missing here? That documentation refers to sock_poll. This does call sk_busy_loop individually on each socket in the pollset and thus respects those values. Epoll was added later, after both sock_poll and that documentation. > 2. Why there is no socket option for sysctl.net.busy_poll? Clearly > sysctl_net_busy_poll is global and SO_BUSY_POLL only works for > sysctl.net.busy_read. I guess because of how sock_poll works. In that case it is not needed. The poll duration applies more to the pollset than any of the individual sockets, too. > 3. How is SO_INCOMING_NAPI_ID supposed to be used? I can't find any > useful documents online. Any example or more detailed doc? >From the commit message of 6d4339028b35 ("net: Introduce SO_INCOMING_NAPI_ID") it sounds like a sharding mechanism that maintains flow affinity by sharding based on rxqueue (assuming that something like RSS was used to ensure flow affinity in the first place).
Powered by blists - more mailing lists