[LU-247] Lustre client slow performance on BG/P IONs: unaligned DIRECT_IO Created: 28/Apr/11 Updated: 17/Mar/22 Resolved: 17/Mar/22 |
|
| Status: | Resolved |
| Project: | Lustre |
| Component/s: | None |
| Affects Version/s: | Lustre 2.0.0 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Minor |
| Reporter: | Niu Yawei (Inactive) | Assignee: | Niu Yawei (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||||||||||||||||||
| Severity: | 3 | ||||||||||||||||||||||||
| Bugzilla ID: | 18,801 | ||||||||||||||||||||||||
| Rank (Obsolete): | 9105 | ||||||||||||||||||||||||
| Description |
|
Port the fix of bug 18801 to 2.1 |
| Comments |
| Comment by Niu Yawei (Inactive) [ 04/May/11 ] |
|
I think there are two major components in this porting: 1. Make bufferred lockless io into direct lockless io. Current 2.0 code supports bufferred lockless io, we should make them into direct io, since:
2. Support unaligned direct io. To support unaligned direct io in 2.0, I think we'd better build io request based on user pages and file offset directly, Jay, Oleg |
| Comment by Jinshan Xiong (Inactive) [ 04/May/11 ] |
|
Hi Niu, Thanks for the points. Yes, this is a good chance for us to fix the directIO problem in one shot. I still tend to do this upon the infrastructure of clio. Also the reason to have a radix tree in clio is for porting purpose - we've done a lot of work to decouple linux vfs/vm in both MDT and client stack. Here is my idea: let's fix CPT_TRANSIENT page implementation to have arbitrary buffers for this kind of pages. However, this will not fit into cl_page cache any more which means stale data may be read if applications are doing regular IO and directIO on the same node. This may violate posix semantics a little bit, but I tend to think this is fine since linux kernel is doing the same thing. I'm going to compose a draft patch for this. It should be easy. |
| Comment by Jinshan Xiong (Inactive) [ 05/May/11 ] |
|
Hi Niu, I composed a patch to bypass cl_page cache for TRANSIENT pages at: http://review.whamcloud.com/#change,495, just for a reference. |
| Comment by Jinshan Xiong (Inactive) [ 05/May/11 ] |
|
I realize we should give it a try because this may be not a problem in clio. Clio has a finer grained lockless IO control, it can do lockless IO per ost object, instead of per file as b18. |
| Comment by Oleg Drokin [ 05/May/11 ] |
|
Frankly I am not even sure why do we need radix trees or anything like that for directio or otherwise uncached pages. Lai, your description of patchless io partial page write in clio where unlocked page is marked as clean sounds totally broken. |
| Comment by Peter Jones [ 17/Jun/11 ] |
|
I think that we will defer this task for now |
| Comment by Niu Yawei (Inactive) [ 20/Jun/11 ] |
|
Patch is at http://review.whamcloud.com/980 |
| Comment by Niu Yawei (Inactive) [ 28/Nov/11 ] |
|
The patch in http://review.whamcloud.com/980 uses obd_brw() API in osc_io_dio(), since it requires less code changes and easyer for landing, however, the best way to implement osc_io_dio() should be: introduce a new API which can naturally accept (file offset, bytes, offset in first page, incontiguous pages) and build io requests based on these information directly (brw_page should not be used for direct io, 'pshift' hacking should be eliminated), and osc_io_dio() calls the new API to build io reqeusts and sends them asynchronously. The proper implementaion requires more code changes, let's fix it in a follow-up patch. |
| Comment by Andreas Dilger [ 16/Sep/13 ] |
|
I don't like the idea of adding new users of the obd_brw() APIs. These are pretty much obsolete on both the client and server, and we should be removing them entirely instead of adding new users. |
| Comment by Cory Spitz [ 26/Sep/13 ] |
|
If we follow Niu's suggestion to land change #980 and then follow it up, can it land now, or must we wait until after we branch for b2_5? |
| Comment by Patrick Farrell [ 17/Mar/22 ] |
|
See LU-13805 |