[PATCH] Allow a larger buffer for writes to cpuset files

From: Paul Menage
Date: Mon Oct 30 2006 - 21:40:44 EST


When using fake NUMA setup, the number of memory nodes can greatly
exceed the number of CPUs. So the current limit in
cpuset_common_file_write() is insufficient. PAGE_SIZE is still a bit
of an arbitrary limit, but gives more breathing room.

Signed-off-by: Paul Menage <menage@xxxxxxxxxx>

--- 2.6.19-rc2.orig/kernel/cpuset.c
+++ 2.6.19-rc2/kernel/cpuset.c
@@ -1292,7 +1292,7 @@ static ssize_t cpuset_common_file_write(
int retval = 0;

/* Crude upper limit on largest legitimate cpulist user might write. */
- if (nbytes > 100 + 6 * NR_CPUS)
+ if (nbytes >= PAGE_SIZE)
return -E2BIG;

/* +1 for nul-terminator */
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/