@@ -166,7 +166,7 @@ void fprop_fraction_single(struct fprop_global *p,
/*
* ---- PERCPU ----
*/
-#define PROP_BATCH (8*(1+ilog2(nr_cpu_ids)))
+#define PROP_BATCH (8*PAGE_SIZE*(1+ilog2(nr_cpu_ids)))
int fprop_local_init_percpu(struct fprop_local_percpu *pl, gfp_t gfp)
{
@@ -574,11 +574,11 @@ static unsigned long wp_next_time(unsigned long cur_time)
return cur_time;
}
-static void wb_domain_writeout_inc(struct wb_domain *dom,
+static void wb_domain_writeout_add(struct wb_domain *dom,
struct fprop_local_percpu *completions,
- unsigned int max_prop_frac)
+ long bytes, unsigned int max_prop_frac)
{
- __fprop_inc_percpu_max(&dom->completions, completions,
+ __fprop_add_percpu_max(&dom->completions, completions, bytes,
max_prop_frac);
/* First event after period switching was turned off? */
if (unlikely(!dom->period_time)) {
@@ -602,12 +602,12 @@ static inline void __wb_writeout_add(struct bdi_writeback *wb, long bytes)
struct wb_domain *cgdom;
__add_wb_stat(wb, WB_WRITTEN_BYTES, bytes);
- wb_domain_writeout_inc(&global_wb_domain, &wb->completions,
+ wb_domain_writeout_add(&global_wb_domain, &wb->completions, bytes,
wb->bdi->max_prop_frac);
cgdom = mem_cgroup_wb_domain(wb);
if (cgdom)
- wb_domain_writeout_inc(cgdom, wb_memcg_completions(wb),
+ wb_domain_writeout_add(cgdom, wb_memcg_completions(wb), bytes,
wb->bdi->max_prop_frac);
}