From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752650AbcF1RFj (ORCPT ); Tue, 28 Jun 2016 13:05:39 -0400 Received: from mail-qk0-f179.google.com ([209.85.220.179]:33205 "EHLO mail-qk0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752173AbcF1RFg (ORCPT ); Tue, 28 Jun 2016 13:05:36 -0400 Date: Tue, 28 Jun 2016 13:04:47 -0400 From: Tejun Heo To: Petr Mladek Cc: Peter Zijlstra , Andrew Morton , Oleg Nesterov , Ingo Molnar , 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 06/12] kthread: Add kthread_drain_worker() Message-ID: <20160628170447.GE5185@htj.duckdns.org> References: <1466075851-24013-1-git-send-email-pmladek@suse.com> <1466075851-24013-7-git-send-email-pmladek@suse.com> <20160622205445.GV30909@twins.programming.kicks-ass.net> <20160623213258.GO3262@mtj.duckdns.org> <20160624070515.GU30154@twins.programming.kicks-ass.net> <20160624155447.GY3262@mtj.duckdns.org> <20160627143350.GA3313@pathway.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160627143350.GA3313@pathway.suse.cz> 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 Hello, On Mon, Jun 27, 2016 at 04:33:50PM +0200, Petr Mladek wrote: > OK, so you suggest to do the following: > > 1. Add a flag into struct kthread_worker that will prevent > from further queuing. This doesn't add any protection, right? It's getting freed anyway. > 2. kthread_create_worker()/kthread_destroy_worker() will > not longer dynamically allocate struct kthread_worker. > They will just start/stop the kthread. Ah, okay, I don't think we need to change this. I was suggesting to simplify it by dropping the draining and just do flush from destroy. Thanks. -- tejun From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tejun Heo Subject: Re: [PATCH v9 06/12] kthread: Add kthread_drain_worker() Date: Tue, 28 Jun 2016 13:04:47 -0400 Message-ID: <20160628170447.GE5185@htj.duckdns.org> References: <1466075851-24013-1-git-send-email-pmladek@suse.com> <1466075851-24013-7-git-send-email-pmladek@suse.com> <20160622205445.GV30909@twins.programming.kicks-ass.net> <20160623213258.GO3262@mtj.duckdns.org> <20160624070515.GU30154@twins.programming.kicks-ass.net> <20160624155447.GY3262@mtj.duckdns.org> <20160627143350.GA3313@pathway.suse.cz> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <20160627143350.GA3313@pathway.suse.cz> Sender: owner-linux-mm@kvack.org To: Petr Mladek Cc: Peter Zijlstra , Andrew Morton , Oleg Nesterov , Ingo Molnar , 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 List-Id: linux-api@vger.kernel.org Hello, On Mon, Jun 27, 2016 at 04:33:50PM +0200, Petr Mladek wrote: > OK, so you suggest to do the following: > > 1. Add a flag into struct kthread_worker that will prevent > from further queuing. This doesn't add any protection, right? It's getting freed anyway. > 2. kthread_create_worker()/kthread_destroy_worker() will > not longer dynamically allocate struct kthread_worker. > They will just start/stop the kthread. Ah, okay, I don't think we need to change this. I was suggesting to simplify it by dropping the draining and just do flush from destroy. Thanks. -- tejun -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org