lkml.org 
[lkml]   [2012]   [Aug]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
SubjectRe: [RFC v3 4/7] workqueue: use new hashtable implementation
From
Date
On Tue, 2012-08-07 at 02:45 +0200, Sasha Levin wrote:
> From: Sasha Levin <sasha.levin@oracle.com>
>
> Switch workqueues to use the new hashtable implementation. This reduces the amount of
> generic unrelated code in the workqueues.

Just style trivia:

> diff --git a/kernel/workqueue.c b/kernel/workqueue.c
[]
> @@ -897,8 +839,15 @@ static struct worker *__find_worker_executing_work(struct global_cwq *gcwq,
> static struct worker *find_worker_executing_work(struct global_cwq *gcwq,
> struct work_struct *work)
> {
> - return __find_worker_executing_work(gcwq, busy_worker_head(gcwq, work),
> - work);
> + struct worker *worker;
> + struct hlist_node *tmp;
> +
> + hash_for_each_possible(gcwq->busy_hash, worker, BUSY_WORKER_HASH_ORDER,
> + tmp, hentry, work)
> + if (worker->current_work == work)
> + return worker;

braces please:

hash_for_each_possible(gcwq->busy_hash, worker, BUSY_WORKER_HASH_ORDER,
tmp, hentry, work) {
if (worker->current_work == work)
return worker;
}

[]

@@ -1916,7 +1865,7 @@ static void cwq_dec_nr_in_flight(struct cpu_workqueue_struct *cwq, int color,
> * @worker: self
> * @work: work to process
> *
> - * Process @work. This function contains all the logics necessary to
> + * Process @work. This? function contains all the logics necessary to

Odd ? and the grammar also seems odd.

> * process a single work including synchronization against and
> * interaction with other workers on the same cpu, queueing and
> * flushing. As long as context requirement is met, any worker can




\
 
 \ /
  Last update: 2012-08-07 04:01    [W:0.062 / U:0.052 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site