Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Wed, 19 Dec 2001 08:12:19 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Wed, 19 Dec 2001 08:12:11 -0500 Received: from mx2.elte.hu ([157.181.151.9]:60823 "HELO mx2.elte.hu") by vger.kernel.org with SMTP id ; Wed, 19 Dec 2001 08:12:01 -0500 Date: Wed, 19 Dec 2001 16:09:05 +0100 (CET) From: Ingo Molnar Reply-To: To: , Cc: Jens Axboe , Linus Torvalds Subject: [patch] raid-2.5.1-I8 In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="8323328-1724977107-1008774488=:7629" Content-ID: Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. Send mail to mime@docserver.cac.washington.edu for more info. --8323328-1724977107-1008774488=:7629 Content-Type: TEXT/PLAIN; CHARSET=US-ASCII Content-ID: the -I7 RAID patch did not apply to 2.5.1 cleanly - the attached -I8 version does. Ingo -I7's Changelog: - cleaned up the resync engine. It got much simpler and easier to maintain, while still saturating the disks. Resync doesnt get stuck under heavy load anymore. (this code can be switched to use explicit IO barrier requests in the future.) - rewrote the read balancing code to use three estimators: a per-array 'next expected sequential IO' position, plus an IRQ-driven 'estimated disk head' position. The head position is now updated from all the IO completion routines: end of READ, end of WRITE, end of resync-READ, end of resync-WRITE. I've added per-disk tracking of pending requests, and the read balancer now detects idle disks and utilizes them before trying to read-balance between busy disks. I've also removed the sector_count limit that artificially switched the current disk. These changes make read balancing more accurate and more effective. - the old raid1 code used to have a limitation: it has always read from the first disk until the resync finished. Now the code will read-balance READ requests up to the resync boundary. This should further improve performance during resyncs. - added the 'idle IO resync' feature which we used to have in the 2.2 patches, but via a different implementation that does not touch the generic block IO code. Resync happens only when there is no normal IO pending on the array. This feature should make resync a more seemless operation. Resync behavior can be tuned via the speed_limit_min and speed_limit_max sysctl tunables. Default for the minimum resync speed is 500 KB/sec, the maximum is 200 MB/sec. - fixed a number of sector_t <=> unsigned long bugs still left. --8323328-1724977107-1008774488=:7629 Content-Type: TEXT/PLAIN; CHARSET=US-ASCII; NAME="raid-2.5.1-I8" Content-Transfer-Encoding: BASE64 Content-ID: Content-Description: Content-Disposition: ATTACHMENT; FILENAME="raid-2.5.1-I8" LS0tIGxpbnV4L2luY2x1ZGUvbGludXgvcmFpZC9yYWlkMS5oLm9yaWcJTW9u IERlYyAxNyAxNDoyMjozOCAyMDAxDQorKysgbGludXgvaW5jbHVkZS9saW51 eC9yYWlkL3JhaWQxLmgJV2VkIERlYyAxOSAxMzo1NjozMCAyMDAxDQpAQCAt OSw4ICs5LDggQEANCiAJaW50CQludW1iZXI7DQogCWludAkJcmFpZF9kaXNr Ow0KIAlrZGV2X3QJCWRldjsNCi0JaW50CQlzZWN0X2xpbWl0Ow0KLQlpbnQJ CWhlYWRfcG9zaXRpb247DQorCXNlY3Rvcl90CWhlYWRfcG9zaXRpb247DQor CWF0b21pY190CW5yX3BlbmRpbmc7DQogDQogCS8qDQogCSAqIFN0YXRlIGJp dHM6DQpAQCAtMzEsMjMgKzMxLDIxIEBADQogCWludAkJCXJhaWRfZGlza3M7 DQogCWludAkJCXdvcmtpbmdfZGlza3M7DQogCWludAkJCWxhc3RfdXNlZDsN Ci0Jc2VjdG9yX3QJCW5leHRfc2VjdDsNCi0JaW50CQkJc2VjdF9jb3VudDsN CisJc2VjdG9yX3QJCW5leHRfc2VxX3NlY3Q7DQogCW1ka190aHJlYWRfdAkJ KnRocmVhZCwgKnJlc3luY190aHJlYWQ7DQogCWludAkJCXJlc3luY19taXJy b3JzOw0KIAltaXJyb3JfaW5mb190CQkqc3BhcmU7DQogCXNwaW5sb2NrX3QJ CWRldmljZV9sb2NrOw0KIA0KIAkvKiBmb3IgdXNlIHdoZW4gc3luY2luZyBt aXJyb3JzOiAqLw0KLQl1bnNpZ25lZCBsb25nCXN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0gbWRkZXYtPnBlcnMtPnN5bmNfcmVxdWVzdChtZGRldiwgaik7DQorCQlz ZWN0b3JzID0gbWRkZXYtPnBlcnMtPnN5bmNfcmVxdWVzdChtZGRldiwgaiwg Y3VycnNwZWVkIDwgc3lzY3RsX3NwZWVkX2xpbWl0X21pbik7DQogCQlpZiAo c2VjdG9ycyA8IDApIHsNCiAJCQllcnIgPSBzZWN0b3JzOw0KIAkJCWdvdG8g b3V0Ow0K --8323328-1724977107-1008774488=:7629-- - 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/