From: Anton Blanchard <anton@samba.org>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Juergen Doelle <jdoelle@de.ibm.com>,
Linus Torvalds <torvalds@transmeta.com>,
linux-kernel@vger.kernel.org
Subject: Re: Pls apply this spinlock patch to the kernel
Date: Wed, 31 Oct 2001 00:14:09 +1100 [thread overview]
Message-ID: <20011031001409.A22589@krispykreme> (raw)
In-Reply-To: <3BDD8241.8002B946@de.ibm.com> <E15yG7P-0003Kb-00@the-village.bc.nu>
In-Reply-To: <E15yG7P-0003Kb-00@the-village.bc.nu>
Hi,
> spinlock_t pagecache_lock ____cacheline_aligned_in_smp = SPIN_LOCK_UNLOCKED;
> cache_line_pad;
>
> where cache_line_pad is an asm(".align") - I would assume that is
> sufficient - Linus ?
In include/asm-ppc64/cache.h I ended up redefining ____cacheline_aligned_in_smp
to avoid the problem of things sharing a cacheline:
#ifdef CONFIG_SMP
#define ____cacheline_aligned_in_smp __cacheline_aligned
#else
#define ____cacheline_aligned_in_smp
#endif /* CONFIG_SMP */
so that these things end up in the cacheline_aligned section and no variables
share a cacheline. Maybe there are some places where we want to group
variables in the same cacheline, but for consistency I think we should
have:
__cacheline_aligned{,_in_smp}
variable goes into cacheline_aligned section
____cacheline_aligned{,_in_smp}
just align to a cacheline
Anton
prev parent reply other threads:[~2001-10-30 13:19 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-10-29 16:22 Pls apply this spinlock patch to the kernel Juergen Doelle
2001-10-29 17:13 ` Linus Torvalds
2001-10-29 17:22 ` Alan Cox
2001-10-29 17:32 ` Linus Torvalds
2001-11-03 19:55 ` Richard Henderson
2001-11-03 20:20 ` Linus Torvalds
2001-11-03 21:01 ` Richard Henderson
2001-11-04 0:43 ` Linus Torvalds
2001-10-30 13:14 ` Anton Blanchard [this message]
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=20011031001409.A22589@krispykreme \
--to=anton@samba.org \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=jdoelle@de.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@transmeta.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