[LU-17433] async hybrid writes Created: 16/Jan/24  Updated: 16/Jan/24

Status: Open
Project: Lustre
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Minor
Reporter: Patrick Farrell Assignee: Patrick Farrell
Resolution: Unresolved Votes: 0
Labels: None

Issue Links:
Related
is related to LU-13802 New i/o path: Buffered i/o as DIO Open
is related to LU-13805 i/o path: Unaligned direct i/o Open
Severity: 3
Rank (Obsolete): 9223372036854775807

 Description   

This is a ticket to capture a few thoughts and a patch which implements a small part of what's required here, because it was on my mind.  This will come after hybrid IO and is not to be done soon, but there should still be a place to track it.

Notes:

So for unaligned writes, it can be async.

1. Basically, this will act like AIO.  You'll have to do the cleanup after the fact.
So it will change the reference counting for these.
2. You'll need to use dlmlocks - otherwise the async IO isn't safe.
This will have to be integrated carefully with hybrid - depending on when the choice is made, etc.
3. You'll need to do the locking - both the range lock and the dlmlocks will need to be held and destroyed only when the last IO cleans up.
Range locks are required to protect against write re-ordering from this client.  This is an issue with AIO but AIO gets special rules.

So to summarize:

  • Only applies to switched hybrid IO, since it violates the sync expectation from DIO
  • Need to record dlmlocks
  • Need range lock
  • Need to change reference counting so it works like AIO (have to sort out precisely what that means)
  • Need to clean up dlmlocks and range lock as IO completes
  • Probably makes sense to associate dlmlocks with sub DIO - each SDIO will use a single dlmlock and we can have it release the dlmlock when it's complete
  • Range lock will be released by the top level DIO


 Comments   
Comment by Gerrit Updater [ 16/Jan/24 ]

"Patrick Farrell <pfarrell@whamcloud.com>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/53688
Subject: LU-17433 llite: move dio range locking to DIO
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 6a3e2292ded7838a2b3dd7db8878eb6a78d7960d

Comment by Gerrit Updater [ 16/Jan/24 ]

"Patrick Farrell <pfarrell@whamcloud.com>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/53689
Subject: LU-17433 clio: add and put ref on dlmlock for sdio
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: ef0bc8267cad26626339687d2c57831e3da75ddc

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