[LU-12587] DIO fallback to Buffer IO unexpectedly Created: 25/Jul/19  Updated: 21/Oct/22

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

Type: Bug Priority: Minor
Reporter: Wang Shilong (Inactive) Assignee: Patrick Farrell
Resolution: Unresolved Votes: 0
Labels: always_except

Issue Links:
Related
is related to LU-14541 Memory reclaim caused a stale data read Resolved
is related to LU-15815 fast_read/stale data/reclaim workroun... Resolved
Severity: 3
Rank (Obsolete): 9223372036854775807

 Description   

It is possible that DirectIO might fallback to Buffer IO in some cases, but following
DIO fallback to Buffer IO very easily:

dd if=/dev/zero of=data bs=1M count=1
dd iff=/dev/zero of=data bs=1M count=1 oflag=direct conv=notrunc



 Comments   
Comment by Gerrit Updater [ 25/Jul/19 ]

Wang Shilong (wshilong@ddn.com) uploaded a new patch: https://review.whamcloud.com/35610
Subject: LU-12587 llite: don't check vmpage refcount in ll_releasepage()
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: eeb3f3884e0db092742daf88fc54422e207e5270

Comment by Gerrit Updater [ 09/Aug/19 ]

Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/35610/
Subject: LU-12587 llite: don't check vmpage refcount in ll_releasepage()
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: e59f0c9a245f91ad929fd31dcbcbee88bf7a11df

Comment by Peter Jones [ 09/Aug/19 ]

Landed for 2.13

Comment by Patrick Farrell [ 09/May/22 ]

This change introduced LU-14541.  The original check here is a bit off, so fixing this is not just a revert, but mostly.  See https://review.whamcloud.com/47262

We will have to see if there's another way to handle this issue.  It might be possible to do the flushing here (see https://review.whamcloud.com/35610/ ) inside Lustre rather than relying on the kernel to do it.

eg, if we flushed pages before generic_file_direct_write:

->generic_file_direct_write()
->filemap_write_and_wait_range()
->invalidate_inode_pages2_range()
->invalidate_complete_page2() If a page can not be invalidated, return 0 to fall back to buffered write.
->try_to_release_page()
->ll_releasepage() return 0 becuase of vmpage count is 4 > 3
->generic_file_buffered_write

It may just be that Lustre can't release pages in the desired manner...  This will require some more investigation.

Comment by Andreas Dilger [ 21/Oct/22 ]

sanity test_277 is being skipped on master because of LU-14541, but it should really be referencing this ticket.

Generated at Sat Feb 10 02:53:54 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.