From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oi0-x22e.google.com (mail-oi0-x22e.google.com [IPv6:2607:f8b0:4003:c06::22e]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.bufferbloat.net (Postfix) with ESMTPS id 626373B260; Thu, 5 May 2016 11:21:40 -0400 (EDT) Received: by mail-oi0-x22e.google.com with SMTP id k142so106230799oib.1; Thu, 05 May 2016 08:21:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-transfer-encoding; bh=C/xnJjusOtRmBzriB0djBJY5iBhjqy9vU5MeLMkuiH8=; b=zDayJgb9svtVQ7MulyIKP648NokJUF4qLlg754jetMVuqSN/Lg2uNKfHMB9i3nNd/J ap2aV87bprTnqxu9eXME8o+2EpcpQwm1pEVOmUVvIs7UEkMm1w6cuUreEtcAhgEmI39l zh4pAyb8XO0gqhHoe5mnmQGGt233W2sabuSPURWQYHZGOoxcJJYe28Z16k42M6OAfSfh KJ7WP6ki/zG6aPONj/wwP+BF06VV7HEa7GpFTrsLxi8OflmYXwkqBa0qAxCsNA8HQ+l6 NhZJC/la4mZjLEB/IlBaIuC+OlmFANXtk4yH2n5rL/peHy34lrrft1xJxiN/cFAv8ZaE qUjQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-transfer-encoding; bh=C/xnJjusOtRmBzriB0djBJY5iBhjqy9vU5MeLMkuiH8=; b=kLjnDTuRSgV5kmCrloQwiihTJ4MRsOeaNnOQ/rJdRYaUFTAEDbkiqgPoRfzfTIl6dR r4HeQ/BiOdYu3IEkU/bDAP72FQM6rE9gpzSgozKUBQSjw1Vj73Gdlp/5GlTfrFq2phW7 V7wSNOsFJ7M+dlTo1ex1vAptCX9xSfZXwgT61MbbY8UOfgGMjx4WhohWP77EnF1Jsak4 WGgOuncQn+lErVebi9Y5nC3fser2Ik77NCKNioonEdH8ipqAMNs3WDoKCfrWNP8nS8r6 m3ihrtcJh7Hos4KGuD2SZlBbcaQ21GcUUCMunAGdUOfuB7YqO6olo2KUDeKcxfLQrjxA HbNA== X-Gm-Message-State: AOPr4FXV5yZyq17OhCfeiKGcMzCfv/sKpeYp8L9KgDcPVbH5RQRsuGxsfnHj9ale+HR+uelRoHlUml+rc9tngQ== MIME-Version: 1.0 X-Received: by 10.202.230.137 with SMTP id d131mr7347214oih.168.1462461699795; Thu, 05 May 2016 08:21:39 -0700 (PDT) Received: by 10.202.67.86 with HTTP; Thu, 5 May 2016 08:21:39 -0700 (PDT) In-Reply-To: <1462446039-1070-6-git-send-email-michal.kazior@tieto.com> References: <1460636302-31161-1-git-send-email-michal.kazior@tieto.com> <1462446039-1070-1-git-send-email-michal.kazior@tieto.com> <1462446039-1070-6-git-send-email-michal.kazior@tieto.com> Date: Thu, 5 May 2016 08:21:39 -0700 Message-ID: From: Dave Taht To: Michal Kazior Cc: linux-wireless , Johannes Berg , make-wifi-fast@lists.bufferbloat.net, "codel@lists.bufferbloat.net" , Avery Pennarun Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Make-wifi-fast] [PATCHv4 5/5] mac80211: add debug knobs for codel 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: Thu, 05 May 2016 15:21:40 -0000 On Thu, May 5, 2016 at 4:00 AM, Michal Kazior wro= te: > This adds a few debugfs entries to make it easier > to test, debug and experiment. I might argue in favor of moving all these (inc the fq ones) into their own dir, maybe "aqm" or "sqm". The mixture of read only stats and configuration vars is a bit confusing. Also in my testing of the previous patch, actually seeing the stats get updated seemed to be highly async or inaccurate. For example, it was obvious from the captures themselves that codel_ce_mark-ing was happening, but the actual numbers out of wack with the mark seen or fq_backlog seen. (I can go back to revisit this) > > Signed-off-by: Michal Kazior > --- > > Notes: > v4: > * stats adjustments (in-kernel codel has more of them) > > net/mac80211/debugfs.c | 40 ++++++++++++++++++++++++++++++++++++++++ > 1 file changed, 40 insertions(+) > > diff --git a/net/mac80211/debugfs.c b/net/mac80211/debugfs.c > index 43592b6f79f0..c7cfedc61fc4 100644 > --- a/net/mac80211/debugfs.c > +++ b/net/mac80211/debugfs.c > @@ -124,6 +124,15 @@ static const struct file_operations name## _ops =3D = { \ > res; \ > }) > > +#define DEBUGFS_RW_BOOL(arg) \ > +({ \ > + int res; \ > + int val; \ > + res =3D mac80211_parse_buffer(userbuf, count, ppos, "%d", &val); = \ > + arg =3D !!(val); = \ > + res; \ > +}) > + > DEBUGFS_READONLY_FILE(fq_flows_cnt, "%u", > local->fq.flows_cnt); > DEBUGFS_READONLY_FILE(fq_backlog, "%u", > @@ -132,6 +141,16 @@ DEBUGFS_READONLY_FILE(fq_overlimit, "%u", > local->fq.overlimit); > DEBUGFS_READONLY_FILE(fq_collisions, "%u", > local->fq.collisions); > +DEBUGFS_READONLY_FILE(codel_maxpacket, "%u", > + local->cstats.maxpacket); > +DEBUGFS_READONLY_FILE(codel_drop_count, "%u", > + local->cstats.drop_count); > +DEBUGFS_READONLY_FILE(codel_drop_len, "%u", > + local->cstats.drop_len); > +DEBUGFS_READONLY_FILE(codel_ecn_mark, "%u", > + local->cstats.ecn_mark); > +DEBUGFS_READONLY_FILE(codel_ce_mark, "%u", > + local->cstats.ce_mark); > > DEBUGFS_RW_FILE(fq_limit, > DEBUGFS_RW_EXPR_FQ("%u", &local->fq.limit), > @@ -139,6 +158,18 @@ DEBUGFS_RW_FILE(fq_limit, > DEBUGFS_RW_FILE(fq_quantum, > DEBUGFS_RW_EXPR_FQ("%u", &local->fq.quantum), > "%u", local->fq.quantum); > +DEBUGFS_RW_FILE(codel_interval, > + DEBUGFS_RW_EXPR_FQ("%u", &local->cparams.interval), > + "%u", local->cparams.interval); > +DEBUGFS_RW_FILE(codel_target, > + DEBUGFS_RW_EXPR_FQ("%u", &local->cparams.target), > + "%u", local->cparams.target); > +DEBUGFS_RW_FILE(codel_mtu, > + DEBUGFS_RW_EXPR_FQ("%u", &local->cparams.mtu), > + "%u", local->cparams.mtu); > +DEBUGFS_RW_FILE(codel_ecn, > + DEBUGFS_RW_BOOL(local->cparams.ecn), > + "%d", local->cparams.ecn ? 1 : 0); > > #ifdef CONFIG_PM > static ssize_t reset_write(struct file *file, const char __user *user_bu= f, > @@ -333,6 +364,15 @@ void debugfs_hw_add(struct ieee80211_local *local) > DEBUGFS_ADD(fq_collisions); > DEBUGFS_ADD(fq_limit); > DEBUGFS_ADD(fq_quantum); > + DEBUGFS_ADD(codel_maxpacket); > + DEBUGFS_ADD(codel_drop_count); > + DEBUGFS_ADD(codel_drop_len); > + DEBUGFS_ADD(codel_ecn_mark); > + DEBUGFS_ADD(codel_ce_mark); > + DEBUGFS_ADD(codel_interval); > + DEBUGFS_ADD(codel_target); > + DEBUGFS_ADD(codel_mtu); > + DEBUGFS_ADD(codel_ecn); > > statsd =3D debugfs_create_dir("statistics", phyd); > > -- > 2.1.4 > --=20 Dave T=C3=A4ht Let's go make home routers and wifi faster! With better software! http://blog.cerowrt.org