mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] Allow a larger buffer for writes to cpuset files
@ 2006-10-31  2:38 Paul Menage
  2006-10-31  4:00 ` Paul Jackson
  0 siblings, 1 reply; 3+ messages in thread
From: Paul Menage @ 2006-10-31  2:38 UTC (permalink / raw)
  To: Andrew Morton, Paul Jackson; +Cc: linux-kernel

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@google.com>

--- 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 */

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

end of thread, other threads:[~2006-10-31  4:15 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-10-31  2:38 [PATCH] Allow a larger buffer for writes to cpuset files Paul Menage
2006-10-31  4:00 ` Paul Jackson
2006-10-31  4:15   ` Paul Menage

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®