aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKazunori Asayama <asayama@sm.sony.co.jp>2009-03-13 18:18:00 -0700
committerYuji Mano <yuji.mano@am.sony.com>2009-03-17 10:57:51 -0700
commitf432a71298e538ed4cd11ee1348ee0d92638f03c (patch)
treea9765082499def875fb9f5a28494933583b3f45c
parent222ffbc8e3752f0c432afe8ea6b1f0c0024a8164 (diff)
downloadmars-src-f432a71298e538ed4cd11ee1348ee0d92638f03c.tar.gz
base: Usable spe count
Use number of usable SPEs instead of number of physical SPEs This patch modifies the mars_mpu_max() function so it uses # of usable SPEs instead of # of physical SPEs in order to avoid allocating system SPEs or NOSCHED SPEs to MARS. Signed-off-by: Kazunori Asayama <asayama@sm.sony.co.jp> Signed-off-by: Yuji Mano <yuji.mano@am.sony.com>
-rw-r--r--base/src/host/lib/mpu_cell.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/base/src/host/lib/mpu_cell.c b/base/src/host/lib/mpu_cell.c
index 66d8905..cff9233 100644
--- a/base/src/host/lib/mpu_cell.c
+++ b/base/src/host/lib/mpu_cell.c
@@ -64,7 +64,7 @@ static int numa_mpu_max(void)
* each node number is identical
* between numa API and libspe.
*/
- ret = spe_cpu_info_get(SPE_COUNT_PHYSICAL_SPES, i);
+ ret = spe_cpu_info_get(SPE_COUNT_USABLE_SPES, i);
if (ret < 0) {
num = ret;
break;
@@ -94,7 +94,7 @@ int mars_mpu_max(int *num)
if (mars_numa_enabled())
*num = numa_mpu_max();
else
- *num = spe_cpu_info_get(SPE_COUNT_PHYSICAL_SPES, -1);
+ *num = spe_cpu_info_get(SPE_COUNT_USABLE_SPES, -1);
if (*num <= 0)
return MARS_ERROR_INTERNAL;