All of lore.kernel.org
 help / color / mirror / Atom feed
From: Neil Horman <nhorman@tuxdriver.com>
To: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Cc: netdev@vger.kernel.org, linux-sctp@vger.kernel.org,
	Vlad Yasevich <vyasevich@gmail.com>,
	Xin Long <lucien.xin@gmail.com>,
	David Laight <David.Laight@ACULAB.COM>
Subject: Re: [PATCH net-next 09/10] sctp: introduce priority based stream scheduler
Date: Fri, 29 Sep 2017 12:54:58 -0400	[thread overview]
Message-ID: <20170929165458.GB19460@hmswarspite.think-freely.org> (raw)
In-Reply-To: <2220047f36cd5018571ef4f87c252dde3a5a8263.1506536044.git.marcelo.leitner@gmail.com>

On Thu, Sep 28, 2017 at 05:25:22PM -0300, Marcelo Ricardo Leitner wrote:
> This patch introduces RFC Draft ndata section 3.4 Priority Based
> Scheduler (SCTP_SS_PRIO).
> 
> It works by having a struct sctp_stream_priority for each priority
> configured. This struct is then enlisted on a queue ordered per priority
> if, and only if, there is a stream with data queued, so that dequeueing
> is very straightforward: either finish current datamsg or simply dequeue
> from the highest priority queued, which is the next stream pointed, and
> that's it.
> 
> If there are multiple streams assigned with the same priority and with
> data queued, it will do round robin amongst them while respecting
> datamsgs boundaries (when not using idata chunks), to be reasonably
> fair.
> 
> We intentionally don't maintain a list of priorities nor a list of all
> streams with the same priority to save memory. The first would mean at
> least 2 other pointers per priority (which, for 1000 priorities, that
> can mean 16kB) and the second would also mean 2 other pointers but per
> stream. As SCTP supports up to 65535 streams on a given asoc, that's
> 1MB. This impacts when giving a priority to some stream, as we have to
> find out if the new priority is already being used and if we can free
> the old one, and also when tearing down.
> 
> The new fields in struct sctp_stream_out_ext and sctp_stream are added
> under a union because that memory is to be shared with other schedulers.
> It could be defined as an opaque area like skb->cb, but that would make
> the list handling a nightmare.
> 
> See-also: https://tools.ietf.org/html/draft-ietf-tsvwg-sctp-ndata-13
> Signed-off-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
I presume here that it will be up to the application to rate limit its own
throughput so as to prevent starvation of lower priority streams within an
association?

Neil

WARNING: multiple messages have this Message-ID (diff)
From: Neil Horman <nhorman@tuxdriver.com>
To: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Cc: netdev@vger.kernel.org, linux-sctp@vger.kernel.org,
	Vlad Yasevich <vyasevich@gmail.com>,
	Xin Long <lucien.xin@gmail.com>,
	David Laight <David.Laight@ACULAB.COM>
Subject: Re: [PATCH net-next 09/10] sctp: introduce priority based stream scheduler
Date: Fri, 29 Sep 2017 16:54:58 +0000	[thread overview]
Message-ID: <20170929165458.GB19460@hmswarspite.think-freely.org> (raw)
In-Reply-To: <2220047f36cd5018571ef4f87c252dde3a5a8263.1506536044.git.marcelo.leitner@gmail.com>

On Thu, Sep 28, 2017 at 05:25:22PM -0300, Marcelo Ricardo Leitner wrote:
> This patch introduces RFC Draft ndata section 3.4 Priority Based
> Scheduler (SCTP_SS_PRIO).
> 
> It works by having a struct sctp_stream_priority for each priority
> configured. This struct is then enlisted on a queue ordered per priority
> if, and only if, there is a stream with data queued, so that dequeueing
> is very straightforward: either finish current datamsg or simply dequeue
> from the highest priority queued, which is the next stream pointed, and
> that's it.
> 
> If there are multiple streams assigned with the same priority and with
> data queued, it will do round robin amongst them while respecting
> datamsgs boundaries (when not using idata chunks), to be reasonably
> fair.
> 
> We intentionally don't maintain a list of priorities nor a list of all
> streams with the same priority to save memory. The first would mean at
> least 2 other pointers per priority (which, for 1000 priorities, that
> can mean 16kB) and the second would also mean 2 other pointers but per
> stream. As SCTP supports up to 65535 streams on a given asoc, that's
> 1MB. This impacts when giving a priority to some stream, as we have to
> find out if the new priority is already being used and if we can free
> the old one, and also when tearing down.
> 
> The new fields in struct sctp_stream_out_ext and sctp_stream are added
> under a union because that memory is to be shared with other schedulers.
> It could be defined as an opaque area like skb->cb, but that would make
> the list handling a nightmare.
> 
> See-also: https://tools.ietf.org/html/draft-ietf-tsvwg-sctp-ndata-13
> Signed-off-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
I presume here that it will be up to the application to rate limit its own
throughput so as to prevent starvation of lower priority streams within an
association?

Neil


  reply	other threads:[~2017-09-29 16:55 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-28 20:25 [PATCH net-next 00/10] Introduce SCTP Stream Schedulers Marcelo Ricardo Leitner
2017-09-28 20:25 ` Marcelo Ricardo Leitner
2017-09-28 20:25 ` [PATCH net-next 01/10] sctp: silence warns on sctp_stream_init allocations Marcelo Ricardo Leitner
2017-09-28 20:25   ` Marcelo Ricardo Leitner
2017-09-28 20:25 ` [PATCH net-next 02/10] sctp: factor out stream->out allocation Marcelo Ricardo Leitner
2017-09-28 20:25   ` Marcelo Ricardo Leitner
2017-09-28 20:25 ` [PATCH net-next 03/10] sctp: factor out stream->in allocation Marcelo Ricardo Leitner
2017-09-28 20:25   ` Marcelo Ricardo Leitner
2017-09-29 10:04   ` David Laight
2017-09-29 13:05     ` 'Marcelo Ricardo Leitner'
2017-09-29 13:05       ` 'Marcelo Ricardo Leitner'
2017-09-28 20:25 ` [PATCH net-next 04/10] sctp: introduce struct sctp_stream_out_ext Marcelo Ricardo Leitner
2017-09-28 20:25   ` Marcelo Ricardo Leitner
2017-09-28 20:25 ` [PATCH net-next 05/10] sctp: introduce sctp_chunk_stream_no Marcelo Ricardo Leitner
2017-09-28 20:25   ` Marcelo Ricardo Leitner
2017-09-28 20:25 ` [PATCH net-next 06/10] sctp: introduce stream scheduler foundations Marcelo Ricardo Leitner
2017-09-28 20:25   ` Marcelo Ricardo Leitner
2017-09-28 20:25 ` [PATCH net-next 07/10] sctp: add sockopt to get/set stream scheduler Marcelo Ricardo Leitner
2017-09-28 20:25   ` Marcelo Ricardo Leitner
2017-09-29 16:47   ` Neil Horman
2017-09-29 16:47     ` Neil Horman
2017-09-29 17:14     ` Marcelo Ricardo Leitner
2017-09-29 17:14       ` Marcelo Ricardo Leitner
2017-09-28 20:25 ` [PATCH net-next 08/10] sctp: add sockopt to get/set stream scheduler parameters Marcelo Ricardo Leitner
2017-09-28 20:25   ` Marcelo Ricardo Leitner
2017-09-28 20:25 ` [PATCH net-next 09/10] sctp: introduce priority based stream scheduler Marcelo Ricardo Leitner
2017-09-28 20:25   ` Marcelo Ricardo Leitner
2017-09-29 16:54   ` Neil Horman [this message]
2017-09-29 16:54     ` Neil Horman
2017-09-29 17:10     ` Marcelo Ricardo Leitner
2017-09-29 17:10       ` Marcelo Ricardo Leitner
2017-09-28 20:25 ` [PATCH net-next 10/10] sctp: introduce round robin " Marcelo Ricardo Leitner
2017-09-28 20:25   ` Marcelo Ricardo Leitner
2017-09-30 16:52 ` [PATCH net-next 00/10] Introduce SCTP Stream Schedulers Xin Long
2017-09-30 16:52   ` Xin Long

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=20170929165458.GB19460@hmswarspite.think-freely.org \
    --to=nhorman@tuxdriver.com \
    --cc=David.Laight@ACULAB.COM \
    --cc=linux-sctp@vger.kernel.org \
    --cc=lucien.xin@gmail.com \
    --cc=marcelo.leitner@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=vyasevich@gmail.com \
    /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.