Re: [PATCH 2/3] workqueue, async: implement work/async_current_func()

2013-01-17 Thread Tejun Heo
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 woul

Re: [PATCH 2/3] workqueue, async: implement work/async_current_func()

2013-01-17 Thread Linus Torvalds
On Thu, Jan 17, 2013 at 7:04 PM, Tejun Heo wrote: > > 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.

Re: [PATCH 2/3] workqueue, async: implement work/async_current_func()

2013-01-17 Thread Tejun Heo
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_pe

Re: [PATCH 2/3] workqueue, async: implement work/async_current_func()

2013-01-17 Thread Tejun Heo
Hello, Linus. On Thu, Jan 17, 2013 at 06:47:48PM -0800, Linus Torvalds wrote: > On Thu, Jan 17, 2013 at 5:25 PM, Tejun Heo wrote: > > Implement work/async_current_func() which query whether the current > > task is a workqueue or async worker respectively and, if so, return > > the current functio

Re: [PATCH 2/3] workqueue, async: implement work/async_current_func()

2013-01-17 Thread Linus Torvalds
On Thu, Jan 17, 2013 at 5:25 PM, Tejun Heo wrote: > Implement work/async_current_func() which query whether the current > task is a workqueue or async worker respectively and, if so, return > the current function being executed along with work / async item > related information. So why the odd in

[PATCH 2/3] workqueue, async: implement work/async_current_func()

2013-01-17 Thread Tejun Heo
Implement work/async_current_func() which query whether the current task is a workqueue or async worker respectively and, if so, return the current function being executed along with work / async item related information. This will be used to implement warning on synchronous request_module() from