linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: "Paul Menage" <menage@google.com>
To: Cliff Wickman <cpw@sgi.com>
Cc: linux-mm@kvack.org
Subject: Re: [PATCH 1/1] hotplug cpu: move tasks in empty cpusets to parent
Date: Tue, 29 May 2007 00:29:32 -0700	[thread overview]
Message-ID: <6599ad830705290029w18f8fdbbmac312c362bfccb67@mail.gmail.com> (raw)
In-Reply-To: <20070522205300.6C18D371895@attica.americas.sgi.com>

On 5/22/07, Cliff Wickman <cpw@sgi.com> wrote:
> - * Call with both manage_mutex and callback_mutex held.
> + * Call with both manage_sem and callback_sem held so
> + * that this function can modify cpus_allowed and mems_allowed.
>   *
> - * Recursive, on depth of cpuset subtree.
> + * This walk processes the tree from top to bottom, completing one layer
> + * before dropping down to the next.  It always processes a node before
> + * any of its children.
>   */
> +static void remove_tasks_from_empty_cpusets(const struct cpuset *root, int *count)
> +{
> +       struct cpuset *cp;      /* scans cpusets being updated */
> +       struct cpuset *child;   /* scans child cpusets of cp */
> +       struct kfifo *queue;    /* fifo queue of cpusets to be updated */
> +
> +       queue = kfifo_alloc(number_of_cpusets * sizeof(cp), GFP_KERNEL, NULL);
> +       if (queue == ERR_PTR(-ENOMEM))
> +               return;

You can't call memory allocation functions while holding
callback_mutex - otherwise you can theoretically deadlock if
_alloc_pages() calls cpuset_zone_allowed_*()

Paul

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

      reply	other threads:[~2007-05-29  7:29 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-22 20:53 Cliff Wickman
2007-05-29  7:29 ` Paul Menage [this message]

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=6599ad830705290029w18f8fdbbmac312c362bfccb67@mail.gmail.com \
    --to=menage@google.com \
    --cc=cpw@sgi.com \
    --cc=linux-mm@kvack.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