Netdev List
 help / color / mirror / Atom feed
From: Jamal Hadi Salim <jhs@mojatatu.com>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org, eric.dumazet@gmail.com, jiri@resnulli.us,
	xiyou.wangcong@gmail.com
Subject: Re: [PATCH net-next v3 1/2] net sched actions: dump more than TCA_ACT_MAX_PRIO actions per batch
Date: Wed, 19 Apr 2017 07:53:02 -0400	[thread overview]
Message-ID: <767cf945-a1c7-fa24-4d30-2cde4f3e1a60@mojatatu.com> (raw)
In-Reply-To: <1492602564-9100-1-git-send-email-jhs@emojatatu.com>

On 17-04-19 07:49 AM, Jamal Hadi Salim 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.
>
> A new top level TLV space is introduced. An attribute
> TCAA_ACT_FLAGS is used to carry the flags 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 TCAA_ACT_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.
>
> Some results dumping 1.5M actions, first unpatched tc which the
> kernel doesnt help:
>
> 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
>
> Signed-off-by: Jamal Hadi Salim <jhs@mojatatu.com>
> ---
>  MAINTAINERS                    |  1 +
>  include/uapi/linux/rtnetlink.h | 21 +++++++++++++++++++--
>  net/sched/act_api.c            | 43 ++++++++++++++++++++++++++++++++----------
>  3 files changed, 53 insertions(+), 12 deletions(-)
>
> diff --git a/MAINTAINERS b/MAINTAINERS
> index 7b4b828..94eadbc 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -12198,6 +12198,7 @@ F:	kernel/taskstats.c
>
>  TC subsystem
>  M:	Jamal Hadi Salim <jhs@mojatatu.com>
> +M:	Jamal Hadi Salim <jhs@mojatatu.com>
>  L:	netdev@vger.kernel.org
>  S:	Maintained
>  F:	include/net/pkt_cls.h

Grrr. I did it again. Sending v4 shortly

cheers,
jamal

      parent reply	other threads:[~2017-04-19 11:53 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-19 11:49 [PATCH net-next v3 1/2] net sched actions: dump more than TCA_ACT_MAX_PRIO actions per batch Jamal Hadi Salim
2017-04-19 11:49 ` [PATCH net-next v3 2/2] net sched actions: add time filter for action dumping Jamal Hadi Salim
2017-04-19 11:53 ` Jamal Hadi Salim [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=767cf945-a1c7-fa24-4d30-2cde4f3e1a60@mojatatu.com \
    --to=jhs@mojatatu.com \
    --cc=davem@davemloft.net \
    --cc=eric.dumazet@gmail.com \
    --cc=jiri@resnulli.us \
    --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