From: "Luck, Tony" <tony.luck@intel.com>
To: "Tian, Kevin" <kevin.tian@intel.com>
Cc: Rusty Russell <rusty@rustcorp.com.au>,
Xen Mailing List <xen-devel@lists.xensource.com>,
Tony Breeds <tony@bakeyournoodle.com>,
djm@kirby.fc.hp.com, linux-ia64@vger.kernel.org
Subject: Re: [Xen-devel] __ia64__ ifdef in xmalloc.c: "Fix ar.unat handling forfast paths"
Date: Tue, 22 Nov 2005 16:11:18 +0000 [thread overview]
Message-ID: <20051122161118.GA28064@agluck-lia64.sc.intel.com> (raw)
In-Reply-To: <571ACEFD467F7749BC50E0A98C17CDD802C069CF@pdsmsx403>
This comment:
> /*
> * The "aligned" directive can only _increase_ alignment, so this is
> * safe and provides an easy way to avoid wasting space on a
> * uni-processor:
> */
suggests that we only expected SMP_CACHE_BYTES to be used in "aligned"
directives, where having a smaller value than the actual alignment
requirement of some object would simply be ignored by the compiler.
A search for SMP_CACHE_BYTES across the kernel picks up a few drivers
that don't follow this usage model. E.g. drivers/net/acenic.c might
print a warning about unsupported cache line size on a UP ia64.
Your usage:
BUG_ON(align > SMP_CACHE_BYTES);
is another instance of this define being used in a way that ia64
didn't expect (it appears that only ia64 has this space saving
trick in the definition of SMP_CACHE_BYTES ... so it is unsurprising
that general users are not following our usage model).
How much is this trick saving us? Static size of data area in
vmlinux doesn't change very much as SMP_CACHE_BYTES is varied:
text data bss dec hex filename
8677481 1139704 1206357 11023542 a834b6 vmlinux-8
8677417 1141808 1206397 11025622 a83cd6 vmlinux-16
8677417 1146000 1206477 11029894 a84d86 vmlinux-32
8677353 1146256 1206573 11030182 a84ea6 vmlinux-64
8677353 1163152 1207085 11047590 a892a6 vmlinux-128
I'm not sure how to evaluate dynamic behavior (allocation of
structures whose size is dependent on SMP_CACHE_BYTES at
runtime).
-Tony
next prev parent reply other threads:[~2005-11-22 16:11 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1132548798.1478.7.camel@localhost.localdomain>
2005-11-22 4:44 ` [Xen-devel] __ia64__ ifdef in xmalloc.c: "Fix ar.unat handling forfast paths" Tian, Kevin
2005-11-22 16:11 ` Luck, Tony [this message]
2005-11-22 19:34 ` David Mosberger-Tang
2005-11-23 2:52 ` Tian, Kevin
2005-11-23 2:58 ` Tian, Kevin
2005-11-23 8:54 ` Keir Fraser
2005-11-23 16:30 ` David Mosberger-Tang
2005-11-23 15:07 ` Luck, Tony
2005-11-23 15:37 ` Keir Fraser
2005-11-23 23:22 ` [Xen-devel] __ia64__ ifdef in xmalloc.c: "Fix ar.unat handling Rusty Russell
2005-11-23 17:49 ` [Xen-devel] __ia64__ ifdef in xmalloc.c: "Fix ar.unat handling forfast paths" Magenheimer, Dan (HP Labs Fort Collins)
2005-11-24 7:01 ` Luck, Tony
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=20051122161118.GA28064@agluck-lia64.sc.intel.com \
--to=tony.luck@intel.com \
--cc=djm@kirby.fc.hp.com \
--cc=kevin.tian@intel.com \
--cc=linux-ia64@vger.kernel.org \
--cc=rusty@rustcorp.com.au \
--cc=tony@bakeyournoodle.com \
--cc=xen-devel@lists.xensource.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