Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.programming.threads > #265
| From | "Chris M. Thomasson" <cristom@charter.net> |
|---|---|
| Newsgroups | comp.programming.threads |
| References | <18fa2208-ba1c-42c5-bf1f-280e6cbc41e6@bl1g2000vbb.googlegroups.com> <D3SIp.1908$g12.189@newsfe20.iad> <tVVIp.1449$z%.742@newsfe12.iad> |
| Subject | Re: False sharing |
| Message-ID | <3YWIp.962$tp.468@newsfe06.iad> (permalink) |
| Date | 2011-06-11 21:07 -0700 |
"Chris M. Thomasson" <cristom@charter.net> wrote in message
news:tVVIp.1449$z%.742@newsfe12.iad...
[...]
> Perhaps `struct shared_state' should be defined as:
> ______________________________________________________
> COMPILER_PADDING(OFF)
> struct shared_state
> {
> atomic_word_t state_1;
> char l2_cache_pad_1[L2_CACHE_ATOMIC_WORD_PAD];
>
> atomic_word_t state_2;
> /* char l2_cache_pad_2[L2_CACHE_ATOMIC_WORD_PAD]; */
>
> atomic_word_t writers_complete;
> char l2_cache_pad_3[L2_CACHE_ATOMIC_WORD_PAD * 2];
> };
> ______________________________________________________
Ummm.... That should be:
______________________________________________________
COMPILER_PADDING(OFF)
struct shared_state
{
atomic_word_t state_1;
char l2_cache_pad_1[L2_CACHE_ATOMIC_WORD_PAD];
atomic_word_t state_2;
atomic_word_t writers_complete;
char l2_cache_pad_2[L2_CACHE_ATOMIC_WORD_PAD -
sizeof(atomic_word_t)];
};
______________________________________________________
;^o
Back to comp.programming.threads | Previous | Next — Previous in thread | Find similar | Unroll thread
False sharing curious <curious.oskar58@gmail.com> - 2011-05-30 04:26 -0700
Re: False sharing Edek <edek.pienkowski@gmail.com> - 2011-05-30 22:29 +0200
Re: False sharing curious <curious.oskar58@gmail.com> - 2011-05-31 03:21 -0700
Re: False sharing Marcel Müller <news.5.maazl@spamgourmet.com> - 2011-05-31 15:41 +0200
Re: False sharing curious <curious.oskar58@gmail.com> - 2011-05-31 10:18 -0700
Re: False sharing Edek <edek.pienkowski@gmail.com> - 2011-05-31 20:10 +0200
Re: False sharing Edek <edek.pienkowski@gmail.com> - 2011-05-31 20:37 +0200
Re: False sharing Edek <edek.pienkowski@gmail.com> - 2011-05-31 21:18 +0200
Re: False sharing curious <curious.oskar58@gmail.com> - 2011-05-31 14:40 -0700
Re: False sharing "Balog Pal" <pasa@lib.hu> - 2011-06-01 03:17 +0200
Re: False sharing Edek <edek.pienkowski@gmail.com> - 2011-06-01 22:20 +0200
Re: False sharing curious <curious.oskar58@gmail.com> - 2011-05-31 14:29 -0700
Re: False sharing David Schwartz <davids@webmaster.com> - 2011-05-31 14:12 -0700
Re: False sharing "Chris M. Thomasson" <cristom@charter.net> - 2011-06-11 15:34 -0700
Re: False sharing "Chris M. Thomasson" <cristom@charter.net> - 2011-06-11 19:56 -0700
Re: False sharing "Chris M. Thomasson" <cristom@charter.net> - 2011-06-11 21:07 -0700
csiph-web