[LU-12380] Allow reusing of write openhandle for reads Created: 04/Jun/19 Updated: 10/Jun/19 |
|
| Status: | Open |
| Project: | Lustre |
| Component/s: | None |
| Affects Version/s: | Lustre 2.13.0 |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Major |
| Reporter: | Oleg Drokin | Assignee: | WC Triage |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Rank (Obsolete): | 9223372036854775807 |
| Description |
|
Currently when openlock cahe is used we distinguish 3 kinds of opens: WRITE, READ and EXEC. the O_RDWR mode is counted as WRITE. READ mode is compatible with either EXEC or WRITE, but EXEC and WRITE are incompatible between themselves. Give that there's a relatively common workload of open file for write ; write into file ; close ; open file for read.; read ; close is typical - it's an interesting idea to combine WRITE and READ handles at least somewhat. In absence of EXEC mode they are pretty much the same (when obtained in WRITE ; READ order). Exec of course makes it somewhat tricky since as long as we hold the write lock, we cannot do open for exec. Possible idea to tackle this: Should we get a blocking ast on the CW lock (or perhaps even before? or as a lock/mode convert downgrade op (obviously it's a protocol change so more involved)?) - we would first send and acquire a read handle (and lock) and then release the CW lock and WRITE handle allowing us continuity in operations. |
| Comments |
| Comment by Gerrit Updater [ 04/Jun/19 ] |
|
Oleg Drokin (green@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/35054 |
| Comment by Oleg Drokin [ 10/Jun/19 ] |
|
I've noticed there's a fairly low hanging fruit for DoM possible wrt open locks. If we issue a PW DoM lock already and piggy back open bit on that - the above description works even better with less possible breakage. This is esp. nice in conjunction with LU-12325 where initial open only happens for PR lock but only if we have writes - we get a separate DoM PW lock only when we write to the file. We then can avoid the read open MDS roundtrip and get all reads fully locally under the same PW lock. Shows real nice results in testing. |
| Comment by Gerrit Updater [ 10/Jun/19 ] |
|
Oleg Drokin (green@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/35146 |
| Comment by Gerrit Updater [ 10/Jun/19 ] |
|
Oleg Drokin (green@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/35147 |