Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1422737AbWJNSCP (ORCPT ); Sat, 14 Oct 2006 14:02:15 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1422738AbWJNSCP (ORCPT ); Sat, 14 Oct 2006 14:02:15 -0400 Received: from mout0.freenet.de ([194.97.50.131]:54449 "EHLO mout0.freenet.de") by vger.kernel.org with ESMTP id S1422737AbWJNSCO (ORCPT ); Sat, 14 Oct 2006 14:02:14 -0400 Date: Sat, 14 Oct 2006 20:03:58 +0200 To: "linux-kernel@vger.kernel.org" Subject: [PATCH 2/2] 2.6.19-rc1-mm1 pktcdvd: bio write congestion Reply-To: balagi@justmail.de From: "Thomas Maier" Cc: "Peter Osterlund" , "akpm@osdl.org" Content-Type: multipart/mixed; boundary=----------vWBYDX4m2luayX5MsAo5jv MIME-Version: 1.0 Message-ID: User-Agent: Opera Mail/9.00 (Win32) Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 6421 Lines: 113 ------------vWBYDX4m2luayX5MsAo5jv Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: 7bit Hello, 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. Signed-off-by: Thomas Maier ------------vWBYDX4m2luayX5MsAo5jv Content-Disposition: attachment; filename=pktcdvd-2-wqueue-congestion.patch Content-Type: application/octet-stream; name=pktcdvd-2-wqueue-congestion.patch Content-Transfer-Encoding: Base64 ZGlmZiAtdXJwTiAxLWluaXQtcGt0ZGV2X21ham9yL2RyaXZlcnMvYmxvY2svcGt0 Y2R2ZC5jIDItd3F1ZXVlLWNvbmdlc3Rpb24vZHJpdmVycy9ibG9jay9wa3RjZHZk LmMKLS0tIDEtaW5pdC1wa3RkZXZfbWFqb3IvZHJpdmVycy9ibG9jay9wa3RjZHZk LmMJMjAwNi0xMC0xNCAxMzo1MDo1NC4wMDAwMDAwMDAgKzA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otLS0gMS1pbml0LXBrdGRldl9tYWpvci9pbmNsdWRlL2xp bnV4L3BrdGNkdmQuaAkyMDA2LTEwLTE0IDEzOjQ5OjUyLjAwMDAwMDAwMCArMDIw MAorKysgMi13cXVldWUtY29uZ2VzdGlvbi9pbmNsdWRlL2xpbnV4L3BrdGNkdmQu aAkyMDA2LTEwLTE0IDEzOjU4OjE2LjAwMDAwMDAwMCArMDIwMApAQCAtMTEyLDYg KzExMiwxMiBAQCBzdHJ1Y3QgcGt0X2N0cmxfY29tbWFuZCB7CiAjaW5jbHVkZSA8 bGludXgvY29tcGxldGlvbi5oPgogI2luY2x1ZGUgPGxpbnV4L2Nkcm9tLmg+CiAK KworLyogZGVmYXVsdCBiaW8gd3JpdGUgcXVldWUgY29uZ2VzdGlvbiBtYXJrcyAq LworI2RlZmluZSBQS1RfV1JJVEVfQ09OR0VTVElPTl9PTiAgICAxMDAwMAorI2Rl ZmluZSBQS1RfV1JJVEVfQ09OR0VTVElPTl9PRkYgICA5MDAwCisKKwogc3RydWN0 IHBhY2tldF9zZXR0aW5ncwogewogCV9fdTMyCQkJc2l6ZTsJCS8qIHBhY2tldCBz aXplIGluICg1MTIgYnl0ZSkgc2VjdG9ycyAqLwpAQCAtMjcxLDYgKzI3NywxMCBA QCBzdHJ1Y3QgcGt0Y2R2ZF9kZXZpY2UKIAogCXN0cnVjdCBwYWNrZXRfaW9zY2hl ZCAgIGlvc2NoZWQ7CiAJc3RydWN0IGdlbmRpc2sJCSpkaXNrOworCisJd2FpdF9x dWV1ZV9oZWFkX3QJd3JpdGVfY29uZ2VzdGlvbl93cXVldWU7CisJaW50CQkJd3Jp dGVfY29uZ2VzdGlvbl9vZmY7CisJaW50CQkJd3JpdGVfY29uZ2VzdGlvbl9vbjsK IH07CiAKICNlbmRpZiAvKiBfX0tFUk5FTF9fICovCg== ------------vWBYDX4m2luayX5MsAo5jv-- - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/