linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Toke Høiland-Jørgensen" <toke@redhat.com>
To: Felix Fietkau <nbd@nbd.name>,
	Johannes Berg <johannes@sipsolutions.net>,
	linux-wireless@vger.kernel.org
Subject: Re: [PATCH 1/7] net/fq_impl: bulk-free packets from a flow on overmemory
Date: Thu, 17 Dec 2020 13:09:22 +0100	[thread overview]
Message-ID: <877dpgbpn1.fsf@toke.dk> (raw)
In-Reply-To: <99ee36a1-4e30-194f-5101-0dc3d4d30a46@nbd.name>

Felix Fietkau <nbd@nbd.name> writes:

> On 2020-12-16 21:54, Johannes Berg wrote:
>> On Wed, 2020-12-16 at 21:43 +0100, Felix Fietkau wrote:
>>> 
>>> +static int fq_flow_drop(struct fq *fq, struct fq_flow *flow,
>>> +			fq_skb_free_t free_func)
>>> +{
>>> +	unsigned int packets = 0, bytes = 0, truesize = 0;
>>> +	struct fq_tin *tin = flow->tin;
>>> +	struct sk_buff *skb;
>>> +	int pending;
>>> +
>>> +	lockdep_assert_held(&fq->lock);
>>> +
>>> +	pending = min_t(int, 32, skb_queue_len(&flow->queue) / 2);
>>> 
>> 
>> Why 32?
> I guess I forgot got make it configurable. sch_fq_codel uses 64, but
> that seemed a bit excessive to me.

I'm not sure it's worth a configuration knob. It's basically an
arbitrary choice anyway, and only kicks in when an unresponsive flows
keeps flooding a queue to the point of overflow (if it's many smaller
flows the "never drop more than half a flow's backlog" should keep it
from being excessive).

This (hopefully) only happens relatively rarely and hitting it with a
really big hammer is the right thing to do in such a case to keep the
box from falling over. Not sure if 32 or 64 makes much difference; guess
it depends on the CPU-to-bandwidth ratio of the particular machine.

-Toke


  reply	other threads:[~2020-12-17 12:10 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-16 20:43 [PATCH 1/7] net/fq_impl: bulk-free packets from a flow on overmemory Felix Fietkau
2020-12-16 20:43 ` [PATCH 2/7] mac80211: force calculation of software hash for tx fair queueing Felix Fietkau
2020-12-17 11:54   ` Toke Høiland-Jørgensen
2020-12-17 12:20     ` Felix Fietkau
2020-12-17 13:01       ` Toke Høiland-Jørgensen
2020-12-17 15:48         ` Felix Fietkau
2020-12-17 17:26           ` Toke Høiland-Jørgensen
2020-12-17 19:07             ` Felix Fietkau
2020-12-18 12:41               ` Toke Høiland-Jørgensen
2020-12-18 13:40                 ` Felix Fietkau
2020-12-18 15:49                   ` Toke Høiland-Jørgensen
2020-12-16 20:43 ` [PATCH 3/7] net/fq_impl: drop get_default_func, move default flow to fq_tin Felix Fietkau
2020-12-17 11:55   ` Toke Høiland-Jørgensen
2020-12-16 20:43 ` [PATCH 4/7] net/fq_impl: do not maintain a backlog-sorted list of flows Felix Fietkau
2020-12-16 20:59   ` Johannes Berg
2020-12-17 12:40     ` Felix Fietkau
2020-12-16 20:43 ` [PATCH 5/7] mac80211: fix encryption key selection for 802.3 xmit Felix Fietkau
2020-12-16 20:43 ` [PATCH 6/7] mac80211: fix fast-rx encryption check Felix Fietkau
2020-12-16 20:43 ` [PATCH 7/7] mac80211: add rx decapsulation offload support Felix Fietkau
2020-12-16 21:03   ` Johannes Berg
2020-12-16 21:19     ` Felix Fietkau
2020-12-17  8:08       ` Johannes Berg
2020-12-16 21:04   ` Johannes Berg
2020-12-16 21:06     ` Felix Fietkau
2020-12-16 20:54 ` [PATCH 1/7] net/fq_impl: bulk-free packets from a flow on overmemory Johannes Berg
2020-12-16 21:28   ` Felix Fietkau
2020-12-17 12:09     ` Toke Høiland-Jørgensen [this message]
2020-12-17 11:51 ` Toke Høiland-Jørgensen

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=877dpgbpn1.fsf@toke.dk \
    --to=toke@redhat.com \
    --cc=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=nbd@nbd.name \
    /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).