mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* A question about cache coherence
@ 2002-08-19 18:21 Xuehua Chen
  2002-08-19 18:35 ` Matti Aarnio
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Xuehua Chen @ 2002-08-19 18:21 UTC (permalink / raw)
  To: linux-kernel

Met a problem in my research. I run some code on a
Xeon
dual-processor machine. It seems to me that there is a
 cache coherence problem. As I am not so familiar 
to this topic, I would like to ask some experts about 
the following questions.

1. Do Xeon processors have hardware mechanisms to
maintain cache coherence?
2. Does the SMP kernel handle the cache coherence
problem
3. What should I do if both of them don't handle cache
coherence.

Thanks.

Frank Samuel

__________________________________________________
Do You Yahoo!?
HotJobs - Search Thousands of New Jobs
http://www.hotjobs.com

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: A question about cache coherence
  2002-08-19 18:21 A question about cache coherence Xuehua Chen
@ 2002-08-19 18:35 ` Matti Aarnio
  2002-08-19 19:23 ` Alan Cox
  2002-08-19 21:40 ` James Cleverdon
  2 siblings, 0 replies; 4+ messages in thread
From: Matti Aarnio @ 2002-08-19 18:35 UTC (permalink / raw)
  To: Xuehua Chen; +Cc: linux-kernel

On Mon, Aug 19, 2002 at 11:21:21AM -0700, Xuehua Chen wrote:
> Met a problem in my research. I run some code on a
> Xeon dual-processor machine. It seems to me that there is
> a cache coherence problem. As I am not so familiar 
> to this topic, I would like to ask some experts about 
> the following questions.
> 
> 1. Do Xeon processors have hardware mechanisms to
>    maintain cache coherence?

   Yes, in usual closely coupled SMP systems.

> 2. Does the SMP kernel handle the cache coherence
>     problem

   In its own ways, yes.  It is relying on hardware doing
   it in major part.

> 3. What should I do if both of them don't handle cache
>    coherence.

   Report the issue with lots of technical details
   on  linux-smp@vger.kernel.org,  and possibly continue
   discussion there.

   Data like:
    - What machine, whose motherboard ?
    - How much memory ?
    - What steppings are the processors ?  (not same ?)
    - How you configured the kernel ?
       (Not quite the entire  .config  file, just first
        50 lines or so telling processor details.)

   And most importantly:
    - Describe why do you suspect there is cache-coherence
      problem in the system ?   In the kernel side, or
      in your application ?   How it is manifesting itself ?


> Thanks.
> Frank Samuel

/Matti Aarnio

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: A question about cache coherence
  2002-08-19 18:21 A question about cache coherence Xuehua Chen
  2002-08-19 18:35 ` Matti Aarnio
@ 2002-08-19 19:23 ` Alan Cox
  2002-08-19 21:40 ` James Cleverdon
  2 siblings, 0 replies; 4+ messages in thread
From: Alan Cox @ 2002-08-19 19:23 UTC (permalink / raw)
  To: Xuehua Chen; +Cc: linux-kernel

On Mon, 2002-08-19 at 19:21, Xuehua Chen wrote:
> 1. Do Xeon processors have hardware mechanisms to
> maintain cache coherence?

Yes

> 2. Does the SMP kernel handle the cache coherence
> problem

The kernel has to manage side issues (TLB shootdown etc)

> 3. What should I do if both of them don't handle cache
> coherence.

Debug your code. It is possible you are hitting a kernel bug but its
extremely unlikely.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: A question about cache coherence
  2002-08-19 18:21 A question about cache coherence Xuehua Chen
  2002-08-19 18:35 ` Matti Aarnio
  2002-08-19 19:23 ` Alan Cox
@ 2002-08-19 21:40 ` James Cleverdon
  2 siblings, 0 replies; 4+ messages in thread
From: James Cleverdon @ 2002-08-19 21:40 UTC (permalink / raw)
  To: Xuehua Chen, linux-kernel

On Monday 19 August 2002 11:21 am, Xuehua Chen wrote:
> Met a problem in my research. I run some code on a
> Xeon
> dual-processor machine. It seems to me that there is a
>  cache coherence problem. As I am not so familiar
> to this topic, I would like to ask some experts about
> the following questions.
>
> 1. Do Xeon processors have hardware mechanisms to
> maintain cache coherence?

Someone at Intel can correct me, but I believe they use a modified MESI cache 
coherency protocol.  Note that this coherency does not guarantee indivisible 
read-modify-write operations unless atomic opcodes are used.  (xchg or lock 
<opcode>)

> 2. Does the SMP kernel handle the cache coherence
> problem

See Alan's and others' postings.  The kernel relies on the hardware to keep 
its act straight, then takes care of MMU coherency.

> 3. What should I do if both of them don't handle cache
> coherence.

See 1 and 2.  Consider using futexes or some other mutex mechanism appropriate 
to user or kernel code.

> Thanks.
>
> Frank Samuel

-- 
James Cleverdon
IBM xSeries Linux Solutions
{jamesclv(Unix, preferred), cleverdj(Notes)} at us dot ibm dot com


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2002-08-19 21:36 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-08-19 18:21 A question about cache coherence Xuehua Chen
2002-08-19 18:35 ` Matti Aarnio
2002-08-19 19:23 ` Alan Cox
2002-08-19 21:40 ` James Cleverdon

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®