[PATCH] pktcdvd: bio write congestion using congestion_wait()

This adds a bio write queue congestion control to the pktcdvd driver with
fixed on/off marks.  It prevents that the driver consumes a unlimited
amount of write requests.

[akpm@osdl.org: sync with congestion_wait() renaming]
Signed-off-by: Thomas Maier <balagi@justmail.de>
Cc: Peter Osterlund <petero2@telia.com>
Cc: Jens Axboe <jens.axboe@oracle.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
Thomas Maier
2006-12-08 02:36:11 -08:00
committed by Linus Torvalds
parent 2d4eeec563
commit 0a0fc9601d
2 changed files with 41 additions and 0 deletions
+9
View File
@@ -112,6 +112,12 @@ struct pkt_ctrl_command {
#include <linux/completion.h>
#include <linux/cdrom.h>
/* default bio write queue congestion marks */
#define PKT_WRITE_CONGESTION_ON 10000
#define PKT_WRITE_CONGESTION_OFF 9000
struct packet_settings
{
__u32 size; /* packet size in (512 byte) sectors */
@@ -271,6 +277,9 @@ struct pktcdvd_device
struct packet_iosched iosched;
struct gendisk *disk;
int write_congestion_off;
int write_congestion_on;
};
#endif /* __KERNEL__ */