All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Toke Høiland-Jørgensen" <toke@toke.dk>
To: Felix Fietkau <nbd@nbd.name>,
	Rajkumar Manoharan <rmanohar@codeaurora.org>,
	linux-wireless@vger.kernel.org, ath10k@lists.infradead.org
Cc: make-wifi-fast@lists.bufferbloat.net
Subject: Re: [PATCH v3 3/6] mac80211: Add airtime accounting and scheduling to TXQs
Date: Mon, 19 Nov 2018 15:02:50 -0800	[thread overview]
Message-ID: <87k1l8smat.fsf@toke.dk> (raw)
In-Reply-To: <8e7847ff-4c88-10ae-2223-2fc7321641d9@nbd.name>

Hi Felix

Thinking a bit more about this, I think that rather than having the
driver work around the API as in your example...

> do {
> 	struct ieee80211_txq *pending_txq[4];
> 	int n_pending_txq = 0;
> 	int i;
>
> 	if (hwq->pending < 4)
> 		break;p
>
> 	nframes = 0;
>
> 	ieee80211_txq_schedule_start(hw, ac)
> 	do {
> 		bool requeue = false;
>
> 		struct ieee80211_txq *txq;
>
> 		txq = ieee80211_next_txq(hw, ac);
> 		if (!txq)
> 			break;
>
> 		nframes += schedule_txq(txq, &requeue);
> 		if (requeue)
> 			pending_txq[n_pending_txq++] = txq;
>
> 	} while (n_pending_txq < ARRAY_SIZE(pending_txq));
>
> 	for (i = n_pending_txq; i > 0; i--)
> 		ieee80211_return_txq(hw, pending_txq[i - 1]);
>
> 	ieee80211_txq_schedule_end(hw, ac)
> } while (nframes);

... really what we want is that the driver can just do this:

ieee80211_txq_schedule_start(hw, ac);
while ((txq = ieee80211_next_txq(hw, ac)) {
	schedule_txq(txq, &requeue);
        return_txq(txq);
}
ieee80211_txq_schedule_end(hw, ac);

and expect so get through all eligible TXQs. Note that there will be
cases where there is only a single eligible TXQ (such as the example I
gave in the other email); in which case the current version is fine. But
there is (probably) also going to be cases where more than one TXQ is
eligible at the same time, which we cannot handle with the current RR
scheduler.

However, I think that assuming we can get the scheduler to guarantee
that it will return all eligible TXQs between each pair of calls to
schedule_start()/schedule_end(), we should be fine with the current API.
Do you agree with this?

-Toke

WARNING: multiple messages have this Message-ID (diff)
From: "Toke Høiland-Jørgensen" <toke@toke.dk>
To: Felix Fietkau <nbd@nbd.name>,
	Rajkumar Manoharan <rmanohar@codeaurora.org>,
	linux-wireless@vger.kernel.org, ath10k@lists.infradead.org
Cc: make-wifi-fast@lists.bufferbloat.net
Subject: Re: [PATCH v3 3/6] mac80211: Add airtime accounting and scheduling to TXQs
Date: Mon, 19 Nov 2018 15:02:50 -0800	[thread overview]
Message-ID: <87k1l8smat.fsf@toke.dk> (raw)
In-Reply-To: <8e7847ff-4c88-10ae-2223-2fc7321641d9@nbd.name>

Hi Felix

Thinking a bit more about this, I think that rather than having the
driver work around the API as in your example...

> do {
> 	struct ieee80211_txq *pending_txq[4];
> 	int n_pending_txq = 0;
> 	int i;
>
> 	if (hwq->pending < 4)
> 		break;p
>
> 	nframes = 0;
>
> 	ieee80211_txq_schedule_start(hw, ac)
> 	do {
> 		bool requeue = false;
>
> 		struct ieee80211_txq *txq;
>
> 		txq = ieee80211_next_txq(hw, ac);
> 		if (!txq)
> 			break;
>
> 		nframes += schedule_txq(txq, &requeue);
> 		if (requeue)
> 			pending_txq[n_pending_txq++] = txq;
>
> 	} while (n_pending_txq < ARRAY_SIZE(pending_txq));
>
> 	for (i = n_pending_txq; i > 0; i--)
> 		ieee80211_return_txq(hw, pending_txq[i - 1]);
>
> 	ieee80211_txq_schedule_end(hw, ac)
> } while (nframes);

... really what we want is that the driver can just do this:

ieee80211_txq_schedule_start(hw, ac);
while ((txq = ieee80211_next_txq(hw, ac)) {
	schedule_txq(txq, &requeue);
        return_txq(txq);
}
ieee80211_txq_schedule_end(hw, ac);

and expect so get through all eligible TXQs. Note that there will be
cases where there is only a single eligible TXQ (such as the example I
gave in the other email); in which case the current version is fine. But
there is (probably) also going to be cases where more than one TXQ is
eligible at the same time, which we cannot handle with the current RR
scheduler.

However, I think that assuming we can get the scheduler to guarantee
that it will return all eligible TXQs between each pair of calls to
schedule_start()/schedule_end(), we should be fine with the current API.
Do you agree with this?

-Toke

_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k

  parent reply	other threads:[~2018-11-19 23:02 UTC|newest]

Thread overview: 56+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-12 22:51 [PATCH v3 0/6] Move TXQ scheduling and airtime fairness into mac80211 Rajkumar Manoharan
2018-11-12 22:51 ` Rajkumar Manoharan
2018-11-12 22:51 ` [PATCH v3 1/6] mac80211: Add TXQ scheduling API Rajkumar Manoharan
2018-11-12 22:51   ` Rajkumar Manoharan
2018-11-12 22:51 ` [PATCH v3 2/6] cfg80211: Add airtime statistics and settings Rajkumar Manoharan
2018-11-12 22:51   ` Rajkumar Manoharan
2018-11-12 22:51 ` [PATCH v3 3/6] mac80211: Add airtime accounting and scheduling to TXQs Rajkumar Manoharan
2018-11-12 22:51   ` Rajkumar Manoharan
2018-11-14 10:57   ` Felix Fietkau
2018-11-14 10:57     ` Felix Fietkau
2018-11-14 17:40     ` Toke Høiland-Jørgensen
2018-11-14 17:40       ` Toke Høiland-Jørgensen
2018-11-15 11:09       ` Felix Fietkau
2018-11-15 11:09         ` Felix Fietkau
2018-11-15 17:24         ` Toke Høiland-Jørgensen
2018-11-15 17:24           ` Toke Høiland-Jørgensen
2018-11-19 17:55           ` [Make-wifi-fast] " Dave Taht
2018-11-19 17:55             ` Dave Taht
2018-11-19 22:44             ` Toke Høiland-Jørgensen
2018-11-19 22:44               ` Toke Høiland-Jørgensen
2018-11-19 23:30               ` Dave Taht
2018-11-19 23:30                 ` Dave Taht
     [not found]               ` <4DD985B6-7DBE-42F8-AC87-D6B40CEAE553@superduper.net>
2018-11-19 23:47                 ` Dave Taht
2018-11-19 23:47                   ` Dave Taht
2018-11-19 23:56                   ` Ben Greear
2018-11-19 23:56                     ` Ben Greear
2018-11-20  0:13                     ` Dave Taht
2018-11-20  0:13                       ` Dave Taht
2018-11-20  0:20                       ` Ben Greear
2018-11-20  0:20                         ` Ben Greear
2018-11-20  0:37                         ` Dave Taht
2018-11-20  0:37                           ` Dave Taht
2018-11-20  2:12                           ` David Lang
2018-11-20  2:12                             ` David Lang
     [not found]                         ` <46F43681-DF84-4E08-9426-328BA7AE1CED@superduper.net>
2018-11-20  1:04                           ` Dave Taht
2018-11-20  1:04                             ` Dave Taht
2018-11-19 23:02         ` Toke Høiland-Jørgensen [this message]
2018-11-19 23:02           ` Toke Høiland-Jørgensen
2018-12-04 14:55     ` Toke Høiland-Jørgensen
2018-12-04 14:55       ` Toke Høiland-Jørgensen
2018-11-15  8:18   ` [Make-wifi-fast] " Louie Lu
2018-11-15  8:18     ` Louie Lu
2018-11-15 17:10     ` Toke Høiland-Jørgensen
2018-11-15 17:10       ` Toke Høiland-Jørgensen
2018-12-18 12:11       ` Johannes Berg
2018-12-18 12:11         ` Johannes Berg
2018-12-18 14:08         ` Dave Taht
2018-12-18 14:08           ` Dave Taht
2018-12-18 19:19         ` Toke Høiland-Jørgensen
2018-12-18 19:19           ` Toke Høiland-Jørgensen
2018-11-12 22:51 ` [PATCH v3 4/6] ath9k: Switch to mac80211 TXQ scheduling and airtime APIs Rajkumar Manoharan
2018-11-12 22:51   ` Rajkumar Manoharan
2018-11-12 22:51 ` [PATCH v3 5/6] ath10k: migrate to mac80211 txq scheduling Rajkumar Manoharan
2018-11-12 22:51   ` Rajkumar Manoharan
2018-11-12 22:51 ` [PATCH v3 6/6] ath10k: reporting estimated tx airtime for fairness Rajkumar Manoharan
2018-11-12 22:51   ` Rajkumar Manoharan

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=87k1l8smat.fsf@toke.dk \
    --to=toke@toke.dk \
    --cc=ath10k@lists.infradead.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=make-wifi-fast@lists.bufferbloat.net \
    --cc=nbd@nbd.name \
    --cc=rmanohar@codeaurora.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.