Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Dual-core G5 sysctl



On 29 Nov 2005, at 17:20, Shaun Wexler wrote:

I haven't received my Quad G5 yet. Will someone please confirm these sysctl:

  hw.ncpu
  hw.physicalcpu
  hw.physicalcpu_max
  hw.logicalcpu
  hw.logicalcpu_max

Thanks!

This is from "sysctl -a | grep cpu": hw.ncpu = 4 hw.cpufrequency = 2500000000 hw.availcpu = 4 hw.ncpu: 4 hw.activecpu: 4 hw.physicalcpu: 4 hw.physicalcpu_max: 4 hw.logicalcpu: 4 hw.logicalcpu_max: 4 hw.cputype: 18 hw.cpusubtype: 100 hw.cpufrequency: 2500000000 hw.cpufrequency_min: 2500000000 hw.cpufrequency_max: 2500000000



While you brought up the subject, I might as well hijack your thread. ;-)

On the new dual-core systems, is there any way to tell which threads are running on which physical CPUs? I was wondering if it's possible to get better performance by restricting memory bus access (as each pair of cores shares a single bus).

For example: two threads with a mutex that restricts access to code that reads from memory. One thread can be churning away on data in it's L2 cache (but will still have infrequent, accidental memory accesses due to cache associativity etc.) while the other streams data from memory.

Does the kernel schedule threads from the same process onto the same physical CPU (i.e. two threads running on two cores on the same CPU)? Is there any way to force this?



r i c k
_______________________________________________
Do not post admin requests to the list. They will be ignored.
PerfOptimization-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/perfoptimization-dev/email@hidden

This email sent to email@hidden
References: 
 >Dual-core G5 sysctl (From: Shaun Wexler <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.