From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755191AbcFTT6R (ORCPT ); Mon, 20 Jun 2016 15:58:17 -0400 Received: from mail-yw0-f196.google.com ([209.85.161.196]:36584 "EHLO mail-yw0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933377AbcFTT5S (ORCPT ); Mon, 20 Jun 2016 15:57:18 -0400 Date: Mon, 20 Jun 2016 15:57:16 -0400 From: Tejun Heo To: Petr Mladek Cc: Andrew Morton , Oleg Nesterov , Ingo Molnar , Peter Zijlstra , Steven Rostedt , "Paul E. McKenney" , Josh Triplett , Thomas Gleixner , Linus Torvalds , Jiri Kosina , Borislav Petkov , Michal Hocko , linux-mm@kvack.org, Vlastimil Babka , linux-api@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v9 07/12] kthread: Add kthread_destroy_worker() Message-ID: <20160620195716.GY3262@mtj.duckdns.org> References: <1466075851-24013-1-git-send-email-pmladek@suse.com> <1466075851-24013-8-git-send-email-pmladek@suse.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1466075851-24013-8-git-send-email-pmladek@suse.com> User-Agent: Mutt/1.6.1 (2016-04-27) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jun 16, 2016 at 01:17:26PM +0200, Petr Mladek wrote: > The current kthread worker users call flush() and stop() explicitly. > This function drains the worker, stops it, and frees the kthread_worker > struct in one call. > > It is supposed to be used together with kthread_create_worker*() that > allocates struct kthread_worker. > > Also note that drain() correctly handles self-queuing works in compare > with flush(). > > Signed-off-by: Petr Mladek Acked-by: Tejun Heo Thanks. -- tejun