LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* linux scheduler and "cache-mate" processors
@ 2007-01-25  0:10 Linda W.
  2007-01-31 10:17 ` Arjan van de Ven
  0 siblings, 1 reply; 3+ messages in thread
From: Linda W. @ 2007-01-25  0:10 UTC (permalink / raw)
  To: LKML

I had a few questions about the linux scheduler and how it
interacts with in a 4 CPU system where the L2 cache is shared
between "pairs" (on same die) of processors.

Some of the later Core processors have 4MB of
L2cache/processor, and on a single chip, both processors have
access to the full 8MB of cache.  At this point, AFAIK, Quad
processors are only implemented by putting 2 pairs of Core
chips and the two pairs don't share cache, acting, to some
extent, like a 2-socket system with Intel Dual Core
processors in each socket.

What I'm wondering is, say CPUs A&B share 1 cache, and C&D
share a 2nd cache.  

1) does the scheduler know enough to try to spread tasks
equally over both the pairs to make best use of the 16MB total
cache? (i.e. given cpu bound processes "1" and "2", if they
are both on CPU "A", then the "C-D" cache remains unused, but
keeping "1" on "a" and "2" on "C" would tend to minimize
their caches being consumed by each other.

2) Since either A&B both have access to the 8MB cache, then
if a process was running on "A", it seems it would have a
low migration cost to be scheduled on "B" -- i.e. shouldn't
the process, if it were migrated to "A"'s "cache-mate", "B",
be able to benefit by any previous caching done on "A"? 
If that's true, does the scheduler give preference, when
migrating a process, to a CPU's "cache-mate"? 

If these things aren't in, are they planned for future or being
worked on?

Thanks,
Linda W.
 



 

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

* Re: linux scheduler and "cache-mate" processors
  2007-01-25  0:10 linux scheduler and "cache-mate" processors Linda W.
@ 2007-01-31 10:17 ` Arjan van de Ven
  2007-01-31 20:20   ` Chuck Ebbert
  0 siblings, 1 reply; 3+ messages in thread
From: Arjan van de Ven @ 2007-01-31 10:17 UTC (permalink / raw)
  To: Linda W.; +Cc: LKML


> 1) does the scheduler know enough to try to spread tasks
> equally over both the pairs to make best use of the 16MB total
> cache? (i.e. given cpu bound processes "1" and "2", if they
> are both on CPU "A", then the "C-D" cache remains unused, but
> keeping "1" on "a" and "2" on "C" would tend to minimize
> their caches being consumed by each other.

yes this works just fine


> 2) Since either A&B both have access to the 8MB cache, then
> if a process was running on "A", it seems it would have a
> low migration cost to be scheduled on "B" -- i.e. shouldn't
> the process, if it were migrated to "A"'s "cache-mate", "B",
> be able to benefit by any previous caching done on "A"? 
> If that's true, does the scheduler give preference, when
> migrating a process, to a CPU's "cache-mate"? 

afaik yes as well



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

* Re: linux scheduler and "cache-mate" processors
  2007-01-31 10:17 ` Arjan van de Ven
@ 2007-01-31 20:20   ` Chuck Ebbert
  0 siblings, 0 replies; 3+ messages in thread
From: Chuck Ebbert @ 2007-01-31 20:20 UTC (permalink / raw)
  To: Arjan van de Ven; +Cc: Linda W., LKML

Arjan van de Ven wrote:
>> 1) does the scheduler know enough to try to spread tasks
>> equally over both the pairs to make best use of the 16MB total
>> cache? (i.e. given cpu bound processes "1" and "2", if they
>> are both on CPU "A", then the "C-D" cache remains unused, but
>> keeping "1" on "a" and "2" on "C" would tend to minimize
>> their caches being consumed by each other.
>>     
>
> yes this works just fine
>
>
>   
>> 2) Since either A&B both have access to the 8MB cache, then
>> if a process was running on "A", it seems it would have a
>> low migration cost to be scheduled on "B" -- i.e. shouldn't
>> the process, if it were migrated to "A"'s "cache-mate", "B",
>> be able to benefit by any previous caching done on "A"? 
>> If that's true, does the scheduler give preference, when
>> migrating a process, to a CPU's "cache-mate"? 
>>     
>
> afaik yes as well
>
>   
You do have to enable "Multi-core scheduler support" in the kernel
.config, though.


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

end of thread, other threads:[~2007-01-31 20:22 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-01-25  0:10 linux scheduler and "cache-mate" processors Linda W.
2007-01-31 10:17 ` Arjan van de Ven
2007-01-31 20:20   ` Chuck Ebbert

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).