From: Nandita Dukkipati <nanditad@google.com>
To: David Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org, therbert@google.com,
mattmathis@google.com, ycheng@google.com
Subject: Re: [PATCH v2] Proportional Rate Reduction for TCP.
Date: Fri, 19 Aug 2011 18:29:15 -0700 [thread overview]
Message-ID: <CAB_+Fg6YE0knqjNKfYHR5+kGezjVCz_J+zEXb=5pJi46fnRbmw@mail.gmail.com> (raw)
In-Reply-To: <20110819.032651.405436165608502880.davem@davemloft.net>
On Fri, Aug 19, 2011 at 3:26 AM, David Miller <davem@davemloft.net> wrote:
> From: Nandita Dukkipati <nanditad@google.com>
> Date: Fri, 19 Aug 2011 00:33:32 -0700
>
>> @@ -2830,9 +2830,14 @@ static int tcp_try_undo_loss(struct sock *sk)
>> static inline void tcp_complete_cwr(struct sock *sk)
>> {
>> struct tcp_sock *tp = tcp_sk(sk);
>> - /* Do not moderate cwnd if it's already undone in cwr or recovery */
>> - if (tp->undo_marker && tp->snd_cwnd > tp->snd_ssthresh) {
>> - tp->snd_cwnd = tp->snd_ssthresh;
>> +
>> + /* Do not moderate cwnd if it's already undone in cwr or recovery. */
>> + if (tp->undo_marker) {
>> +
>> + if (inet_csk(sk)->icsk_ca_state == TCP_CA_CWR)
>
> Please get rid of that empty line before the TCP_CA_CWR case.
Done.
>
>> + sndcnt = DIV_ROUND_UP((u64)(tp->prr_delivered *
>> + tp->snd_ssthresh),
>> + (u64)tp->prior_cwnd) - tp->prr_out;
>
> This won't link on 32-bit unless __divdi3 libgcc routine is provided
> by the architecture. To portably do 64-bit division you need to use
> do_div() or something based upon it. Perhaps DIV_ROUND_UP_LL() will
> work best in this case.
patch v3 uses div_u64 which is based on do_div() for 32-bit archs.
Thanks
Nandita
next prev parent reply other threads:[~2011-08-20 1:29 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-12 7:29 [PATCH] Proportional Rate Reduction for TCP Nandita Dukkipati
2011-08-12 11:36 ` Ilpo Järvinen
2011-08-19 7:34 ` Nandita Dukkipati
2011-08-14 5:05 ` Andi Kleen
2011-08-19 7:34 ` Nandita Dukkipati
2011-08-19 7:33 ` [PATCH v2] " Nandita Dukkipati
2011-08-19 10:25 ` Ilpo Järvinen
2011-08-20 1:28 ` Nandita Dukkipati
2011-08-20 12:41 ` Ilpo Järvinen
2011-08-22 6:21 ` Nandita Dukkipati
2011-08-19 10:26 ` David Miller
2011-08-20 1:29 ` Nandita Dukkipati [this message]
2011-08-20 1:29 ` [PATCH v3] " Nandita Dukkipati
2011-08-22 6:21 ` [PATCH v4] " Nandita Dukkipati
2011-08-25 2:43 ` David Miller
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='CAB_+Fg6YE0knqjNKfYHR5+kGezjVCz_J+zEXb=5pJi46fnRbmw@mail.gmail.com' \
--to=nanditad@google.com \
--cc=davem@davemloft.net \
--cc=mattmathis@google.com \
--cc=netdev@vger.kernel.org \
--cc=therbert@google.com \
--cc=ycheng@google.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 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).