From: Rusty Russell <rusty@rustcorp.com.au>
To: akpm@osdl.org, torvalds@osdl.org
Cc: viro@parcelfarce.linux.theplanet.co.uk, linux-kernel@vger.kernel.org
Subject: [PATCH] __cacheline_aligned always in own section
Date: Thu, 26 Feb 2004 17:44:47 +1100 [thread overview]
Message-ID: <20040226064551.1E44B2C57E@lists.samba.org> (raw)
Name: Always Put Cache Aligned Code in Own Section: Even Modules
Status: Tested on 2.6.3-bk7
We put ____cacheline_aligned things in their own section, simply
because we waste less space that way. Otherwise we end up padding
innocent variables to the next cacheline to get the required
alignment.
There's no reason not to do this in modules, too.
diff -urpN --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal .16274-linux-2.6.3-bk7/include/linux/cache.h .16274-linux-2.6.3-bk7.updated/include/linux/cache.h
--- .16274-linux-2.6.3-bk7/include/linux/cache.h 2003-09-22 09:47:16.000000000 +1000
+++ .16274-linux-2.6.3-bk7.updated/include/linux/cache.h 2004-02-26 16:43:49.000000000 +1100
@@ -26,13 +26,9 @@
#endif
#ifndef __cacheline_aligned
-#ifdef MODULE
-#define __cacheline_aligned ____cacheline_aligned
-#else
#define __cacheline_aligned \
__attribute__((__aligned__(SMP_CACHE_BYTES), \
__section__(".data.cacheline_aligned")))
-#endif
#endif /* __cacheline_aligned */
#ifndef __cacheline_aligned_in_smp
--
Anyone who quotes me in their sig is an idiot. -- Rusty Russell.
next reply other threads:[~2004-02-26 6:45 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-02-26 6:44 Rusty Russell [this message]
2004-02-26 6:53 ` viro
2004-02-26 22:09 ` Denis Vlasenko
2004-02-26 23:21 ` Andrew Morton
2004-02-27 1:01 ` Matt Mackall
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=20040226064551.1E44B2C57E@lists.samba.org \
--to=rusty@rustcorp.com.au \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@osdl.org \
--cc=viro@parcelfarce.linux.theplanet.co.uk \
/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
all inboxes | Powered by JetHome®