All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andi Kleen <ak@muc.de>
To: "David S. Miller" <davem@redhat.com>
Cc: ak@muc.de, akpm@digeo.com, linux-kernel@vger.kernel.org,
	anton@samba.org, schwidefsky@de.ibm.com, davidm@hpl.hp.com,
	matthew@wil.cx, ralf@linux-mips.org, rth@redhat.com
Subject: Re: Reduce struct page by 8 bytes on 64bit
Date: Wed, 16 Apr 2003 16:07:15 +0200	[thread overview]
Message-ID: <20030416140715.GA2159@averell> (raw)
In-Reply-To: <20030416.054521.26525548.davem@redhat.com>

On Wed, Apr 16, 2003 at 02:45:21PM +0200, David S. Miller wrote:
>    From: Andi Kleen <ak@muc.de>
>    Date: Tue, 15 Apr 2003 13:24:30 +0200
>    
>    I worked around this by declaring a new data type atomic_bitmask32
>    with matching set_bit32/clear_bit32 etc. interfaces. Currently only 
>    on x86-64 aomitc_bitmask32 is defined to unsigned, everybody else
>    still uses unsigned long. The other 64bit architectures can define it to
>    unsigned too if they can confirm that it's ok to do.
> 
> I have no problem with this.
> 
> If you are clever, you can define a generic version even for the
> "unsigned long" 64-bit platforms.  It's left as an exercise to
> the reader :-)

How so? Of course I could write an generic set_bit32, but the question
is if these bit operations would be still atomic on SMP and not conflict with
fields occuping the same 8 byte slot. I remember you flaming someone 
some time ago because he used set_bit in an atomic fashion on a type smaller
than unsigned long for example.

-Andi

  parent reply	other threads:[~2003-04-16 13:55 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-04-15 11:24 Reduce struct page by 8 bytes on 64bit Andi Kleen
2003-04-16 12:45 ` David S. Miller
2003-04-16 13:22   ` Jakub Jelinek
2003-04-16 14:07   ` Andi Kleen [this message]
2003-04-16 14:26     ` David S. Miller
2003-04-16 14:43       ` Andi Kleen
2003-04-16 14:38         ` David S. Miller
2003-04-16 14:58           ` Andi Kleen
2003-04-16 14:58             ` David S. Miller
2003-04-16 14:55         ` Matthew Wilcox
2003-04-16 15:04           ` Andi Kleen
2003-04-16 15:00             ` David S. Miller
2003-04-16 15:11             ` Matthew Wilcox
2003-04-16 20:35               ` Andrew Morton
2003-04-16 21:26                 ` Matthew Wilcox
2003-04-16 21:43                   ` Andrew Morton
2003-04-16 21:40                     ` David S. Miller
2003-04-17 15:20                       ` Andi Kleen

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=20030416140715.GA2159@averell \
    --to=ak@muc.de \
    --cc=akpm@digeo.com \
    --cc=anton@samba.org \
    --cc=davem@redhat.com \
    --cc=davidm@hpl.hp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=matthew@wil.cx \
    --cc=ralf@linux-mips.org \
    --cc=rth@redhat.com \
    --cc=schwidefsky@de.ibm.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.