| .. | .. |
|---|
| 807 | 807 | } |
|---|
| 808 | 808 | EXPORT_SYMBOL(fscache_object_destroy); |
|---|
| 809 | 809 | |
|---|
| 810 | | -static DECLARE_WAIT_QUEUE_HEAD(fscache_object_cong_wait); |
|---|
| 811 | | - |
|---|
| 812 | 810 | /* |
|---|
| 813 | 811 | * enqueue an object for metadata-type processing |
|---|
| 814 | 812 | */ |
|---|
| .. | .. |
|---|
| 817 | 815 | _enter("{OBJ%x}", object->debug_id); |
|---|
| 818 | 816 | |
|---|
| 819 | 817 | if (fscache_get_object(object, fscache_obj_get_queue) >= 0) { |
|---|
| 818 | + wait_queue_head_t *cong_wq = |
|---|
| 819 | + &get_cpu_var(fscache_object_cong_wait); |
|---|
| 820 | 820 | |
|---|
| 821 | 821 | if (queue_work(fscache_object_wq, &object->work)) { |
|---|
| 822 | 822 | if (fscache_object_congested()) |
|---|
| 823 | | - wake_up(&fscache_object_cong_wait); |
|---|
| 823 | + wake_up(cong_wq); |
|---|
| 824 | 824 | } else |
|---|
| 825 | 825 | fscache_put_object(object, fscache_obj_put_queue); |
|---|
| 826 | + |
|---|
| 827 | + put_cpu_var(fscache_object_cong_wait); |
|---|
| 826 | 828 | } |
|---|
| 827 | 829 | } |
|---|
| 828 | 830 | |
|---|
| .. | .. |
|---|
| 840 | 842 | */ |
|---|
| 841 | 843 | bool fscache_object_sleep_till_congested(signed long *timeoutp) |
|---|
| 842 | 844 | { |
|---|
| 845 | + wait_queue_head_t *cong_wq = this_cpu_ptr(&fscache_object_cong_wait); |
|---|
| 843 | 846 | DEFINE_WAIT(wait); |
|---|
| 844 | 847 | |
|---|
| 845 | 848 | if (fscache_object_congested()) |
|---|
| 846 | 849 | return true; |
|---|
| 847 | 850 | |
|---|
| 848 | | - add_wait_queue_exclusive(&fscache_object_cong_wait, &wait); |
|---|
| 851 | + add_wait_queue_exclusive(cong_wq, &wait); |
|---|
| 849 | 852 | if (!fscache_object_congested()) |
|---|
| 850 | 853 | *timeoutp = schedule_timeout(*timeoutp); |
|---|
| 851 | | - finish_wait(&fscache_object_cong_wait, &wait); |
|---|
| 854 | + finish_wait(cong_wq, &wait); |
|---|
| 852 | 855 | |
|---|
| 853 | 856 | return fscache_object_congested(); |
|---|
| 854 | 857 | } |
|---|