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: akpm@linux-foundation.org, nickpiggin@yahoo.com.au,
	a.p.zijlstra@chello.nl, serue@us.ibm.com, clg@fr.ibm.com,
	linux-kernel@vger.kernel.org, ebiederm@xmission.com,
	rientjes@google.com, svaidy@linux.vnet.ibm.com, xemul@openvz.org,
	containers@lists.osdl.org, balbir@linux.vnet.ibm.com
Subject: Re: [PATCH] task containersv11 add tasks file interface fix for cpusets
Date: Sat, 6 Oct 2007 13:53:53 -0700	[thread overview]
Message-ID: <6599ad830710061353k4f596b51qce83b6a7d27e73bc@mail.gmail.com> (raw)
In-Reply-To: <20071006012437.c0fd3a8a.pj@sgi.com>

On 10/6/07, Paul Jackson <pj@sgi.com> wrote:
>
> This isn't working for me.
>
> The key kernel routine for updating a tasks cpus_allowed
> cannot be called while holding a spinlock.
>
> But the above loop holds a spinlock, css_set_lock, between
> the cgroup_iter_start and the cgroup_iter_end.
>
> I end up generating complaints of:
>         BUG: scheduling while atomic
> when I invoke the set_cpus_allowed() above.
>
> Should css_set_lock be a mutex?  Locking changes like that
> can be risky.

css_set_lock is an rwlock currently; I'd rather not turn it into an rw
mutex since there are places that it gets taken where we can't afford
to sleep.

>
> Or perhaps there should be another callback, called only by
> attach() requests back to the same group.  Likely cpusets would
> be the only subsystem interested in plugging that callback.
>
> That, or my original patch, which calls the attach routine
> even if re-attaching to the current cgroup ...

I'd prefer David's solution of grabbing references to tasks during the
iteration and then doing set_cpus_allowed outside the tasklist_lock.

Paul

  parent reply	other threads:[~2007-10-06 20:54 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-03  8:42 Paul Jackson
2007-10-03 15:51 ` Paul Menage
2007-10-03 17:58   ` Paul Jackson
2007-10-03 18:10     ` Paul Menage
2007-10-03 18:25       ` Paul Menage
2007-10-03 20:16       ` Paul Jackson
2007-10-03 20:31         ` Paul Menage
2007-10-03 20:52           ` Paul Jackson
2007-10-03 20:58             ` Paul Menage
2007-10-06  8:24           ` Paul Jackson
2007-10-06 17:54             ` David Rientjes
2007-10-06 19:59               ` Paul Jackson
2007-10-06 21:09                 ` Paul Menage
2007-10-06 21:41                   ` Paul Jackson
2007-10-11 22:03                   ` Paul Jackson
2007-10-11 23:20                     ` Eric W. Biederman
2007-10-12  1:23                       ` Paul Jackson
2007-10-07  6:13                 ` David Rientjes
2007-10-06 21:11               ` Paul Menage
2007-10-07  6:15                 ` David Rientjes
2007-10-10 20:46                   ` Paul Menage
2007-10-10 20:59                     ` David Rientjes
2007-10-11 23:15                       ` Paul Jackson
2007-10-12 15:13                         ` David Rientjes
2007-10-06 20:53             ` Paul Menage [this message]
2007-10-03 20:56 ` 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=6599ad830710061353k4f596b51qce83b6a7d27e73bc@mail.gmail.com \
    --to=menage@google.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=akpm@linux-foundation.org \
    --cc=balbir@linux.vnet.ibm.com \
    --cc=clg@fr.ibm.com \
    --cc=containers@lists.osdl.org \
    --cc=ebiederm@xmission.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nickpiggin@yahoo.com.au \
    --cc=pj@sgi.com \
    --cc=rientjes@google.com \
    --cc=serue@us.ibm.com \
    --cc=svaidy@linux.vnet.ibm.com \
    --cc=xemul@openvz.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

Powered by JetHome