Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 365544
b: refs/heads/master
c: e3c916a
h: refs/heads/master
v: v3
  • Loading branch information
Tejun Heo committed Apr 1, 2013
1 parent f714cc3 commit 01f86a3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: bce903809ab3f29eca97e0be5537778c1689c82b
refs/heads/master: e3c916a4c7f51722785d34d9f9802b70dac3ce93
15 changes: 8 additions & 7 deletions trunk/kernel/workqueue.c
Original file line number Diff line number Diff line change
Expand Up @@ -1644,9 +1644,10 @@ static struct worker *alloc_worker(void)
*/
static struct worker *create_worker(struct worker_pool *pool)
{
const char *pri = pool->attrs->nice < 0 ? "H" : "";
struct worker *worker = NULL;
int node = pool->cpu >= 0 ? cpu_to_node(pool->cpu) : NUMA_NO_NODE;
int id = -1;
char id_buf[16];

lockdep_assert_held(&pool->manager_mutex);

Expand All @@ -1672,13 +1673,13 @@ static struct worker *create_worker(struct worker_pool *pool)
worker->id = id;

if (pool->cpu >= 0)
worker->task = kthread_create_on_node(worker_thread,
worker, cpu_to_node(pool->cpu),
"kworker/%d:%d%s", pool->cpu, id, pri);
snprintf(id_buf, sizeof(id_buf), "%d:%d%s", pool->cpu, id,
pool->attrs->nice < 0 ? "H" : "");
else
worker->task = kthread_create(worker_thread, worker,
"kworker/u%d:%d%s",
pool->id, id, pri);
snprintf(id_buf, sizeof(id_buf), "u%d:%d", pool->id, id);

worker->task = kthread_create_on_node(worker_thread, worker, node,
"kworker/%s", id_buf);
if (IS_ERR(worker->task))
goto fail;

Expand Down

0 comments on commit 01f86a3

Please sign in to comment.