From: Johannes Berg <johannes@sipsolutions.net>
To: Ben Greear <greearb@candelatech.com>, linux-wireless@vger.kernel.org
Subject: Re: [PATCH 1/2] mac80211: Show pending txqlen in debugfs.
Date: Mon, 05 Dec 2016 15:54:46 +0100 [thread overview]
Message-ID: <1480949686.31788.31.camel@sipsolutions.net> (raw)
In-Reply-To: <58457DF8.5020808@candelatech.com>
On Mon, 2016-12-05 at 06:47 -0800, Ben Greear wrote:
>
> On 12/05/2016 05:59 AM, Johannes Berg wrote:
> >
> > +static ssize_t misc_read(struct file *file, char __user *user_buf,
> > >
> > > + size_t count, loff_t *ppos)
> > > +{
> > > + struct ieee80211_local *local = file->private_data;
> > > + size_t bufsz = 1000;
> > > + char *buf = kzalloc(bufsz, GFP_KERNEL);
> >
> > You need at most IEEE80211_MAX_QUEUES * 16 (==256) which I think
> > you
> > can put on the stack?
>
> I actually run with 64 queues in my tree,
Heh, well, in that case the 1000 is actually potentially too small for
you :) (it'll work because there never are many packets on the queues
though)
> and either way, I thought large-ish things on the stack were frowned
> upon for systems that want to run smaller stacks?
Yeah but the limit is more like 1KB :)
Maybe allocate, but actually do 16*NUM_QUEUES? The 1000 is just
arbitrarily magic in there.
johannes
next prev parent reply other threads:[~2016-12-05 14:54 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-29 18:05 [PATCH 1/2] mac80211: Show pending txqlen in debugfs greearb
2016-11-29 18:05 ` [PATCH 2/2] mac80211: put upper bound on txqi queue length greearb
2016-12-05 13:56 ` Johannes Berg
2016-12-05 14:05 ` Michal Kazior
2016-12-05 13:59 ` [PATCH 1/2] mac80211: Show pending txqlen in debugfs Johannes Berg
2016-12-05 14:47 ` Ben Greear
2016-12-05 14:54 ` Johannes Berg [this message]
2016-12-05 14:58 ` Ben Greear
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1480949686.31788.31.camel@sipsolutions.net \
--to=johannes@sipsolutions.net \
--cc=greearb@candelatech.com \
--cc=linux-wireless@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).