Metadata writeback cache support
(LU-10938)
|
|
| Status: | Open |
| Project: | Lustre |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Technical task | Priority: | Critical |
| Reporter: | Qian Yingjin | Assignee: | Qian Yingjin |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||
| Rank (Obsolete): | 9223372036854775807 | ||||||||
| Description |
|
On a client, WBC borrows the design and implementation from Linux/tmpfs a lot. Our implementation of Lustre WBC is called MemFS. WBC needs to add cache aging mechanism so that it will automatically start to flush dirty cache in the background when it gets old (normal VFS/VM dirty inode writeback), instead of the current code that doesn't do any writeback to the MDS until the DLM lock is cancelled, which might be minutes or hours later. Cache aging implementationThis can be implemented via super block VFS interface ->write_inode() in the background when it gets old. However, when flush a dirty directory triggered by the revocation of the WBC EX lock or ->write_inode() call, it needs to hold the WBC EX lock until push all its children directories or files to MDT, acquire the WBC EX lock back on the children directories, and then can we drop the parent WBC EX lock.
readdir()
How to bridge the two implementations is a challenge. To distinguish different states of a dentry and take different actions accordingly, several flags of an dentry are defined as follows:
Data assimilationWhen flushing the data of a regular file under the protection of WBC EX lock, it needs to write the dirty cached pages in MemFS into Lustre clio (called data assimilation phase). Before that, the metadata object has already created on MDT and the layout of the file is also instantiated and returned to the client. Here there are two methods to assimilate file data.
During data assimilation, it needs to ensure that new ongoing generic IO, which needs to switch from MemFS to Lustre clio engine (this should be solved in the JIRA ticket: LU-13010 reopen the files when EX WBC lock is cancelled), must be blocked in this phase until finished data assimilation. |
| Comments |
| Comment by Gerrit Updater [ 25/Dec/19 ] |
|
Yingjin Qian (qian@ddn.com) uploaded a new patch: https://review.whamcloud.com/37094 |
| Comment by Gerrit Updater [ 26/Dec/19 ] |
|
Yingjin Qian (qian@ddn.com) uploaded a new patch: https://review.whamcloud.com/37100 |