|
@@ -127,6 +127,7 @@ struct wb_domain global_wb_domain;
|
|
/* consolidated parameters for balance_dirty_pages() and its subroutines */
|
|
/* consolidated parameters for balance_dirty_pages() and its subroutines */
|
|
struct dirty_throttle_control {
|
|
struct dirty_throttle_control {
|
|
struct bdi_writeback *wb;
|
|
struct bdi_writeback *wb;
|
|
|
|
+ struct fprop_local_percpu *wb_completions;
|
|
|
|
|
|
unsigned long dirty; /* file_dirty + write + nfs */
|
|
unsigned long dirty; /* file_dirty + write + nfs */
|
|
unsigned long thresh; /* dirty threshold */
|
|
unsigned long thresh; /* dirty threshold */
|
|
@@ -139,7 +140,8 @@ struct dirty_throttle_control {
|
|
unsigned long pos_ratio;
|
|
unsigned long pos_ratio;
|
|
};
|
|
};
|
|
|
|
|
|
-#define GDTC_INIT(__wb) .wb = (__wb)
|
|
|
|
|
|
+#define GDTC_INIT(__wb) .wb = (__wb), \
|
|
|
|
+ .wb_completions = &(__wb)->completions
|
|
|
|
|
|
/*
|
|
/*
|
|
* Length of period for aging writeout fractions of bdis. This is an
|
|
* Length of period for aging writeout fractions of bdis. This is an
|
|
@@ -590,7 +592,7 @@ static unsigned long __wb_calc_thresh(struct dirty_throttle_control *dtc)
|
|
/*
|
|
/*
|
|
* Calculate this BDI's share of the thresh ratio.
|
|
* Calculate this BDI's share of the thresh ratio.
|
|
*/
|
|
*/
|
|
- fprop_fraction_percpu(&dom->completions, &dtc->wb->completions,
|
|
|
|
|
|
+ fprop_fraction_percpu(&dom->completions, dtc->wb_completions,
|
|
&numerator, &denominator);
|
|
&numerator, &denominator);
|
|
|
|
|
|
wb_thresh = (thresh * (100 - bdi_min_ratio)) / 100;
|
|
wb_thresh = (thresh * (100 - bdi_min_ratio)) / 100;
|