mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Paul Menage" <menage@google.com>
To: "Paul Jackson" <pj@sgi.com>
Cc: "David Rientjes" <rientjes@google.com>,
	torvalds@linux-foundation.org, clameter@cthulhu.engr.sgi.com,
	linux-kernel@vger.kernel.org
Subject: Re: [patch] cpusets: allow empty {cpus,mems}_allowed to be set for unpopulated cpuset
Date: Tue, 1 May 2007 20:36:29 -0700	[thread overview]
Message-ID: <6599ad830705012036g21cc8470nff246e146b1e4023@mail.gmail.com> (raw)
In-Reply-To: <20070501202201.6903d922.pj@sgi.com>

On 5/1/07, Paul Jackson <pj@sgi.com> wrote:
> Why do you need this?  It adds a little more code, and changes
> semantics a little bit, so I'd think it should have at least a
> little bit of justfication.

We have cases where we'd like to be able to clear the memory nodes
away from a (temporarily) empty cpuset without actually deleting the
directory - there's really no reason for the interface to stop people
from doing that as far as I can see. Otherwise the only way to reclaim
the node for a different sibling is to delete the cpuset.

>
>
> +       if (!*buf) {
> +               cpus_clear(trialcs.cpus_allowed);
>
> Won't the above code fail if someone does:
>
>         echo > /dev/cpuset/foobar/mems
>
> Just guessing, but I'd expect buf[] to contain a newline char,
> not just a zero length string, at this point.

Yes, but that's arguably an artefact of the user using the wrong tool
to update the cpu/node set. Doing "echo -n > /dev/cpuset/foobar/mems"
has the expected effect.

Paul

  reply	other threads:[~2007-05-02  3:36 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-02  0:16 David Rientjes
2007-05-02  3:22 ` Paul Jackson
2007-05-02  3:36   ` Paul Menage [this message]
2007-05-02  7:10     ` Paul Jackson
2007-05-02  7:25     ` Paul Jackson
2007-05-02  8:26 ` Paul Jackson

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=6599ad830705012036g21cc8470nff246e146b1e4023@mail.gmail.com \
    --to=menage@google.com \
    --cc=clameter@cthulhu.engr.sgi.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pj@sgi.com \
    --cc=rientjes@google.com \
    --cc=torvalds@linux-foundation.org \
    /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®