From: Roland Dreier <rdreier@cisco.com>
To: Shirley Ma <xma@us.ibm.com>
Cc: linux-kernel@vger.kernel.org, openib-general@openib.org
Subject: Re: [PATCH] IPoIB queue size tune patch
Date: Fri, 31 Mar 2006 12:44:49 -0800 [thread overview]
Message-ID: <adaacb6z6m6.fsf@cisco.com> (raw)
In-Reply-To: <OFC9A94743.F4C78DFE-ON87257142.005F70AF-88257142.006068A0@us.ibm.com> (Shirley Ma's message of "Fri, 31 Mar 2006 10:38:02 -0700")
> +static int expsize(int size)
> +{
> + int expsize_t = 1;
> + int j = 1;
> + while (size / 2 >= expsize_t) {
> + expsize_t = 1 << ++j;
> + }
> + return expsize_t;
> +}
Yikes... is this just a very hard-to-understand version of roundup_pow_of_two()?
Hmm, no, it's rounding down I guess. But is there any reason not to
use roundup_pow_of_two() instead?
- R.
parent reply other threads:[~2006-03-31 23:11 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <OFC9A94743.F4C78DFE-ON87257142.005F70AF-88257142.006068A0@us.ibm.com>]
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=adaacb6z6m6.fsf@cisco.com \
--to=rdreier@cisco.com \
--cc=linux-kernel@vger.kernel.org \
--cc=openib-general@openib.org \
--cc=xma@us.ibm.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