From: Jiri Pirko <jiri@resnulli.us>
To: Jamal Hadi Salim <jhs@mojatatu.com>
Cc: davem@davemloft.net, netdev@vger.kernel.org,
xiyou.wangcong@gmail.com, eric.dumazet@gmail.com,
horms@verge.net.au, dsahern@gmail.com
Subject: Re: [PATCH net-next v12 3/4] net sched actions: dump more than TCA_ACT_MAX_PRIO actions per batch
Date: Sun, 30 Jul 2017 21:05:34 +0200 [thread overview]
Message-ID: <20170730190534.GC1872@nanopsycho> (raw)
In-Reply-To: <1501435492-28301-4-git-send-email-jhs@emojatatu.com>
Sun, Jul 30, 2017 at 07:24:51PM CEST, jhs@mojatatu.com wrote:
>From: Jamal Hadi Salim <jhs@mojatatu.com>
>
>When you dump hundreds of thousands of actions, getting only 32 per
>dump batch even when the socket buffer and memory allocations allow
>is inefficient.
>
>With this change, the user will get as many as possibly fitting
>within the given constraints available to the kernel.
>
>The top level action TLV space is extended. An attribute
>TCA_ROOT_FLAGS is used to carry flags; flag TCA_FLAG_LARGE_DUMP_ON
>is set by the user indicating the user is capable of processing
>these large dumps. Older user space which doesnt set this flag
>doesnt get the large (than 32) batches.
>The kernel uses the TCA_ROOT_COUNT attribute to tell the user how many
>actions are put in a single batch. As such user space app knows how long
>to iterate (independent of the type of action being dumped)
>instead of hardcoded maximum of 32 thus maintaining backward compat.
>
>Some results dumping 1.5M actions below:
>first an unpatched tc which doesnt understand these features...
>
>prompt$ time -p tc actions ls action gact | grep index | wc -l
>1500000
>real 1388.43
>user 2.07
>sys 1386.79
>
>Now lets see a patched tc which sets the correct flags when requesting
>a dump:
>
>prompt$ time -p updatedtc actions ls action gact | grep index | wc -l
>1500000
>real 178.13
>user 2.02
>sys 176.96
>
>That is about 8x performance improvement for tc app which sets its
>receive buffer to about 32K.
>
>Signed-off-by: Jamal Hadi Salim <jhs@mojatatu.com>
If DavidA is ok with the "validation_data", I am fine with this patch.
Reviewed-by: Jiri Pirko <jiri@mellanox.com>
next prev parent reply other threads:[~2017-07-30 19:05 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-30 17:24 [PATCH net-next v12 0/4] net sched actions: improve dump performance Jamal Hadi Salim
2017-07-30 17:24 ` [PATCH net-next v12 1/4] net netlink: Add new type NLA_BITFIELD32 Jamal Hadi Salim
2017-07-30 18:42 ` Jiri Pirko
2017-07-30 19:59 ` Jamal Hadi Salim
2017-07-31 2:27 ` David Ahern
2017-07-31 6:38 ` Jiri Pirko
2017-07-31 12:03 ` Jamal Hadi Salim
2017-07-31 12:21 ` Jiri Pirko
2017-07-30 17:24 ` [PATCH net-next v12 2/4] net sched actions: Use proper root attribute table for actions Jamal Hadi Salim
2017-07-30 18:44 ` Jiri Pirko
2017-07-30 17:24 ` [PATCH net-next v12 3/4] net sched actions: dump more than TCA_ACT_MAX_PRIO actions per batch Jamal Hadi Salim
2017-07-30 19:05 ` Jiri Pirko [this message]
2017-07-30 17:24 ` [PATCH net-next v12 4/4] net sched actions: add time filter for action dumping Jamal Hadi Salim
2017-07-30 19:06 ` Jiri Pirko
2017-07-31 2:28 ` [PATCH net-next v12 0/4] net sched actions: improve dump performance David Miller
2017-07-31 12:06 ` Jamal Hadi Salim
2017-07-31 23:43 ` Stephen Hemminger
2017-08-01 3:54 ` Stephen Hemminger
2017-08-01 11:05 ` Jamal Hadi Salim
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=20170730190534.GC1872@nanopsycho \
--to=jiri@resnulli.us \
--cc=davem@davemloft.net \
--cc=dsahern@gmail.com \
--cc=eric.dumazet@gmail.com \
--cc=horms@verge.net.au \
--cc=jhs@mojatatu.com \
--cc=netdev@vger.kernel.org \
--cc=xiyou.wangcong@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