From: Mattias Nissler <mattias.nissler@gmx.de>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: "John W. Linville" <linville@tuxdriver.com>,
Stefano Brivio <stefano.brivio@polimi.it>,
linux-wireless@vger.kernel.org
Subject: Re: [patch 3/9] mac80211: Add PID controller based rate control algorithm
Date: Mon, 17 Dec 2007 22:08:51 +0100 [thread overview]
Message-ID: <1197925731.7505.17.camel@localhost> (raw)
In-Reply-To: <1197892210.4885.21.camel@johannes.berg>
On Mon, 2007-12-17 at 12:50 +0100, Johannes Berg wrote:
> > + /* We need to do an arithmetic right shift. ISO C says this is
> > + * implementation defined for negative left operands. Hence, be
> > + * careful to get it right, also for negative values. */
> > + adj = (adj < 0) ? -((-adj) >> (2 * RC_PID_ARITH_SHIFT)) :
> > + adj >> (2 * RC_PID_ARITH_SHIFT);
>
> That looks... weird.
>
> As far as I know all compilers the kernel can use will do an arithmetic
> right shift if the data type is signed.
Where is your information from? I actually had some misbehaviour that
was fixed after I introduced this. I'll check the assembly gcc produces
to shed some light on this.
Mattias
next prev parent reply other threads:[~2007-12-17 21:08 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20071217012517.882216322@gmx.de>
[not found] ` <20071217012549.932807027@gmx.de>
2007-12-17 11:46 ` [patch 1/9] mac80211: Clean up rate selection code Johannes Berg
2007-12-17 21:07 ` Mattias Nissler
2007-12-18 13:17 ` Johannes Berg
2007-12-18 19:12 ` Mattias Nissler
[not found] ` <20071217012550.045470580@gmx.de>
2007-12-17 11:48 ` [patch 2/9] iwlwifi: Resync rate control code with mac80211 Johannes Berg
2007-12-17 21:07 ` Mattias Nissler
[not found] ` <20071217012550.127484236@gmx.de>
2007-12-17 11:50 ` [patch 3/9] mac80211: Add PID controller based rate control algorithm Johannes Berg
2007-12-17 21:08 ` Mattias Nissler [this message]
2007-12-18 12:50 ` Johannes Berg
[not found] ` <20071217012550.213561122@gmx.de>
2007-12-17 11:52 ` [patch 4/9] mac80211: Make PID rate control algorithm the default Johannes Berg
2007-12-17 21:12 ` Mattias Nissler
2007-12-17 15:02 ` John W. Linville
2007-12-17 20:06 ` Stefano Brivio
2007-12-17 20:41 ` John W. Linville
2007-12-17 21:16 ` Stefano Brivio
2007-12-18 12:49 ` Johannes Berg
2007-12-18 20:01 ` Mattias Nissler
2007-12-19 16:05 ` Johannes Berg
[not found] ` <20071217012550.464889334@gmx.de>
2007-12-17 11:57 ` [patch 7/9] mac80211: Dump rc80211_pid events to debugfs Johannes Berg
2007-12-17 21:09 ` Mattias Nissler
[not found] ` <20071217012550.634829179@gmx.de>
2007-12-17 12:02 ` [patch 9/9] mac80211: Publish rc80211_pid parameters in debugfs Johannes Berg
2007-12-17 21:09 ` Mattias Nissler
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=1197925731.7505.17.camel@localhost \
--to=mattias.nissler@gmx.de \
--cc=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=stefano.brivio@polimi.it \
/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).