From: Eli Cohen <eli@dev.mellanox.co.il>
To: Roland Dreier <rdreier@cisco.com>
Cc: linux-rdma@vger.kernel.org, Eli Cohen <eli@mellanox.co.il>,
general-list <general@lists.openfabrics.org>
Subject: [ofa-general] Re: [PATCH] mlx4: confiugre cache line size
Date: Tue, 22 Sep 2009 21:54:15 +0300 [thread overview]
Message-ID: <20090922185415.GA13020@mtls03> (raw)
In-Reply-To: <adaiqfa7trl.fsf@cisco.com>
On Tue, Sep 22, 2009 at 10:51:10AM -0700, Roland Dreier wrote:
I agree with you on both comments. Would you like me to resend or will
you make the necessary changes?
>
> > +#if defined(cache_line_size)
>
> Why the #if here? Do we just need to include <linux/cache.h> explicitly
> to make sure we get the define?
>
> > + *((u8 *) mailbox->buf + INIT_HCA_CACHELINE_SZ_OFFSET) =
> > + order_base_2(cache_line_size() / 16) << 5;
>
> Trivial but I think it's safe to assume a cacheline is always a power of
> 2. And I think it's clearer (and avoids generating a divide) to use
> subtraction rather than division... so this could all become:
>
> (ilog2(cache_line_size()) - 4) << 5;
>
> - R.
> --
> To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2009-09-22 18:54 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-16 11:03 [ofa-general] [PATCH] mlx4: confiugre cache line size Eli Cohen
2009-09-22 17:51 ` Roland Dreier
2009-09-22 18:54 ` Eli Cohen [this message]
2009-09-22 23:15 ` [ofa-general] " Roland Dreier
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=20090922185415.GA13020@mtls03 \
--to=eli@dev.mellanox.co.il \
--cc=eli@mellanox.co.il \
--cc=general@lists.openfabrics.org \
--cc=linux-rdma@vger.kernel.org \
--cc=rdreier@cisco.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