From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755006Ab3ARDEQ (ORCPT ); Thu, 17 Jan 2013 22:04:16 -0500 Received: from mail-qc0-f174.google.com ([209.85.216.174]:49904 "EHLO mail-qc0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754412Ab3ARDEN (ORCPT ); Thu, 17 Jan 2013 22:04:13 -0500 Date: Thu, 17 Jan 2013 19:04:07 -0800 From: Tejun Heo To: Linus Torvalds Cc: Arjan van de Ven , Ming Lei , Alex Riesen , Alan Stern , Jens Axboe , USB list , Linux Kernel Mailing List , Rusty Russell Subject: Re: [PATCH 2/3] workqueue, async: implement work/async_current_func() Message-ID: <20130118030407.GK16568@mtj.dyndns.org> References: <20130116032502.GN2668@htj.dyndns.org> <20130116164832.GP2668@htj.dyndns.org> <50F6DD4D.3070808@linux.intel.com> <20130116213032.GS2668@htj.dyndns.org> <20130118012503.GH16568@mtj.dyndns.org> <20130118025936.GJ16568@mtj.dyndns.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20130118025936.GJ16568@mtj.dyndns.org> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jan 17, 2013 at 06:59:36PM -0800, Tejun Heo wrote: > I'd prefer to keep struct worker inside workqueue.c, so how about > keeping the workqueue part and make async part current_is_async()? Another thing is that it seems like having introspection type interface often lead to abuses - work_pending(), work_busy() both ended up bringing more unnecessary dependencies and subtle bugginess on internal details than actual benefits. Querying %current is much less likely to be harmful in itself but I'm afraid it might encourage its users to develop something crazy on top. It might be a good idea to make it only available to async. Thanks. -- tejun