mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: David Rientjes <rientjes@google.com>
To: Max Krasnyansky <maxk@qualcomm.com>
Cc: Paul Jackson <pj@sgi.com>,
	mingo@elte.hu, Peter Zijlstra <a.p.zijlstra@chello.nl>,
	menage@google.com, linux-kernel@vger.kernel.org
Subject: Re: cpusets and kthreads, inconsistent behaviour
Date: Tue, 10 Jun 2008 13:54:50 -0700 (PDT)	[thread overview]
Message-ID: <alpine.DEB.1.10.0806101350110.29422@chino.kir.corp.google.com> (raw)
In-Reply-To: <484EE7BE.3000606@qualcomm.com>

On Tue, 10 Jun 2008, Max Krasnyansky wrote:

> Hmm, technically you are correct of course. But we do not have any other
> kernel tasks besides kthreads. All the kernel tasks I have on my machines have
> kthreadd as their parent.
> And I'm not aware of any kernel code that changes affinity mask of a
> user-space task without paying attention to the cpuset the task belongs to. If
> you know of any we should fix it because it'd clearly be a bug.
> 

This is why it shouldn't belong in the sched or kthread code; the 
discrepency that you point out between p->cpus_allowed and 
task_cs(p)->cpus_allowed is a cpuset created one.

So to avoid having tasks with a cpus_allowed mask that is not a subset of 
its cpuset's set of allowable cpus, the solution would probably be to add 
a flavor of cpuset_update_task_memory_state() for a cpus generation value.

  reply	other threads:[~2008-06-10 20:55 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-05 19:57 [patch] sched: prevent bound kthreads from changing cpus_allowed David Rientjes
2008-06-05 20:29 ` Paul Jackson
2008-06-05 21:12   ` David Rientjes
2008-06-09 20:59     ` Max Krasnyanskiy
2008-06-09 22:07       ` David Rientjes
2008-06-10  4:23         ` Max Krasnyansky
2008-06-10 17:04           ` David Rientjes
2008-06-10 16:30         ` cpusets and kthreads, inconsistent behaviour Max Krasnyansky
2008-06-10 18:47           ` David Rientjes
2008-06-10 20:44             ` Max Krasnyansky
2008-06-10 20:54               ` David Rientjes [this message]
2008-06-10 21:15                 ` Max Krasnyansky
2008-06-10  6:44       ` [patch] sched: prevent bound kthreads from changing cpus_allowed Peter Zijlstra
2008-06-10 15:38         ` Max Krasnyansky
2008-06-10 17:00           ` Oleg Nesterov
2008-06-10 17:19             ` Peter Zijlstra
2008-06-10 20:24               ` workqueue cpu affinity Max Krasnyansky
2008-06-11  6:49                 ` Peter Zijlstra
2008-06-11 19:02                   ` Max Krasnyansky
2008-06-12 18:44                     ` Peter Zijlstra
2008-06-12 19:10                       ` Max Krasnyanskiy
2008-06-11 16:08                 ` Oleg Nesterov
2008-06-11 19:21                   ` Max Krasnyansky
2008-06-11 19:21                   ` Max Krasnyansky
2008-06-12 16:35                     ` Oleg Nesterov
2008-06-11 20:44                   ` Max Krasnyansky
2008-06-10 18:00             ` [patch] sched: prevent bound kthreads from changing cpus_allowed Max Krasnyansky
2008-06-05 20:52 ` Daniel Walker
2008-06-05 21:47 ` Paul Jackson
2008-06-10 10:28 ` Ingo Molnar
2008-06-10 17:47 ` Oleg Nesterov

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=alpine.DEB.1.10.0806101350110.29422@chino.kir.corp.google.com \
    --to=rientjes@google.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maxk@qualcomm.com \
    --cc=menage@google.com \
    --cc=mingo@elte.hu \
    --cc=pj@sgi.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®