Alan Cox wrote: > On Llu, 2006-05-15 at 23:25 +0900, Tejun Heo wrote: >> I was too quick to response. ering keeps track of timestamps of each >> error and the criteria for speeding down is something like "3 class 1 >> errors during last 15mins", so bitmaps doesn't cut it. > > Sounds like it does > > > log_class_1_error(dev) > { > if((dev->class1 & 3) < 3) { > dev->class1++; > dev->class1sum++; > } else { > /* 3 this minute alone */ > it_happened_now_case(); > } > } > > class_1_each_minute(dev) > { > dev->class1sum -= (dev->class1 >> 30); > dev->class1 <<= 2; > } > Yeap, of course, it does with periodic shifting. The 3 in this minute testing looks neat. I don't know. I'm still a bit hesitant because the thing becomes a little bit more complex (it has more moving parts) and it would be difficult to define/tune speed down or any other error handling (say, turning off NCQ) criteria. But, I might be planning too much. -- tejun - : send the line "unsubscribe linux-ide" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html