From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754664Ab3ARDrZ (ORCPT ); Thu, 17 Jan 2013 22:47:25 -0500 Received: from mail-pb0-f50.google.com ([209.85.160.50]:49695 "EHLO mail-pb0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753294Ab3ARDrY (ORCPT ); Thu, 17 Jan 2013 22:47:24 -0500 Date: Thu, 17 Jan 2013 19:47:18 -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: <20130118034718.GX2668@htj.dyndns.org> References: <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> <20130118030407.GK16568@mtj.dyndns.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 07:18:26PM -0800, Linus Torvalds wrote: > I'm not sure I understand what you mean? Do you mean trying to limit > work_current_func() to only be accessible to the async code? You'd > have to make some kind of private header file under kernel/ for that, > but I guess that would work fine. We already do something similar > inside filesystems etc, where they have their own local headers. Yeap, and I'm unsure whether it's worth introducing a new internal header file. > Yes, yes, some globally optimizing compiler could sort it all out, but > I'd personally be inclined to just move all the structure definitions > into kernel/worker.h, and make the code be inline functions. The only > actual current *user* would also be in the kernel/ subdirectory, and > we don't know if we'd ever want to really expand it past there. > > Hmm? If we're gonna make it kernel/ internal thing with internal header, we definitely can go all the way. It's a bit meh because the code path involved is very cold. Hmm... I'll make it that way. I like how it keeps the thing apparently internal. Thanks. -- tejun