From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935767AbcKJRUG (ORCPT ); Thu, 10 Nov 2016 12:20:06 -0500 Received: from mx1.redhat.com ([209.132.183.28]:37100 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935329AbcKJRUD (ORCPT ); Thu, 10 Nov 2016 12:20:03 -0500 Date: Thu, 10 Nov 2016 18:19:58 +0100 From: Oleg Nesterov To: Thomas Gleixner , Petr Mladek Cc: Andy Lutomirski , Roman Pen , Andy Lutomirski , Peter Zijlstra , Ingo Molnar , Tejun Heo , "linux-kernel@vger.kernel.org" , Chunming Zhou , Alex Deucher Subject: [PATCH 0/1] kthread: don't abuse kthread_create_on_cpu() in __kthread_create_worker() Message-ID: <20161110171957.GA28264@redhat.com> References: <20161026141359.GA6893@redhat.com> <20161026155155.GA28832@redhat.com> <20161028161106.GA8933@redhat.com> <20161031200729.GA19430@redhat.com> <20161031200823.GC19430@redhat.com> <20161109172743.GB26446@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20161109172743.GB26446@redhat.com> User-Agent: Mutt/1.5.24 (2015-08-30) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Thu, 10 Nov 2016 17:20:03 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/09, Oleg Nesterov wrote: > > Yes, agreed. Again, I'll write another email. Perhaps we should even keep > park/unpark exported and change them to avoid the races with exit/itself, > I dunno. > > My real point was, imo the KTHREAD_IS_PER_CPU/__kthread_bind(kthread->cpu) > logic in kthread_unpark() should be private to smpboot.c/cpu.c. > > I'll send another patch tomorrow. kthread_create_worker_on_cpu() ab-uses > this logic too for no reason, but this is trivial. After this change we are almost ready to kill kthread->cpu and KTHREAD_IS_PER_CPU. (but the change itself doesn't depend on the previous patches). Petr, why do we need kthread_create_worker_on_cpu() ? It has no users and I can not imagine any "real" use-case for it. Perhaps it can be removed? Oleg.