From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by lists.bufferbloat.net (Postfix) with ESMTPS id 20E643CB35 for ; Fri, 8 Nov 2019 06:10:39 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1573211438; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=j+7OvF9pTiFagC4uXjlG85gg/uA64p5Hu8Gw3YYGZVc=; b=dpMFc1Tf/AzyQ2Aw09Jv+vAQb2EyxS6yCnIuNG/Pip0Z3zqU+2zzQjAhMZNkuYMkQlNfi5 k3obgW9S14jh7OmVtwOq0jZguwyrR6YCH4vfNbc+k2dC46AqT1R+0JefWCoEekG/6mrq2R I0zC4m9N13y60t73Byc8rGIuDSF4P8E= Received: from mail-lj1-f199.google.com (mail-lj1-f199.google.com [209.85.208.199]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-204-_jATUpy6M5ep68d40YJTmA-1; Fri, 08 Nov 2019 06:10:35 -0500 Received: by mail-lj1-f199.google.com with SMTP id z26so1182696ljn.5 for ; Fri, 08 Nov 2019 03:10:35 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version:content-transfer-encoding; bh=f/TIDfvlS9K2Q9yW8jvdJa+i8whstu4ovcYsTR8Jd+c=; b=kjA+xbuIhSAtYk+Vt415In6pEbwt9Dm5hgxBqlA3ZV/iKL8jiQnnBIhKcNj1f1FFlv R942os5DbNFWKJ0iraI59vB8b7AWEnoHm93GguEZ4wbt++Puj+FY89ddz0yE8MjFb3jv e8vH/uX7HRA4QBllad/+tJa2ZqeOJq9KhWLf+lIXIi9KdICzIMUHiiYOoA/po9Cnb4lO yTKAIjCIPCHdHQdDAoyk3UkrIdpZ8fNP9uxyRv3S4w7qNOBM3FHRhXKuTJvSjQoh6NLN V7FyYWBEwFNwqgu5t41UpJ0/a9r2kuxpHubFBFhha88n/HPsKliX6aIsONq9w9vR6M/Y y+mg== X-Gm-Message-State: APjAAAW/6DlzRw+vrsLJvUyg5XHFLyMOeZGTTTaeA8q39e6kQeit73YO NSmCKckwZjeXercp5Ow6vYPGvTvhUAysoslR9Np+YNvLRUBf3JRwBg/jnjkqHyUO1UrSUqLbw8F 1Zja0dGixNecJd2/+PzhSPF+B2kzFdpFH7Rk= X-Received: by 2002:a2e:b1c7:: with SMTP id e7mr6459971lja.239.1573211434286; Fri, 08 Nov 2019 03:10:34 -0800 (PST) X-Google-Smtp-Source: APXvYqwvL1cSCElAKKooFC9WpiIg1tuPMvZ1oS5U0qu+66rIj8IZ6hiz62Nov/WldvhI3NoplSN+bw== X-Received: by 2002:a2e:b1c7:: with SMTP id e7mr6459954lja.239.1573211434056; Fri, 08 Nov 2019 03:10:34 -0800 (PST) Received: from alrua-x1.borgediget.toke.dk ([2a00:7660:6da:443::2]) by smtp.gmail.com with ESMTPSA id y17sm2225326lfy.58.2019.11.08.03.10.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Nov 2019 03:10:33 -0800 (PST) Received: by alrua-x1.borgediget.toke.dk (Postfix, from userid 1000) id 8F9CD1818B5; Fri, 8 Nov 2019 12:10:32 +0100 (CET) From: Toke =?utf-8?Q?H=C3=B8iland-J=C3=B8rgensen?= To: Johannes Berg Cc: linux-wireless@vger.kernel.org, make-wifi-fast@lists.bufferbloat.net, ath10k@lists.infradead.org, John Crispin , Lorenzo Bianconi , Felix Fietkau , Kan Yan , Rajkumar Manoharan , Kevin Hayes In-Reply-To: References: <157182473951.150713.7978051149956899705.stgit@toke.dk> <157182474287.150713.12867638269538730397.stgit@toke.dk> <1a2eb096119c9029e67caf797564d6511c8803a7.camel@sipsolutions.net> <87a796fxgd.fsf@toke.dk> X-Clacks-Overhead: GNU Terry Pratchett Date: Fri, 08 Nov 2019 12:10:32 +0100 Message-ID: <874kzefwt3.fsf@toke.dk> MIME-Version: 1.0 X-MC-Unique: _jATUpy6M5ep68d40YJTmA-1 X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Make-wifi-fast] [PATCH v6 3/4] mac80211: Implement Airtime-based Queue Limit (AQL) X-BeenThere: make-wifi-fast@lists.bufferbloat.net X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Nov 2019 11:10:39 -0000 Johannes Berg writes: > On Fri, 2019-11-08 at 11:56 +0100, Toke H=C3=B8iland-J=C3=B8rgensen wrote= : >> Johannes Berg writes: >>=20 >> > On Wed, 2019-10-23 at 11:59 +0200, Toke H=C3=B8iland-J=C3=B8rgensen wr= ote: >> > > =20 >> > > +void ieee80211_sta_update_pending_airtime(struct ieee80211_local *l= ocal, >> > > +=09=09=09=09=09 struct sta_info *sta, u8 ac, >> > > +=09=09=09=09=09 u16 tx_airtime, bool tx_completed) >> > > +{ >> > > +=09spin_lock_bh(&local->active_txq_lock[ac]); >> > > +=09if (tx_completed) { >> > > +=09=09if (sta) { >> > > +=09=09=09if (WARN_ONCE(sta->airtime[ac].aql_tx_pending < tx_airtime= , >> > > +=09=09=09=09 "TXQ pending airtime underflow: %u, %u", >> > > +=09=09=09=09 sta->airtime[ac].aql_tx_pending, tx_airtime)) >> >=20 >> > Maybe add the STA/AC to the message? >>=20 >> Can do. Any idea why we might be seeing underflows (as Kan reported)? > > No, I really have no idea. The shifting looked OK to me, though I didn't > review it carefully enough to say I've really looked at all places ... Right, bugger. I was thinking maybe there's a case where skbs can be cloned (and retain the tx_time_est field) and then released twice? Or maybe somewhere that steps on the skb->cb field in some other way? Couldn't find anything obvious on a first perusal of the TX path code, but maybe you could think of something? Otherwise I guess we'll be forced to go and do some actual, old-fashioned debugging ;) -Toke