mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Randy Dunlap <rdunlap@infradead.org>
To: Feng Tang <feng.tang@intel.com>
Cc: Jonathan Corbet <corbet@lwn.net>,
	linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org,
	Arnaldo Carvalho de Melo <acme@redhat.com>,
	Joe Mario <jmario@redhat.com>, Ingo Molnar <mingo@redhat.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Eric Dumazet <edumazet@google.com>,
	Shakeel Butt <shakeelb@google.com>,
	dave.hansen@intel.com, ying.huang@intel.com,
	tim.c.chen@intel.com, andi.kleen@intel.com
Subject: Re: [PATCH RFC] Documentation: Add document for false sharing
Date: Thu, 23 Mar 2023 21:30:14 -0700	[thread overview]
Message-ID: <d0032404-e627-2d51-9c7b-42f5cdf29929@infradead.org> (raw)
In-Reply-To: <ZB0S/gfCLGP44HME@feng-clx>

Hi--

On 3/23/23 20:03, Feng Tang wrote:
> Hi Randy,
> 
> Thank you for the thorough reviews!
> 
> On Thu, Mar 23, 2023 at 09:49:02AM -0700, Randy Dunlap wrote:
>> Hi,
>>
>> Lots of good/interesting info here.
>>
>> On 3/23/23 01:26, Feng Tang wrote:
>>> From: "Tang, Feng" <feng.tang@intel.com>


>>> +
>>> +'refcount' is modified frequently, but 'name' is set once at object
>>> +creation time and is never modified.  When many CPUs access 'foo' at
>>> +the same time, and 'refcount' is only bumped by one CPU frequently,
>>> +while 'name' is read by all other CPUs, which have to reload the whole
>>> +cache line over and over, even though the 'name' is never changed.
>>
>> That last "sentence" is not a sentence.
> 
> How about:
> 
> "
> When many CPUs access 'foo' at the same time, with 'refcount' being only
> bumped by one CPU frequently and 'name' being read by other CPUs, all
> those reading CPUs have to reload the whole cache line over and over
> due to the 'sharing', even though 'name' is never changed.
> "
> ?

Yes, that's good. Thanks.

-- 
~Randy

      reply	other threads:[~2023-03-24  4:30 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-23  8:26 Feng Tang
2023-03-23 16:49 ` Randy Dunlap
2023-03-24  3:03   ` Feng Tang
2023-03-24  4:30     ` Randy Dunlap [this message]

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=d0032404-e627-2d51-9c7b-42f5cdf29929@infradead.org \
    --to=rdunlap@infradead.org \
    --cc=acme@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=andi.kleen@intel.com \
    --cc=corbet@lwn.net \
    --cc=dave.hansen@intel.com \
    --cc=edumazet@google.com \
    --cc=feng.tang@intel.com \
    --cc=jmario@redhat.com \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=shakeelb@google.com \
    --cc=tim.c.chen@intel.com \
    --cc=torvalds@linux-foundation.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

all inboxes | Powered by JetHome®