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
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4d2d89b1-f52b-a978-75a5-39522e3eef05@gmail.com>
Date:   Sat, 4 May 2019 11:41:41 -0400
From:   Eric Dumazet <eric.dumazet@...il.com>
To:     Cong Wang <xiyou.wangcong@...il.com>, netdev@...r.kernel.org
Cc:     Eric Dumazet <edumazet@...gle.com>
Subject: Re: [Patch net-next] sch_htb: redefine htb qdisc overlimits



On 5/2/19 2:06 PM, Cong Wang wrote:
> In commit 3c75f6ee139d ("net_sched: sch_htb: add per class overlimits counter")
> we added an overlimits counter for each HTB class which could
> properly reflect how many times we use up all the bandwidth
> on each class. However, the overlimits counter in HTB qdisc
> does not, it is way bigger than the sum of each HTB class.
> In fact, this qdisc overlimits counter increases when we have
> no skb to dequeue, which happens more often than we run out of
> bandwidth.
> 
> It makes more sense to make this qdisc overlimits counter just
> be a sum of each HTB class, in case people still get confused.
> 
> I have verified this patch with one single HTB class, where HTB
> qdisc counters now always match HTB class counters as expected.
> 
> Cc: Eric Dumazet <edumazet@...gle.com>
> Signed-off-by: Cong Wang <xiyou.wangcong@...il.com>
> ---
>  net/sched/sch_htb.c | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/net/sched/sch_htb.c b/net/sched/sch_htb.c
> index d27d9bc9d010..cece0d455985 100644
> --- a/net/sched/sch_htb.c
> +++ b/net/sched/sch_htb.c
> @@ -177,6 +177,7 @@ struct htb_sched {
>  	int			row_mask[TC_HTB_MAXDEPTH];
>  
>  	struct htb_level	hlevel[TC_HTB_MAXDEPTH];
> +	u32			overlimits;
>  };


Hi Cong, your patch makes sense, but I am not sure about the location of this field,
as this might need another cache line miss.

Maybe instead reduce 'long            direct_pkts;'  to 'u32 direct_pkts;' since we only export
direct_pkts as 32bit quantity in the struct tc_htb_glob.

Then move the 'u32 overlimits;' right after direct_pkts to fill the new hole.

Thanks !

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ