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

Branch: b1_6

b=14483
detect stride IO mode in read-ahead.
i=adilger, nikita
parent 3f210257
No related branches found
No related tags found
No related merge requests found
...@@ -407,6 +407,12 @@ Details : client gets evicted from server. Now client also thinks it is ...@@ -407,6 +407,12 @@ Details : client gets evicted from server. Now client also thinks it is
gets a reply that the export is new, and so no recovery should be gets a reply that the export is new, and so no recovery should be
performed. performed.
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.
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
2007-12-07 Cluster File Systems, Inc. <info@clusterfs.com> 2007-12-07 Cluster File Systems, Inc. <info@clusterfs.com>
......
...@@ -359,6 +359,27 @@ struct ll_readahead_state { ...@@ -359,6 +359,27 @@ struct ll_readahead_state {
* protected by ->ras_lock. * protected by ->ras_lock.
*/ */
struct list_head ras_read_beads; 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;
}; };
extern cfs_mem_cache_t *ll_file_data_slab; extern cfs_mem_cache_t *ll_file_data_slab;
......
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