public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Oleg Nesterov <oleg@redhat.com>
To: Rusty Russell <rusty@rustcorp.com.au>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Christoph Hellwig <hch@lst.de>,
	"Eric W. Biederman" <ebiederm@xmission.com>,
	Ingo Molnar <mingo@elte.hu>, Pavel Emelyanov <xemul@openvz.org>,
	Vitaliy Gusev <vgusev@openvz.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/4] kthreads: move sched-realeted initialization from kthreadd context
Date: Sun, 1 Feb 2009 11:38:17 +0100	[thread overview]
Message-ID: <20090201103817.GB5728@redhat.com> (raw)
In-Reply-To: <200901312117.17082.rusty@rustcorp.com.au>

On 01/31, Rusty Russell wrote:
>
> On Friday 30 January 2009 23:03:50 Oleg Nesterov wrote:
> > (on top of kthread-dont-looking-for-a-task-in-create_kthread-2.patch)
>
> Hi Oleg,
>
>    Thanks for the cc: Vitaliy, I never saw that patch.  I've included it in my queue now.
>
> As to this patch, it seems marginal.  I've never been convinced that we should
> be trying to rescue root if they choose to set kthreadd's prio anyway,

I agree. Personally, I never understood this too. But if we want to
remove this code we need the separate discussion, so I just moved it
to the caller's context.

> but I'm also wondering why we care about kthread_create scalability!

It is always better to speedup things and to decrease the latency ;)

But I also think this and the next patch make the code simpler and
more clean. Now the only thing create_kthread() does is a plain fork()
and nothing else, this is imho good.

> Still, I'm happy to apply it with one change:
>
> > +		/*
> > +		 * root may have changed our (kthreadd's) priority or CPU mask.
> > +		 * The kernel thread should not inherit these properties.
> > +		 */
> > +		sched_setscheduler_nocheck(create.result, SCHED_NORMAL, &param);
> > +		set_user_nice(create.result, KTHREAD_NICE_LEVEL);
> > +		set_cpus_allowed_ptr(create.result, CPU_MASK_ALL_PTR);
>
> cpu_all_mask is the non-deprecated replacement for CPU_MASK_ALL_PTR.

Great, thanks.

(btw, I thought about avoiding CPU_MASK_ALL_PTR too, but I didn't
 dare to mix 2 different things in one patch).

Oleg.


      reply	other threads:[~2009-02-01 10:41 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-30 12:33 [PATCH 1/4] kthreads: move sched-realeted initialization from kthreadd context Oleg Nesterov
2009-01-31 10:47 ` Rusty Russell
2009-02-01 10:38   ` Oleg Nesterov [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=20090201103817.GB5728@redhat.com \
    --to=oleg@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=ebiederm@xmission.com \
    --cc=hch@lst.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=rusty@rustcorp.com.au \
    --cc=vgusev@openvz.org \
    --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