From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.toke.dk (mail.toke.dk [IPv6:2001:470:dc45:1000::1]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.bufferbloat.net (Postfix) with ESMTPS id E48D73B2A4 for ; Fri, 6 Jul 2018 09:21:13 -0400 (EDT) From: Toke =?utf-8?Q?H=C3=B8iland-J=C3=B8rgensen?= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=toke.dk; s=20161023; t=1530883272; bh=HmIWtAVjANOGrv011Fw33lL5FQ2pxFUQX36Pp3hlgMU=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=Icqle+yA5h74DglGTeGb0SJa/ZDbyxJHqKTAOYgQDnP2nOUYTYflPaWEFwH3KObJ1 7e1PNtKXjEGqEGCi6JQO9bdW2VAIK1qh4ij3BomgYJBOai+O4VmthwMusPVv3R+1P+ swif0FbDajnWddwkp7RhFHdLDhTGDygmsmWZSeKYtMVBZ/NJ7aF5VP82WMXcu3PylU SiuFNNIrQ8MTjyPmh3ug4kOFBHY6hZT7yys+BgaIU7QhaWWGhAP8vfK8fSKtyH1rYn i05nkUAxTgOsBvHXnQBN81nGc0uQr+dqSDV4foGipLnP5qDRsKEGjfxso1cPjmjz00 6A29dCsxL79zA== To: Jonathan Morton Cc: cake@lists.bufferbloat.net In-Reply-To: References: <20180706115745.2791-1-toke@toke.dk> <87a7r4bmlk.fsf@toke.dk> Date: Fri, 06 Jul 2018 15:21:10 +0200 X-Clacks-Overhead: GNU Terry Pratchett Message-ID: <874lhcbiux.fsf@toke.dk> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Cake] [PATCH] Keep an internal counter for total queue length X-BeenThere: cake@lists.bufferbloat.net X-Mailman-Version: 2.1.20 Precedence: list List-Id: Cake - FQ_codel the next generation List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Jul 2018 13:21:14 -0000 Jonathan Morton writes: >> On 6 Jul, 2018, at 3:00 pm, Toke H=C3=B8iland-J=C3=B8rgensen wrote: >>=20 >> Toke H=C3=B8iland-J=C3=B8rgensen writes: >>=20 >>> Since sch->q.qlen can be changed from outside cake, we can't rely on it= for >>> break loops etc. So keep an internal counter that mirrors it and use th= at >>> for all checks. >>=20 >> Sent this as a patch to avoid stepping on your toes if you are working >> on the code now :) > > I'm handling it without using any extra permanent state, just making > use of what's already there. Take a look at latest commit. Yup, that also fixes the infinite loop issue. I'm fine with doing it this way; however, it doesn't handle the other places where we check whether sch->q.qlen is nonzero. Are you sure that is not going to give us more problems down the road? :) -Toke