On 2012-08-22 00:43 Dan Williams <djbw@xxxxxx> Wrote: >On Mon, Aug 20, 2012 at 8:14 PM, Jianpeng Ma <majianpeng@xxxxxxxxx> wrote: >> On 2012-08-21 01:51 Dan Williams <djbw@xxxxxx> Wrote: >>>On Mon, Aug 20, 2012 at 1:17 AM, Jianpeng Ma <majianpeng@xxxxxxxxx> wrote: >>>> I think step4 maybe return ioerror.But it's success. >>> >>>You would need to check that stripe0 got recycled between step2 and >>>step3. If not then the uptodate stripe is in the cache and the read >>>can be serviced from the cached data. >>> >>>...which seems to be the case because of: >>> >>>> [19277.585936] locked=0 uptodate=4 to_read=0 to_write=0 failed=1 failed_num=3,-1 >>> >> >> Thanks! If stripe had a cache function.I think the chunk_aligned_read should use it for small read situation. > >But the stripe cache is not meant to be a read cache as it would be >duplicating what the page cache offers. Most aligned reads are likely >to miss the stripe cache so adding a lookup for every read would be >mostly wasted overhead. > I think most aligned reads are likely to missed the stripe cache because they did not use stripe-cache(when fristly reaed) For direct-io workload, there is no page-cache. FYI, most hardware raid-controlers have own memory and don't use host-memeory. The stripe-cache of raid456 is the same as raid-controller memeory.They also should provide the page-cache for read, rather only for write.?韬{.n?????%??檩??w?{.n???{炳盯w???塄}?财??j:+v??????2??璀??摺?囤??z夸z罐?+?????w棹f