Good morning, On 12/15/2017 06:50 AM, guomingyang wrote: > Hi all: > > Today's disk is becoming larger and larger, and the recovery time > is becoming longer. I'm thinking about a lazy initialization mechanism > in linux raid5 to speed up recovery, which contains an un-initializing > bitmap and a backend thread for initializing stripes lazily only after a > stripe is write. The major difference is as follows: > > (1)When a raid4 or raid5 device is created, we don't recovery a > disk as usual, instead we just set all the bit in un-initialize bitmap. > > (2)When a write happens and the corresponding un-initializing bit > is set, we must first clean the bit, then wake up the backend thread to > resync the stripe, and only do RCW in corresponding stripe before the > resync is done. It is interesting, and opens further possibilities. I'm not sure a bitmap is the best data structure, but that's be an implementation detail. > The major advantage of this mechanism is that when a disk is > replaced, we can only recovery the stripes which have been initialized, > so as to speed up recovery. There's a time penalty added on any operation on the disk to determine whether the location is initialized or not. What should reads do when accessing uninitialized areas? > Does linux-raid have similar mechanism today? Or is there anyone > who has already working on similar mechanism? By itself I don't think its worth the effort. However, the accounting logic could also be used to support trim at the md layer, and the reduction in actual I/O (supply zeroes when reading uninitialized) might justify the performance impact of the logic. I haven't seen any action on anything like this, so I would assume you'd have to start with some patches. Regards, Phil -- To unsubscribe from this list: send the line "unsubscribe linux-raid" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html