From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759472AbcJYQTB (ORCPT ); Tue, 25 Oct 2016 12:19:01 -0400 Received: from mx1.redhat.com ([209.132.183.28]:38026 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757532AbcJYQTA (ORCPT ); Tue, 25 Oct 2016 12:19:00 -0400 Date: Tue, 25 Oct 2016 18:17:25 +0200 From: Oleg Nesterov To: Roman Penyaev Cc: Andy Lutomirski , Peter Zijlstra , Thomas Gleixner , Ingo Molnar , Tejun Heo , linux-kernel@vger.kernel.org Subject: Re: [PATCH v3 1/1] kthread: allocate kthread structure using kmalloc Message-ID: <20161025161725.GB13257@redhat.com> References: <20161025110508.9052-1-roman.penyaev@profitbricks.com> <20161025140333.GB4326@redhat.com> <20161025154301.GA12015@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.18 (2008-05-17) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Tue, 25 Oct 2016 16:18:59 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Roman, I need to run away, just one note. On 10/25, Roman Penyaev wrote: > > On Tue, Oct 25, 2016 at 5:43 PM, Oleg Nesterov wrote: > > So in particular I do not understand this comment from the patch above > where you abuse 'current->set_child_tid': > > * This is the ugly but simple hack we will hopefully remove soon. > > how you are going to avoid this abuse of set_child_tid? please ignore this comment. It actually reflects my desire to kill struct kthread. If we won't do this, we can (ab)use this or another member in task_struct. > or vfork_done? > because vfork_done is not only for waking up (yes, I totally agree, we > can reuse task_work), it is also for getting a private data (like > workqueue uses it): task_struct->vfork_done->kthread->data. kthreads simply should not use ->vfork_done at all. to_kthread() can use the same pointer. Oleg.