- 论坛徽章:
- 0
|
752 static wait_queue_head_t congestion_wqh[2] = {
753 __WAIT_QUEUE_HEAD_INITIALIZER(congestion_wqh[0]),
754 __WAIT_QUEUE_HEAD_INITIALIZER(congestion_wqh[1])
755 };
我的疑问是,所有块设备在处理拥塞时,都使用这2个等待队列吗?
757 void clear_bdi_congested(struct backing_dev_info *bdi, int sync)
758 {
759 enum bdi_state bit;
760 wait_queue_head_t *wqh = &congestion_wqh[sync];
761
762 bit = sync ? BDI_sync_congested : BDI_async_congested;
763 clear_bit(bit, &bdi->state);
764 smp_mb__after_clear_bit();
765 if (waitqueue_active(wqh))
766 wake_up(wqh);
767 }
如果所有块设备仅使用这2个等待队列,某个块设备请求队列不再拥塞时,唤醒在等待队列上的进程,这个函数岂不是唤醒了在其他块设备拥塞等待的进程?
|
|