Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.programming.threads > #265
| Path | csiph.com!x330-a1.tempe.blueboxinc.net!feeder1.hal-mli.net!border3.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nx02.iad01.newshosting.com!newshosting.com!69.16.185.11.MISMATCH!npeer01.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!post01.iad.highwinds-media.com!newsfe06.iad.POSTED!00000000!not-for-mail |
|---|---|
| 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 |
| Lines | 42 |
| X-Priority | 3 |
| X-MSMail-Priority | Normal |
| X-Newsreader | Microsoft Outlook Express 6.00.2900.5931 |
| X-MimeOLE | Produced By Microsoft MimeOLE V6.00.2900.6090 |
| X-RFC2646 | Format=Flowed; Response |
| Message-ID | <3YWIp.962$tp.468@newsfe06.iad> (permalink) |
| NNTP-Posting-Host | khleeogmcggoghbopemddpdkjnpmlfpd |
| X-Complaints-To | abuse@charter.net |
| X-Trace | emlnjhpjaknjmmohffhhjjcnmknpkahnanmfbajjihiaoiedkhleeogmcggoghbonifafmcijemlecceefodcngejpkklhebboacleinkeapipcckladopgemdeeplmifdlbpmaelemcakjp |
| NNTP-Posting-Date | Sun, 12 Jun 2011 04:07:27 UTC |
| Date | Sat, 11 Jun 2011 21:07:30 -0700 |
| Xref | x330-a1.tempe.blueboxinc.net comp.programming.threads:265 |
Show key headers only | View raw
"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