All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gerrit Renker <gerrit@erg.abdn.ac.uk>
To: dccp@vger.kernel.org
Subject: Re: [dccp] Re: [PATCH 2/5]: DCCP Recalc on non-loss intervals
Date: Fri, 05 Jan 2007 16:36:24 +0000	[thread overview]
Message-ID: <200701051636.24701@strip-the-willow> (raw)
In-Reply-To: <200612201545.39441.ian.mcdonald@jandi.co.nz>

|  I would like to change the loss interval linked list to a fixed size 8
|  element array as we're not changing the size of the linked list at any
|  time so it is very inefficient (probably a text book case of when not
|  to use a linked list!!)
Absolutely agree - I was scratching my head about the complexity of the code
and with an array we would have simpler code. 

Witness for instance, dccp_li_hist_interval_new() -- it allocates a fixed list of
length 8, the corresponding (static) array allocation is a one-liner. 

In ccid3_hc_rx_update_li(), there is a complex allocation when the list has not
just been created:

	* first list_add() is called to enqueue at the head of the list
	* and then list_del() is called to remove the oldest loss interval

This is a very complex way of managing a ring buffer. Adding to this that we are
using ~0U to identify empty loss intervals, we would probably much better off
with an array; but this array would have to be managed in the same way as a ring
buffer (but that is not difficult, also textbook stuff)

  parent reply	other threads:[~2007-01-05 16:36 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-20  2:45 [PATCH 2/5]: DCCP Recalc on non-loss intervals Ian McDonald
2006-12-21 13:20 ` Gerrit Renker
2006-12-21 22:48 ` Ian McDonald
2007-01-03 12:56 ` Gerrit Renker
2007-01-03 22:22 ` Ian McDonald
2007-01-04 23:25 ` Eddie Kohler
2007-01-04 23:31 ` Ian McDonald
2007-01-04 23:45 ` [dccp] " Eddie Kohler
2007-01-04 23:58 ` Ian McDonald
2007-01-05  0:10 ` Eddie Kohler
2007-01-05  0:24 ` Ian McDonald
2007-01-05  0:34 ` Eddie Kohler
2007-01-05 14:47 ` Gerrit Renker
2007-01-05 16:00 ` Eddie Kohler
2007-01-05 16:31 ` Gerrit Renker
2007-01-05 16:36 ` Gerrit Renker [this message]
2007-01-05 21:38 ` Eddie Kohler
2007-01-08 15:05 ` Gerrit Renker
2007-01-10  1:39 ` Ian McDonald

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=200701051636.24701@strip-the-willow \
    --to=gerrit@erg.abdn.ac.uk \
    --cc=dccp@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 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.