diff mbox series

[net] Documentation: add description for net.core.gro_normal_batch

Message ID e448120735d71f16ca3e1e845730f7fc29e71ea1.1651861213.git.lucien.xin@gmail.com (mailing list archive)
State Superseded
Delegated to: Netdev Maintainers
Headers show
Series [net] Documentation: add description for net.core.gro_normal_batch | expand

Checks

Context Check Description
netdev/tree_selection success Clearly marked for net
netdev/fixes_present success Fixes tag present in non-next series
netdev/subject_prefix success Link
netdev/cover_letter success Single patches do not need cover letters
netdev/patch_count success Link
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 0 this patch: 0
netdev/cc_maintainers warning 3 maintainers not CCed: hmukos@yandex-team.ru corbet@lwn.net linux-doc@vger.kernel.org
netdev/build_clang success Errors and warnings before: 0 this patch: 0
netdev/module_param success Was 0 now: 0
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/verify_fixes success Fixes tag looks correct
netdev/build_allmodconfig_warn success Errors and warnings before: 0 this patch: 0
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 16 lines checked
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Xin Long May 6, 2022, 6:20 p.m. UTC
Describe it in admin-guide/sysctl/net.rst like other Network core options.
Users need to know gro_normal_batch for performance tuning.

Fixes: 323ebb61e32b ("net: use listified RX for handling GRO_NORMAL skbs")
Reported-by: Prijesh <prpatel@redhat.com>
Signed-off-by: Xin Long <lucien.xin@gmail.com>
---
 Documentation/admin-guide/sysctl/net.rst | 10 ++++++++++
 1 file changed, 10 insertions(+)

Comments

Jakub Kicinski May 10, 2022, 1:07 a.m. UTC | #1
On Fri,  6 May 2022 14:20:13 -0400 Xin Long wrote:
> Describe it in admin-guide/sysctl/net.rst like other Network core options.
> Users need to know gro_normal_batch for performance tuning.
> 
> Fixes: 323ebb61e32b ("net: use listified RX for handling GRO_NORMAL skbs")
> Reported-by: Prijesh <prpatel@redhat.com>

Does Prijesh have a last name? :)

> Signed-off-by: Xin Long <lucien.xin@gmail.com>
> ---
>  Documentation/admin-guide/sysctl/net.rst | 10 ++++++++++
>  1 file changed, 10 insertions(+)
> 
> diff --git a/Documentation/admin-guide/sysctl/net.rst b/Documentation/admin-guide/sysctl/net.rst
> index f86b5e1623c6..d8a8506f31ad 100644
> --- a/Documentation/admin-guide/sysctl/net.rst
> +++ b/Documentation/admin-guide/sysctl/net.rst
> @@ -374,6 +374,16 @@ option is set to SOCK_TXREHASH_DEFAULT (i. e. not overridden by setsockopt).
>  If set to 1 (default), hash rethink is performed on listening socket.
>  If set to 0, hash rethink is not performed.
>  
> +gro_normal_batch
> +----------------
> +
> +Maximum number of GRO_NORMAL skbs to batch up for list-RX. When GRO decides
> +not to coalesce a packet, instead of passing it to the stack immediately,
> +place it on a list. 

That makes it sounds like only packets which were not coalesced 
go on the list. IIUC everything goes on that list before traveling 
up the stack, no?

> +Pass this list to the stack at flush time or whenever

This sentences is in second person, and the previous one was in third
person.

> +the number of skbs in this list exceeds gro_normal_batch.

s/skbs/segments/

> +Default : 8
> +
>  2. /proc/sys/net/unix - Parameters for Unix domain sockets
>  ----------------------------------------------------------
>
Xin Long May 10, 2022, 5:10 p.m. UTC | #2
On Mon, May 9, 2022 at 9:07 PM Jakub Kicinski <kuba@kernel.org> wrote:
>
> On Fri,  6 May 2022 14:20:13 -0400 Xin Long wrote:
> > Describe it in admin-guide/sysctl/net.rst like other Network core options.
> > Users need to know gro_normal_batch for performance tuning.
> >
> > Fixes: 323ebb61e32b ("net: use listified RX for handling GRO_NORMAL skbs")
> > Reported-by: Prijesh <prpatel@redhat.com>
>
> Does Prijesh have a last name? :)
'Prijesh <prpatel@redhat.com>' is what I got from his emails.
But yes, he has. 'Prijesh Patel'.

>
> > Signed-off-by: Xin Long <lucien.xin@gmail.com>
> > ---
> >  Documentation/admin-guide/sysctl/net.rst | 10 ++++++++++
> >  1 file changed, 10 insertions(+)
> >
> > diff --git a/Documentation/admin-guide/sysctl/net.rst b/Documentation/admin-guide/sysctl/net.rst
> > index f86b5e1623c6..d8a8506f31ad 100644
> > --- a/Documentation/admin-guide/sysctl/net.rst
> > +++ b/Documentation/admin-guide/sysctl/net.rst
> > @@ -374,6 +374,16 @@ option is set to SOCK_TXREHASH_DEFAULT (i. e. not overridden by setsockopt).
> >  If set to 1 (default), hash rethink is performed on listening socket.
> >  If set to 0, hash rethink is not performed.
> >
> > +gro_normal_batch
> > +----------------
> > +
> > +Maximum number of GRO_NORMAL skbs to batch up for list-RX. When GRO decides
> > +not to coalesce a packet, instead of passing it to the stack immediately,
> > +place it on a list.
>
> That makes it sounds like only packets which were not coalesced
> go on the list. IIUC everything goes on that list before traveling
> up the stack, no?
I think the difference is these ones held/merged go to gro_list first
and get merged there, then go to the list. I can change it to:

"place it on a list where the coalesced packets also eventually go"

looks good?

>
> > +Pass this list to the stack at flush time or whenever
>
> This sentences is in second person, and the previous one was in third
> person.
how about "the list will be passed to stack at flush time..." ?

>
> > +the number of skbs in this list exceeds gro_normal_batch.
>
> s/skbs/segments/
right.

Thanks.

>
> > +Default : 8
> > +
> >  2. /proc/sys/net/unix - Parameters for Unix domain sockets
> >  ----------------------------------------------------------
> >
>
Edward Cree May 10, 2022, 5:42 p.m. UTC | #3
On 10/05/2022 18:10, Xin Long wrote:
> On Mon, May 9, 2022 at 9:07 PM Jakub Kicinski <kuba@kernel.org> wrote:
>> That makes it sounds like only packets which were not coalesced
>> go on the list. IIUC everything goes on that list before traveling
>> up the stack, no?
> I think the difference is these ones held/merged go to gro_list first
> and get merged there, then go to the list. I can change it to:
> 
> "place it on a list where the coalesced packets also eventually go"
> 
> looks good?

Maybe it'd be clearer to say something like
"when a packet exits GRO, either as a coalesced superframe or as an
 original packet which GRO has decided not to coalesce, it is placed on
 a per-NAPI list.  This list is then passed to the stack when..." etc.
Ideally also mention the fact that a coalesced superframe counts as
 napi_gro_cb.count towards the gro_normal_batch limit, not just 1.

-ed
Xin Long May 11, 2022, 4:20 p.m. UTC | #4
On Tue, May 10, 2022 at 1:42 PM Edward Cree <edward.cree@xilinx.com> wrote:
>
> On 10/05/2022 18:10, Xin Long wrote:
> > On Mon, May 9, 2022 at 9:07 PM Jakub Kicinski <kuba@kernel.org> wrote:
> >> That makes it sounds like only packets which were not coalesced
> >> go on the list. IIUC everything goes on that list before traveling
> >> up the stack, no?
> > I think the difference is these ones held/merged go to gro_list first
> > and get merged there, then go to the list. I can change it to:
> >
> > "place it on a list where the coalesced packets also eventually go"
> >
> > looks good?
>
> Maybe it'd be clearer to say something like
> "when a packet exits GRO, either as a coalesced superframe or as an
>  original packet which GRO has decided not to coalesce, it is placed on
>  a per-NAPI list.  This list is then passed to the stack when..." etc.
> Ideally also mention the fact that a coalesced superframe counts as
>  napi_gro_cb.count towards the gro_normal_batch limit, not just 1.
Thanks, ed.

I'd say "...when the segments in this list count towards the
gro_normal_batch limit." only
(too many details involved may confuse users)

will post v2.
diff mbox series

Patch

diff --git a/Documentation/admin-guide/sysctl/net.rst b/Documentation/admin-guide/sysctl/net.rst
index f86b5e1623c6..d8a8506f31ad 100644
--- a/Documentation/admin-guide/sysctl/net.rst
+++ b/Documentation/admin-guide/sysctl/net.rst
@@ -374,6 +374,16 @@  option is set to SOCK_TXREHASH_DEFAULT (i. e. not overridden by setsockopt).
 If set to 1 (default), hash rethink is performed on listening socket.
 If set to 0, hash rethink is not performed.
 
+gro_normal_batch
+----------------
+
+Maximum number of GRO_NORMAL skbs to batch up for list-RX. When GRO decides
+not to coalesce a packet, instead of passing it to the stack immediately,
+place it on a list. Pass this list to the stack at flush time or whenever
+the number of skbs in this list exceeds gro_normal_batch.
+
+Default : 8
+
 2. /proc/sys/net/unix - Parameters for Unix domain sockets
 ----------------------------------------------------------