mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Rob Landley <rob@landley.net>
To: Ren Zhen <darwin.xupt@gmail.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [HELP] Documentation on CPU:/sys/devices/system/cpu/cpuX/cache/indexX/shared_cpu_map
Date: Wed, 24 Apr 2013 01:09:14 -0500	[thread overview]
Message-ID: <1366783754.18069.157@driftwood> (raw)
In-Reply-To: <CACbbJybOB5x=FKA4GADZSPr3=Jr9KOM1aHg3eBipoXLLnJ6fEw@mail.gmail.com> (from darwin.xupt@gmail.com on Tue Apr 23 08:07:44 2013)

On 04/23/2013 08:07:44 AM, Ren Zhen wrote:
> Hi all:
>     Can anybody help me to understand the usage of 'shared_cpu_map' in
> /sys/devices/system/cpu/cpuX/cache/indexX/.
>     when I execute the cmd--'#cat shared_cpu_map', it retures '05'.
>      And my computer use Ubuntu12.04,Intel core i3 CPU.
>      I have read one email in LKML,it says:
> 
> "The patch also adds a bunch of interfaces under
> /sys/devices/system/cpu/cpuX/cache, showing various information about  
> the
> caches.  Most useful field being shared_cpu_map, which says what  
> caches are
> shared among which logical cpus. "
> 
>      But I still cannot catch the meaning of  'which says what caches
> are shared among which logical cpus'.

Sounds like it means the L2 cache would be a communal resource shared  
between processors on die. So either processor could fault in cache  
lines into that pool of memory, evicting other cache lines as necessary  
to make space. So if only one processor was running, it could act like  
it had twice as much L2 cache because the memory it faulted in would  
(statistically speaking) stay in L2 cache longer before being evicted  
to make way for other memory accesses.

At a guess, the bits set (1<<0 and 1<<2 in this case) indicate which  
cpus access memory through the same pool of L2 cache.

Rob

      reply	other threads:[~2013-04-24  6:09 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-23 13:07 Ren Zhen
2013-04-24  6:09 ` Rob Landley [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=1366783754.18069.157@driftwood \
    --to=rob@landley.net \
    --cc=darwin.xupt@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    /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®