History

workqueue: reuse the already calculated pwq in try_to_grab_pending()

try_to_grab_pending() was re-calculating the associated pwq using get_work_pwq() when it already has it cached in a local varible and the association can't change. Reuse the local variable instead. This doesn't introduce any functional changes. tj: Updated description.

Lai Jiangshan committed 12 years ago

Commit 9c34a701 parent 85327af1 file · +1 −1Browse files

Showing the changes to kernel/workqueue.c (1 of 1 file). Show all

Unified · Split

kernel/workqueue.c+1−1
@@ -1225,7 +1225,7 @@ static int try_to_grab_pending(struct work_struct *work, bool is_dwork, · 1224 unmodified lines
12251225 pwq_activate_delayed_work(work);
12261226
12271227 list_del_init(&work->entry);
1228− pwq_dec_nr_in_flight(get_work_pwq(work), get_work_color(work));
1228+ pwq_dec_nr_in_flight(pwq, get_work_color(work));
12291229
12301230 /* work->data points to pwq iff queued, point to pool */
12311231 set_work_pool_and_keep_pending(work, pool->id);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t