Re: [PATCH] pktcdvd: added sysfs interface + bio write queue handling fix

Thomas Maier
2006-09-09T17:55:40Z

Hello,

> Thomas Maier wrote:
>> Hello
>>
>> (3th try with fixed inline patch)
>>
>> This is a patch for the packet writing driver pktcdvd.
>> It adds a sysfs interface to the driver and a bio write
>> queue "congestion" handling.
>>
>
> Why does pktcdvd need to handle congestion?

> Doesn't it get blocked when
> trying to send down bios to the underlying device if it's queue is
> congested?

Yes, that is right.

But the pktcdvd driver has an internal queue for *incoming* bio write request
(over own make_request function), and this queue size was unlimited!
Since the underlying (DVD writer in my case) can not process as much
write packets as fast as new bio write requests are passed to the driver,
the bio write queue size increases and increases and increases ;)
Esp if you are write huge files. In my case, i wrote about 2G on data
(using rsync for backup purpose) onto DVDRAM, with some huge files
(about 300 MB). The bio write queue size raised over 200000 and more
and at the end, the kernel said: ups, no more memory available, i
let something fail.

-Thomas Maier