From: Gerrit Renker <gerrit@erg.abdn.ac.uk>
To: Arnaldo Carvalho de Melo <acme@redhat.com>,
netdev@vger.kernel.org, dccp@vger.kernel.org,
Ingo Molnar <mingo@elte.hu>
Subject: Re: [RFC][PATCHES 0/7]: Reorganization of RX history patches
Date: Mon, 3 Dec 2007 15:44:05 +0000 [thread overview]
Message-ID: <20071203154405.GA2914@gerrit.erg.abdn.ac.uk> (raw)
In-Reply-To: <20071203145443.GE15034@ghostprotocols.net>
| > | > static inline void ccid3_hc_rx_update_s(struct ccid3_hc_rx_sock *hcrx, int len)
| > | > {
| > | > if (likely(len > 0)) /* don't update on empty packets (e.g. ACKs) */
| > | > hcrx->ccid3hcrx_s = tfrc_ewma(hcrx->ccid3hcrx_s, len, 9);
| > | > }
| > |
| > | And we also just do test for len > 0 in update_s, that looks like
| > | also excessive, no?
| > Hm, I think we need to make it robust against API bugs and/or zero-sized
| > data packets. The check `len > 0' may seem redundant but it catches such
| > a condition. For a moving average an accidental zero value will have
| > quite an impact on the overall value. In CCID3 it is
| >
| > x_new = 0.9 * x_old + 0.1 * len
| >
| > So if len is accidentally 0 where it should not be, then each time the
| > moving average is reduced to 90%.
|
| So we must make it a BUG_ON, not something that is to be always present.
|
I think it should be a warning condition since it can be triggered when
the remote party sends zero-sized packets. It may be good to log this
into the syslog to warn about possibly misbehaving apps/peers/remote
stacks.
| > As a comparison - the entire patch set took about a full month to do.
| > But that meant I am reasonably sure the algorithm is sound and can cope
| > with problematic conditions.
|
| And from what I saw so far that is my impression too, if you look at
| what I'm doing it is:
|
| 1. go thru the whole patch trying to understand hunk by hunk
You are doing a great job - in particular as it really is a lot of material.
| 2. do consistency changes (add namespace prefixes)
| 3. reorganize the code to look more like what is already there, we
| both have different backgrounds and tastes about how code should
| be written, so its only normal that if we want to keep the code
| consistent, and I want that, I jump into things I think should be
| "reworded", while trying to keep the algorithm expressed by you.
|
Agree, that is not always easy to get right. I try to stick as close as
possible to existing conventions but of course that is my
interpretation, so I am already anticipating such changes/comments here.
| think about further automatization on regression testing.
|
If it is of any use, some scripts and setups are at the bottom of the page at
http://www.erg.abdn.ac.uk/users/gerrit/dccp/testing_dccp/
next prev parent reply other threads:[~2007-12-03 15:45 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-02 21:36 [RFC][PATCHES 0/7]: Reorganization of RX history patches Arnaldo Carvalho de Melo
2007-12-02 21:36 ` [PATCH 1/7] [TFRC]: Provide central source file and debug facility Arnaldo Carvalho de Melo
2007-12-02 21:36 ` [PATCH 2/7] [DCCP]: Introduce generic function to test for `data packets' Arnaldo Carvalho de Melo
2007-12-02 21:36 ` [PATCH 3/7] [TFRC]: Rename tfrc_tx_hist to tfrc_tx_hist_slab, for consistency Arnaldo Carvalho de Melo
2007-12-02 21:36 ` [PATCH 4/7] [TFRC]: Make the rx history slab be global Arnaldo Carvalho de Melo
2007-12-02 21:36 ` [PATCH 5/7] [TFRC]: Rename dccp_rx_ to tfrc_rx_ Arnaldo Carvalho de Melo
2007-12-02 21:36 ` [PATCH 6/7] [CCID3]: The receiver of a half-connection does not set window counter values Arnaldo Carvalho de Melo
2007-12-02 21:36 ` [PATCH 7/7] [TFRC] New rx history code Arnaldo Carvalho de Melo
2007-12-04 6:55 ` Gerrit Renker
2007-12-04 11:59 ` Arnaldo Carvalho de Melo
2007-12-04 13:48 ` [PATCH 7/7][TAKE 2][TFRC] " Arnaldo Carvalho de Melo
2007-12-05 9:42 ` Gerrit Renker
2007-12-05 9:35 ` [PATCH 7/7] [TFRC] " Gerrit Renker
2007-12-05 12:08 ` Arnaldo Carvalho de Melo
2007-12-05 13:34 ` Gerrit Renker
2007-12-06 13:59 ` [PATCH 5/7] [TFRC]: Rename dccp_rx_ to tfrc_rx_ Gerrit Renker
2007-12-06 13:59 ` [PATCH 4/7] [TFRC]: Make the rx history slab be global Gerrit Renker
2007-12-06 13:57 ` [PATCH 3/7] [TFRC]: Rename tfrc_tx_hist to tfrc_tx_hist_slab, for consistency Gerrit Renker
2007-12-03 8:23 ` [RFC][PATCHES 0/7]: Reorganization of RX history patches Ian McDonald
2007-12-03 8:35 ` Gerrit Renker
2007-12-03 12:44 ` Arnaldo Carvalho de Melo
2007-12-03 13:49 ` Gerrit Renker
2007-12-03 14:54 ` Arnaldo Carvalho de Melo
2007-12-03 15:44 ` Gerrit Renker [this message]
2007-12-05 10:27 ` Gerrit Renker
2007-12-05 11:52 ` Arnaldo Carvalho de Melo
2007-12-05 13:45 ` Gerrit Renker
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=20071203154405.GA2914@gerrit.erg.abdn.ac.uk \
--to=gerrit@erg.abdn.ac.uk \
--cc=acme@redhat.com \
--cc=dccp@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=netdev@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).