public inbox for linux-arch@vger.kernel.org
 help / color / mirror / Atom feed
From: Roman Zippel <zippel@linux-m68k.org>
To: Matthew Wilcox <matthew@wil.cx>
Cc: akpm@linux-foundation.org, mm-commits@vger.kernel.org,
	ying.huang@intel.com, linux-arch@vger.kernel.org
Subject: Re: + separate-atomic_t-declaration-from-asm-atomich-into-asm-atomic_defh.patch added to -mm tree
Date: Sat, 30 Aug 2008 23:56:25 +0200	[thread overview]
Message-ID: <200808302356.26240.zippel@linux-m68k.org> (raw)
In-Reply-To: <20080822213624.GX8318@parisc-linux.org>

Hi,

On Friday 22. August 2008, Matthew Wilcox wrote:

> Seems to me like all architectures could use:
>
> +++ include/linux/atomic_type.h
> +typedef struct { volatile int counter; } atomic_t;
> +#ifdef CONFIG_64BIT
> +typedef struct { volatile long counter; } atomic64_t;
> +#endif
>
> S390 has an __aligned__((4)) on theirs -- is this really necessary?
> Doesn't s390 align ints to 4 bytes automatically?  If it doesn't, it
> shouldn't be harmful to add it to other architectures

I don't think it really needs its own header either, <linux/types.h> should 
work fine too.

> (iirc m68k only 
> requires 2-byte alignment for ints ... hmm, wonder if their atomic_t is
> really atomic if, say, it cross a page boundary ...)

There is a performance penalty and the bus fault handler could treat it 
specially too.

bye, Roman

  parent reply	other threads:[~2008-08-30 21:57 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-22 20:56 + separate-atomic_t-declaration-from-asm-atomich-into-asm-atomic_defh.patch added to -mm tree akpm
2008-08-22 20:56 ` akpm
2008-08-22 21:36 ` Matthew Wilcox
2008-08-29 23:34   ` Matthew Wilcox
2008-08-30  0:19     ` Andrew Morton
2008-08-30 21:56   ` Roman Zippel [this message]
2008-09-01  9:21   ` Christian Borntraeger

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=200808302356.26240.zippel@linux-m68k.org \
    --to=zippel@linux-m68k.org \
    --cc=akpm@linux-foundation.org \
    --cc=linux-arch@vger.kernel.org \
    --cc=matthew@wil.cx \
    --cc=mm-commits@vger.kernel.org \
    --cc=ying.huang@intel.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