[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20161114111255.GB32499@pathway.suse.cz>
Date: Mon, 14 Nov 2016 12:12:55 +0100
From: Petr Mladek <pmladek@...e.com>
To: Oleg Nesterov <oleg@...hat.com>
Cc: Thomas Gleixner <tglx@...utronix.de>,
Andy Lutomirski <luto@...capital.net>,
Roman Pen <roman.penyaev@...fitbricks.com>,
Andy Lutomirski <luto@...nel.org>,
Peter Zijlstra <peterz@...radead.org>,
Ingo Molnar <mingo@...hat.com>, Tejun Heo <tj@...nel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Chunming Zhou <David1.Zhou@....com>,
Alex Deucher <alexander.deucher@....com>
Subject: Re: [PATCH 1/1] kthread: don't abuse kthread_create_on_cpu() in
__kthread_create_worker()
On Thu 2016-11-10 18:20:31, Oleg Nesterov wrote:
> kthread_create_on_cpu() sets KTHREAD_IS_PER_CPU and kthread->cpu, this
> only makes sense if this kthread can be parked/unparked by cpuhp code.
> kthread workers never call kthread_parkme() so this has no effect.
Yes.
> Change __kthread_create_worker() to simply call kthread_bind(task, cpu).
> The very fact that kthread_create_on_cpu() doesn't accept a generic fmt
> shows that it should not be used outside of smpboot.c.
>
> Now, the only reason we can not unexport this helper and move it into
> smpboot.c is that it sets kthread->cpu and struct kthread is not exported.
> And the only reason we can not kill kthread->cpu is that kthread_unpark()
> is used by drivers/gpu/drm/amd/scheduler/gpu_scheduler.c and thus we can
> not turn _unpark into kthread_unpark(struct smp_hotplug_thread *, cpu).
>
> Signed-off-by: Oleg Nesterov <oleg@...hat.com>
The change looks fine to me. Feel free to add one or both of these:
Reviewed-by: Petr Mladek <pmladek@...e.com>
Tested-by: Petr Mladek <pmladek@...e.com>
Best Regards,
Petr
Powered by blists - more mailing lists