From: Andi Kleen <ak@suse.de>
To: "Chen, Kenneth W" <kenneth.w.chen@intel.com>
Cc: "linux-kernel" <linux-kernel@vger.kernel.org>
Subject: Re: [patch] speed up single bio_vec allocation
Date: Fri, 8 Dec 2006 05:37:11 +0100 [thread overview]
Message-ID: <200612080537.11936.ak@suse.de> (raw)
In-Reply-To: <000001c71a80$90342120$f180030a@amr.corp.intel.com>
On Friday 08 December 2006 05:23, Chen, Kenneth W wrote:
> Andi Kleen wrote on Thursday, December 07, 2006 6:28 PM
> > "Chen, Kenneth W" <kenneth.w.chen@intel.com> writes:
> > > I tried to use cache_line_size() to find out the alignment of struct bio, but
> > > stumbled on that it is a runtime function for x86_64.
> >
> > It's a single global variable access:
> >
> > #define cache_line_size() (boot_cpu_data.x86_cache_alignment)
> >
> > Or do you mean it caused cache misses? boot_cpu_data is cache aligned
> > and practically read only, so there shouldn't be any false sharing at least.
>
> No, I was looking for a generic constant that describes cache line size.
The same kernel binary runs on CPUs with
different cache line sizes. For example P4 has 128 bytes, Core2 64 bytes.
However there is a worst case alignment that is used for static
alignments which is L1_CACHE_BYTES. It would be normally 128 bytes
on a x86 kernel, unless it is especially compiled for a CPU with
a smaller cache line size.
-Andi
next prev parent reply other threads:[~2006-12-08 4:37 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-12-04 19:27 [patch] speed up single bio_vec allocation Chen, Kenneth W
2006-12-04 20:06 ` Jens Axboe
2006-12-04 20:36 ` Chen, Kenneth W
2006-12-04 20:43 ` Jens Axboe
2006-12-06 10:08 ` Jens Axboe
2006-12-06 10:56 ` Jens Axboe
2006-12-06 18:19 ` Chen, Kenneth W
2006-12-07 19:22 ` Nate Diller
2006-12-07 19:36 ` Chen, Kenneth W
2006-12-07 21:46 ` Nate Diller
2006-12-07 21:52 ` Chen, Kenneth W
2006-12-07 22:33 ` Nate Diller
2006-12-08 8:01 ` Jens Axboe
2006-12-08 2:27 ` Andi Kleen
2006-12-08 4:23 ` Chen, Kenneth W
2006-12-08 4:37 ` Andi Kleen [this message]
-- strict thread matches above, loose matches on Subject: below --
2006-12-08 22:14 Chen, Kenneth W
2006-12-14 20:23 ` Jens Axboe
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=200612080537.11936.ak@suse.de \
--to=ak@suse.de \
--cc=kenneth.w.chen@intel.com \
--cc=linux-kernel@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