From mboxrd@z Thu Jan 1 00:00:00 1970 From: Flavio Leitner Subject: Re: [PATCH net-next] net: preserve sock reference when scrubbing the skb. Date: Wed, 27 Jun 2018 09:31:55 -0300 Message-ID: <20180627123155.GW19565@plex.lan> References: <20180625155610.30802-1-fbl@redhat.com> <48e15faf-f935-0166-e1db-18f7286e7264@gmail.com> <20180626220300.GT19565@plex.lan> <20180626233302.GU19565@plex.lan> <20180627003925.GV19565@plex.lan> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Eric Dumazet , Linux Kernel Network Developers , Paolo Abeni , David Miller , Florian Westphal , NetFilter To: Cong Wang Return-path: Received: from mail-qk0-f194.google.com ([209.85.220.194]:33122 "EHLO mail-qk0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751172AbeF0McC (ORCPT ); Wed, 27 Jun 2018 08:32:02 -0400 Received: by mail-qk0-f194.google.com with SMTP id c131-v6so900165qkb.0 for ; Wed, 27 Jun 2018 05:32:01 -0700 (PDT) Content-Disposition: inline In-Reply-To: Sender: netdev-owner@vger.kernel.org List-ID: On Tue, Jun 26, 2018 at 06:28:27PM -0700, Cong Wang wrote: > On Tue, Jun 26, 2018 at 5:39 PM Flavio Leitner wrote: > > > > On Tue, Jun 26, 2018 at 05:29:51PM -0700, Cong Wang wrote: > > > On Tue, Jun 26, 2018 at 4:33 PM Flavio Leitner wrote: > > > > > > > > It is still isolated, the sk carries the netns info and it is > > > > orphaned when it re-enters the stack. > > > > > > Then what difference does your patch make? > > > > Don't forget it is fixing two issues. > > Sure. I am only talking about TSQ from the very beginning. > Let me rephrase my above question: > What difference does your patch make to TSQ? It avoids burstiness. > > > Before your patch: > > > veth orphans skb in its xmit > > > > > > After your patch: > > > RX orphans it when re-entering stack (as you claimed, I don't know) > > > > ip_rcv, and equivalents. > > ip_rcv() is L3, we enter a stack from L1. So your above claim is incorrect. :) Maybe you found a problem, could you please point me to where in between L1 to L3 the socket is relevant? > > > And for veth pair: > > > xmit from one side is RX for the other side > > > So, where is the queueing? Where is the buffer bloat? GRO list?? > > > > CPU backlog. > > Yeah, but this is never targeted by TSQ: > > tcp_limit_output_bytes limits the number of bytes on qdisc > or device to reduce artificial RTT/cwnd and reduce bufferbloat. > > which means you have to update Documentation/networking/ip-sysctl.txt > too. How it is never targeted? Whole point is to avoid queueing traffic. Would you be okay if I include this chunk? diff --git a/Documentation/networking/ip-sysctl.txt b/Documentation/networking/ip-sysctl.txt index ce8fbf5aa63c..f4c042be0216 100644 --- a/Documentation/networking/ip-sysctl.txt +++ b/Documentation/networking/ip-sysctl.txt @@ -733,11 +733,11 @@ tcp_limit_output_bytes - INTEGER Controls TCP Small Queue limit per tcp socket. TCP bulk sender tends to increase packets in flight until it gets losses notifications. With SNDBUF autotuning, this can - result in a large amount of packets queued in qdisc/device - on the local machine, hurting latency of other flows, for - typical pfifo_fast qdiscs. - tcp_limit_output_bytes limits the number of bytes on qdisc - or device to reduce artificial RTT/cwnd and reduce bufferbloat. + result in a large amount of packets queued on the local machine + (e.g.: qdiscs, CPU backlog, or device) hurting latency of other + flows, for typical pfifo_fast qdiscs. tcp_limit_output_bytes + limits the number of bytes on qdisc or device to reduce artificial + RTT/cwnd and reduce bufferbloat. Default: 262144 tcp_challenge_ack_limit - INTEGER -- Flavio