Hello, Lai.
On Sun, Sep 09, 2012 at 12:09:58PM +0800, Lai Jiangshan wrote:
> > mutex_lock(>manager_mutex);
> > if (worker_maybe_bind_and_lock(worker))
> > worker_clr_flags(worker, WORKER_UNBOUND);
> > ret = true;
> >
>
>
> This code is correct.
Hello, Lai.
On Sun, Sep 09, 2012 at 12:09:58PM +0800, Lai Jiangshan wrote:
mutex_lock(pool-manager_mutex);
if (worker_maybe_bind_and_lock(worker))
worker_clr_flags(worker, WORKER_UNBOUND);
ret = true;
This code is correct.
On Sun, Sep 9, 2012 at 3:02 AM, Tejun Heo wrote:
> Hello, Lai.
>
> On Sun, Sep 09, 2012 at 02:34:02AM +0800, Lai Jiangshan wrote:
>> in 3.6 busy_worker_rebind() handle WORKER_REBIND bit,
>> not WORKER_UNBOUND bit.
>>
>> busy_worker_rebind() takes struct work_struct *work argument, we have to
>>
Hello, Lai.
On Sun, Sep 09, 2012 at 02:34:02AM +0800, Lai Jiangshan wrote:
> in 3.6 busy_worker_rebind() handle WORKER_REBIND bit,
> not WORKER_UNBOUND bit.
>
> busy_worker_rebind() takes struct work_struct *work argument, we have to
> add new patch to add a helper and restruct it at first.
On Sun, Sep 9, 2012 at 2:11 AM, Tejun Heo wrote:
> On Sun, Sep 09, 2012 at 02:07:50AM +0800, Lai Jiangshan wrote:
>> when we release gcwq->lock and then grab it, we leave a hole that things
>> can be changed.
>>
>> I don't want to open a hole. if the hole has bug we have to fix it.
>> if the hole
On Sun, Sep 09, 2012 at 02:07:50AM +0800, Lai Jiangshan wrote:
> when we release gcwq->lock and then grab it, we leave a hole that things
> can be changed.
>
> I don't want to open a hole. if the hole has bug we have to fix it.
> if the hole has no bug, we have to add lot of comments to explain
On Sun, Sep 9, 2012 at 1:53 AM, Tejun Heo wrote:
> Hello,
>
> On Sun, Sep 09, 2012 at 01:50:41AM +0800, Lai Jiangshan wrote:
>> >> + if (worker_maybe_bind_and_lock(manager))
>> >> + worker_clr_flags(manager, WORKER_UNBOUND);
>> >> + }
>> >> +}
>> >
>> > We can
Hello,
On Sun, Sep 09, 2012 at 01:50:41AM +0800, Lai Jiangshan wrote:
> >> + if (worker_maybe_bind_and_lock(manager))
> >> + worker_clr_flags(manager, WORKER_UNBOUND);
> >> + }
> >> +}
> >
> > We can reuse busy_worker_rebind_fn(), right?
>
>
On Sun, Sep 9, 2012 at 1:40 AM, Tejun Heo wrote:
> Hello, Lai.
>
> On Sun, Sep 09, 2012 at 01:12:53AM +0800, Lai Jiangshan wrote:
>> +/* does the manager need to be rebind after we just release gcwq->lock */
>> +static void maybe_rebind_manager(struct worker *manager)
>> +{
>> + struct
Hello, Lai.
On Sun, Sep 09, 2012 at 01:12:53AM +0800, Lai Jiangshan wrote:
> +/* does the manager need to be rebind after we just release gcwq->lock */
> +static void maybe_rebind_manager(struct worker *manager)
> +{
> + struct global_cwq *gcwq = manager->pool->gcwq;
> + bool assoc =
If hotplug code grabbed the manager_mutex and worker_thread try to create
a worker, the manage_worker() will return false and worker_thread go to
process work items. Now, on the CPU, all workers are processing work items,
no idle_worker left/ready for managing. It breaks the concept of workqueue
If hotplug code grabbed the manager_mutex and worker_thread try to create
a worker, the manage_worker() will return false and worker_thread go to
process work items. Now, on the CPU, all workers are processing work items,
no idle_worker left/ready for managing. It breaks the concept of workqueue
Hello, Lai.
On Sun, Sep 09, 2012 at 01:12:53AM +0800, Lai Jiangshan wrote:
+/* does the manager need to be rebind after we just release gcwq-lock */
+static void maybe_rebind_manager(struct worker *manager)
+{
+ struct global_cwq *gcwq = manager-pool-gcwq;
+ bool assoc = !(gcwq-flags
On Sun, Sep 9, 2012 at 1:40 AM, Tejun Heo t...@kernel.org wrote:
Hello, Lai.
On Sun, Sep 09, 2012 at 01:12:53AM +0800, Lai Jiangshan wrote:
+/* does the manager need to be rebind after we just release gcwq-lock */
+static void maybe_rebind_manager(struct worker *manager)
+{
+ struct
Hello,
On Sun, Sep 09, 2012 at 01:50:41AM +0800, Lai Jiangshan wrote:
+ if (worker_maybe_bind_and_lock(manager))
+ worker_clr_flags(manager, WORKER_UNBOUND);
+ }
+}
We can reuse busy_worker_rebind_fn(), right?
busy_worker_rebind_fn() releases the
On Sun, Sep 9, 2012 at 1:53 AM, Tejun Heo t...@kernel.org wrote:
Hello,
On Sun, Sep 09, 2012 at 01:50:41AM +0800, Lai Jiangshan wrote:
+ if (worker_maybe_bind_and_lock(manager))
+ worker_clr_flags(manager, WORKER_UNBOUND);
+ }
+}
We can reuse
On Sun, Sep 09, 2012 at 02:07:50AM +0800, Lai Jiangshan wrote:
when we release gcwq-lock and then grab it, we leave a hole that things
can be changed.
I don't want to open a hole. if the hole has bug we have to fix it.
if the hole has no bug, we have to add lot of comments to explain it.
On Sun, Sep 9, 2012 at 2:11 AM, Tejun Heo t...@kernel.org wrote:
On Sun, Sep 09, 2012 at 02:07:50AM +0800, Lai Jiangshan wrote:
when we release gcwq-lock and then grab it, we leave a hole that things
can be changed.
I don't want to open a hole. if the hole has bug we have to fix it.
if the
Hello, Lai.
On Sun, Sep 09, 2012 at 02:34:02AM +0800, Lai Jiangshan wrote:
in 3.6 busy_worker_rebind() handle WORKER_REBIND bit,
not WORKER_UNBOUND bit.
busy_worker_rebind() takes struct work_struct *work argument, we have to
add new patch to add a helper and restruct it at first.
What's
On Sun, Sep 9, 2012 at 3:02 AM, Tejun Heo t...@kernel.org wrote:
Hello, Lai.
On Sun, Sep 09, 2012 at 02:34:02AM +0800, Lai Jiangshan wrote:
in 3.6 busy_worker_rebind() handle WORKER_REBIND bit,
not WORKER_UNBOUND bit.
busy_worker_rebind() takes struct work_struct *work argument, we have to
20 matches
Mail list logo