Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.programming.threads > #224
| Path | csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!goblin2!goblin.stu.neva.ru!newsfeed2.atman.pl!newsfeed.atman.pl!.POSTED!not-for-mail |
|---|---|
| From | Edek <edek.pienkowski@gmail.com> |
| Newsgroups | comp.programming.threads |
| Subject | Re: False sharing |
| Date | Wed, 01 Jun 2011 22:20:37 +0200 |
| Organization | ATMAN - ATM S.A. |
| Lines | 32 |
| Message-ID | <is66ui$h24$1@node2.news.atman.pl> (permalink) |
| References | <18fa2208-ba1c-42c5-bf1f-280e6cbc41e6@bl1g2000vbb.googlegroups.com> <is0un2$anb$1@node2.news.atman.pl> <eb6d6a69-ef08-4ebc-89dc-403886c3587f@24g2000yqk.googlegroups.com> <is3cgd$mnm$1@node2.news.atman.pl> <is3etk$pgf$1@node2.news.atman.pl> <d15641a4-b57b-4bba-b4bc-a388599d7942@z7g2000prh.googlegroups.com> |
| NNTP-Posting-Host | 178-37-135-97.adsl.inetia.pl |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=ISO-8859-1; format=flowed |
| Content-Transfer-Encoding | 7bit |
| X-Trace | node2.news.atman.pl 1306959634 17476 178.37.135.97 (1 Jun 2011 20:20:34 GMT) |
| X-Complaints-To | usenet@atman.pl |
| NNTP-Posting-Date | Wed, 1 Jun 2011 20:20:34 +0000 (UTC) |
| User-Agent | Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110428 Linux/3.1.0-15 Thunderbird/3.1.0 |
| In-Reply-To | <d15641a4-b57b-4bba-b4bc-a388599d7942@z7g2000prh.googlegroups.com> |
| Xref | x330-a1.tempe.blueboxinc.net comp.programming.threads:224 |
Show key headers only | View raw
>
> I did another experiment where I have two arrays that the threads
> write so that it can't combine the writes.
I think you may be wrong again, sorry. 10*sizeof long is 40 bytes.
If they lie in the same cache line, they will be combined. Maybe
RFO will be done sooner; or more likely, didn't you put the k array
on the cache boundary (or one of those arrays)?
OTOH, maybe you are right, 10 dependencies might be harder to keep
track of than one.
According to the Fine Manual, Core Duo has I think 6 Write Combining
buffers on L1D, of which at least 4 can be used a lot. That means,
not more than four arrays (in separate cache lines of course)
should be put in the loop: you have one.
> for(long i =0; i< 1000L * 1000L * 1000L; i++) {
> for(long k = 0; k< 10; ++k ){
> work[k] = k + i;
> }
> }
> Now finally I can see the effect if the buffer is separating the
> arrays:
I believe that part, I am not sure about the interpretation.
And, what are you exactly trying to do? Why not just do the
synchronisation?
Edek
Back to comp.programming.threads | Previous | Next — Previous in thread | Next 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