From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753746AbbJNRar (ORCPT ); Wed, 14 Oct 2015 13:30:47 -0400 Received: from mail-yk0-f177.google.com ([209.85.160.177]:36397 "EHLO mail-yk0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752486AbbJNRap (ORCPT ); Wed, 14 Oct 2015 13:30:45 -0400 Date: Wed, 14 Oct 2015 13:30:39 -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 , live-patching@vger.kernel.org, linux-api@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [RFC v2 07/18] kthread: Allow to cancel kthread work Message-ID: <20151014173039.GB12799@mtj.duckdns.org> References: <20150922193513.GE17659@mtj.duckdns.org> <20150925112617.GA3122@pathway.suse.cz> <20150928170314.GF2589@mtj.duckdns.org> <20151002154336.GC3122@pathway.suse.cz> <20151002192453.GA7564@mtj.duckdns.org> <20151005100758.GK9603@pathway.suse.cz> <20151005110924.GL9603@pathway.suse.cz> <20151007092130.GD3122@pathway.suse.cz> <20151007142446.GA2012@mtj.duckdns.org> <20151014102022.GA2880@pathway.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20151014102022.GA2880@pathway.suse.cz> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello, On Wed, Oct 14, 2015 at 12:20:22PM +0200, Petr Mladek wrote: > IMHO, it would be great if it is easy to convert between the > kthread worker and workqueues API. It will allow to choose Sure, keep the APIs similar so that they can be easily converted back and forth but that doesn't mean kthread_worker should be as complex as workqueue. Workqueue is *really* complex partly for historical reasons and partly because it has to serve all corner cases. Please make something simple which is similar enough to enable easy miration. That amount of complexity simply isn't necessary for kthread_worker. ... > PS: I am not convinced that all my concerns were non-issues. > For example, I agree that a race when queuing the same work > to more kthread workers might look theoretical. On the other > hand, the API allows it and it might be hard to debug. IMHO, There are big differences in terms of complexity between ensuring something like the above working correctly under all circumstances and implementing a warning trap which would trigger well enough to warn against unsupported usages. These are active trade-offs to make and not particularly hard ones either. Let's please keep kthread_worker simple. Thanks. -- tejun