From: Paolo Abeni <pabeni@redhat.com>
To: Oliver Crumrine <ozlinuxc@gmail.com>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: davem@davemloft.net
Subject: Re: [PATCH net-next 00/17] Change cork to a pointer in sockets
Date: Mon, 23 Oct 2023 10:24:31 +0200 [thread overview]
Message-ID: <f9bc6eb8fb9c0771d7fff0b4da1a75528c5d6c07.camel@redhat.com> (raw)
In-Reply-To: <cover.1697989543.git.ozlinuxc@gmail.com>
On Sun, 2023-10-22 at 12:19 -0400, Oliver Crumrine wrote:
> This patch changes the cork field of both the inet_sock and inet6_sk
> structs to a pointer, reducing their size.
>
> Oliver Crumrine (17):
> Make cork in inet_sock a pointer.
> Allocate and free cork in inet_create and inet_release in file
> net/ipv4/af_inet.c
> Change cork in ipv6_pinfo to a pointer.
> Allocate and free cork in inet6_sk.
> Change occurence of cork in inet_sock to pointer in include/net/ip.h
> Since cork in inet_sock and inet6_sk will be a pointer, they don't
> need to be referenced in this function in include/net/ipv6.h
> Change occurences of cork in inet_sock to pointer in file
> net/ipv4/af_inet.c
> Change occurence of cork to pointer in file net/ipv4/datagram.c
> Change instances of cork in net/ipv4/inet_connection_sock.c to
> pointer.
> Change instances of cork to pointer in net/ipv4/ip_output.c
> Update occurences of cork to pointer in net/ipv4/syncookies.c
> Change occurences of cork to pointer in net/ipv4/tcp_output.c
> Change instances of cork to a pointer in file net/ipv4/udp.c
> Update usages of cork in net/ipv6/ip6_output.c to pointer.
> Modify occurences of cork in net/ipv6/raw.c to use a pointer
> Change usages of cork to pointer in net/ipv6/udp.c
> Change instance of cork to pointer in net/ipv4/tcp_ipv4.c
>
> include/linux/ipv6.h | 2 +-
> include/net/inet_sock.h | 2 +-
> include/net/ip.h | 2 +-
> include/net/ipv6.h | 4 ++--
> net/ipv4/af_inet.c | 6 ++++--
> net/ipv4/datagram.c | 2 +-
> net/ipv4/inet_connection_sock.c | 6 +++---
> net/ipv4/ip_output.c | 6 +++---
> net/ipv4/syncookies.c | 2 +-
> net/ipv4/tcp_ipv4.c | 2 +-
> net/ipv4/tcp_output.c | 2 +-
> net/ipv4/udp.c | 8 ++++----
> net/ipv6/af_inet6.c | 5 +++++
> net/ipv6/ip6_output.c | 10 +++++-----
> net/ipv6/raw.c | 4 ++--
> net/ipv6/udp.c | 4 ++--
> 16 files changed, 37 insertions(+), 30 deletions(-)
Could you please explain the rationale behind such changes?
As the cork struct is still allocated for each inet/inet6 socket, the
total memory used by the the now smaller socket struct and the cork
struct will be greater then the memory used originally by such socket.
And the double allocation/free will be slower then the original one.
This also adds a bunch of additional pointer de-reference in the xmit
path.
Finally the above change will probably conflict with the goodies
introduced by:
https://lore.kernel.org/netdev/20231017014716.3944813-1-lixiaoyan@google.com/
I'm sorry, but this looks really a no-go.
Before future submissions, please read thoroughly the process
documentation, including the netdev specific bits in maintainer-
netdev.rst: there a bit of issues with the process here (the recipients
list does not include a lot of relevant ones, there are typos there,
the patch series is too long, it breaks the builds ...)
Cheers,
Paolo
prev parent reply other threads:[~2023-10-23 8:24 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-22 16:19 [PATCH net-next 00/17] Change cork to a pointer in sockets Oliver Crumrine
2023-10-22 16:20 ` [PATCH net-next 01/17] Make cork in inet_sock a pointer Oliver Crumrine
2023-10-23 7:05 ` Ravi Gunasekaran
2023-10-22 16:20 ` [PATCH net-next 02/17] Allocate and free cork for ipv4 and ipv6 Oliver Crumrine
2023-10-22 16:20 ` [PATCH net-next 03/17] Change cork in ipv6_pinfo to a pointer Oliver Crumrine
2023-10-22 16:20 ` [PATCH net-next 04/17] Allocate and free cork in inet6_sk Oliver Crumrine
2023-10-22 16:20 ` [PATCH net-next 05/17] Change occurence of cork to pointer Oliver Crumrine
2023-10-22 16:20 ` [PATCH net-next 06/17] Update code for cork as a pointer Oliver Crumrine
2023-10-22 16:20 ` [PATCH net-next 07/17] Change occurences of cork to pointer Oliver Crumrine
2023-10-22 16:20 ` [PATCH net-next 08/17] Update " Oliver Crumrine
2023-10-22 16:20 ` [PATCH net-next 09/17] Change instances of cork to a pointer Oliver Crumrine
2023-10-22 16:21 ` [PATCH net-next 11/17] Update occurences of cork to pointer Oliver Crumrine
2023-10-22 16:21 ` [PATCH net-next 12/17] Change an occurence " Oliver Crumrine
2023-10-22 16:21 ` [PATCH net-next 13/17] Change some instances of cork to a pointer Oliver Crumrine
2023-10-22 16:21 ` [PATCH net-next 14/17] Update usages " Oliver Crumrine
2023-10-22 16:21 ` [PATCH net-next 15/17] Modify occurences of cork to make it " Oliver Crumrine
2023-10-22 16:21 ` [PATCH net-next 16/17] Change a usage of cork to pointer Oliver Crumrine
2023-10-22 16:21 ` [PATCH net-next 17/17] Change the last instance " Oliver Crumrine
2023-10-23 8:24 ` Paolo Abeni [this message]
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=f9bc6eb8fb9c0771d7fff0b4da1a75528c5d6c07.camel@redhat.com \
--to=pabeni@redhat.com \
--cc=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=ozlinuxc@gmail.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).