Skip to content
Snippets Groups Projects
Commit eb7dee8c authored by Wang Di's avatar Wang Di
Browse files

Branch HEAD

b=14483
detect stride IO mode in read-ahead.
i=adilger,nikita
parent e1ce463b
No related branches found
No related tags found
No related merge requests found
......@@ -785,6 +785,11 @@ Details : Port llog reference couting and some llog cleanups from b1_6
(bug 10800) into HEAD, for protect from panic and access to already
free llog structures.
Severity : normal
Bugzilla : 14483
Description: Detect stride IO mode in read-ahead
Details : When a client does stride read, read-ahead should detect that and
read-ahead pages according to the detected stride pattern.
--------------------------------------------------------------------------------
......
......@@ -390,6 +390,27 @@ struct ll_readahead_state {
* protected by ->ras_lock.
*/
struct list_head ras_read_beads;
/*
* The following 3 items are used for detecting the stride I/O
* mode.
* In stride I/O mode,
* ...............|-----data-----|****gap*****|--------|******|....
* offset |-stride_pages-|-stride_gap-|
* ras_stride_offset = offset;
* ras_stride_length = stride_pages + stride_gap;
* ras_stride_pages = stride_pages;
* Note: all these three items are counted by pages.
*/
unsigned long ras_stride_length;
unsigned long ras_stride_pages;
pgoff_t ras_stride_offset;
/*
* number of consecutive stride request count, and it is similar as
* ras_consecutive_requests, but used for stride I/O mode.
* Note: only more than 2 consecutive stride request are detected,
* stride read-ahead will be enable
*/
unsigned long ras_consecutive_stride_requests;
};
struct ll_file_dir {
......
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment