Re: [PATCH] pktdvd: stop using bdi congestion framework.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> -		set_bdi_congested(bio->bi_bdev->bd_disk->bdi, BLK_RW_ASYNC);
> -		do {
> -			spin_unlock(&pd->lock);
> -			congestion_wait(BLK_RW_ASYNC, HZ);
> -			spin_lock(&pd->lock);
> -		} while(pd->bio_queue_size > pd->write_congestion_off);
> +		___wait_var_event(&pd->congested,
> +				  pd->bio_queue_size <= pd->write_congestion_off,
> +				  TASK_UNINTERRUPTIBLE, 0, 0,
> +				  ({pd->congested = true;
> +				    spin_unlock(&pd->lock);
> +				    schedule();
> +				    spin_lock(&pd->lock);
> +				  })

I'd be tempted to open code the ___wait_var_event here as this is pretty
unreadable.  But otherwise this change looks good to me:

Reviewed-by: Christoph Hellwig <hch@xxxxxx>



[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux