Details
-
Bug
-
Resolution: Fixed
-
Minor
-
None
-
None
-
3
-
9223372036854775807
Description
@ra_cur_pages could be broken in few cases:
1 )in ll_ra_count_get() @ret might be negative, in that case, we should
add @pages_min, rather than @pages_min - @ret.
2) use atomic_add(pages_min - ret) could be racy, as @ra_cur_pages might have changed, we need atomic_cmpxchg() helper to do this job.
3) with Readahead disabled, @vpg_defer_uptodate should not be set as we don't reserve credits for such read. In vvp_page_completion_read() we will call ll_ra_count_put(), so this will make @ra_cur_pages negative.