[LU-14616] ra_cur_pages broken readahead Created: 16/Apr/21  Updated: 27/Jul/21  Resolved: 05/May/21

Status: Resolved
Project: Lustre
Component/s: None
Affects Version/s: None
Fix Version/s: Lustre 2.15.0

Type: Bug Priority: Minor
Reporter: Wang Shilong (Inactive) Assignee: Wang Shilong (Inactive)
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Duplicate
Related
Severity: 3
Rank (Obsolete): 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.

 



 Comments   
Comment by Gerrit Updater [ 16/Apr/21 ]

Wang Shilong (wshilong@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/43337
Subject: LU-14616 readahead: fix race in ll_ra_count_get()
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 49c120ea5dac281081a2d46471beba23fea22f62

Comment by Gerrit Updater [ 16/Apr/21 ]

Wang Shilong (wshilong@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/43338
Subject: LU-14616 readahead: export pages directly without RA
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 0b5fc57fddea897255e7dfd32ab9a426dc9cf8ab

Comment by Wang Shilong (Inactive) [ 22/Apr/21 ]

Wang Shilong (wshilong@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/#/c/43377/

Subject: LU-14616 readahead: fix reserving for unaliged read

Project: fs/lustre-release
Branch: master
Current Patch Set: 1

Commit: 4fbaccde8344b00af6f26b7db915bfe136f7f766

Comment by Gerrit Updater [ 05/May/21 ]

Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/43338/
Subject: LU-14616 readahead: export pages directly without RA
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 9f1c0bfd10d619a3755c3b22b1dd95a593720ce9

Comment by Gerrit Updater [ 05/May/21 ]

Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/43377/
Subject: LU-14616 readahead: fix reserving for unaliged read
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 5e7e9240d27a4b74127ea7a26d910ae41a6e1cb1

Comment by Peter Jones [ 05/May/21 ]

Landed for 2.15

Generated at Sat Feb 10 03:11:17 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.