mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Paul Jackson <pj@sgi.com>
To: "Paul Menage" <menage@google.com>
Cc: akpm@osdl.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Allow a larger buffer for writes to cpuset files
Date: Mon, 30 Oct 2006 20:00:53 -0800	[thread overview]
Message-ID: <20061030200053.f9836cce.pj@sgi.com> (raw)
In-Reply-To: <6599ad830610301838i65a00d85g82647435ea4581a4@mail.gmail.com>

Paul M wrote:
> @@ -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)

On a system with 4 Kbyte pages, this imposes a tighter limit
if NR_CPUS is > 666.

On a system with 16 Kbyte pages, this imposes a tighter limit
if NR_CPUS is > 2714.

Those CPU counts don't look that futuristic to me.

And it makes the limit more aribitrary ... like what the heck does
that check have to do with PAGE_SIZE ?

How about coding for the possibility that either NR_CPUS or MAX_NUMNODES
is larger, and removing 'cpu' from the comment:

	/* Crude upper limit on largest legitimate list user might write. */
	if (nbytes > 100 + 6 * max(NR_CPUS, MAX_NUMNODES))

-- 
                  I won't rest till it's the best ...
                  Programmer, Linux Scalability
                  Paul Jackson <pj@sgi.com> 1.925.600.0401

  reply	other threads:[~2006-10-31  4:01 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-31  2:38 Paul Menage
2006-10-31  4:00 ` Paul Jackson [this message]
2006-10-31  4:15   ` Paul Menage

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20061030200053.f9836cce.pj@sgi.com \
    --to=pj@sgi.com \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=menage@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®