@@ -1324,6 +1324,9 @@ struct task_struct {
/* Start of a write-and-pause period: */
unsigned long dirty_paused_when;
+ unsigned long bdp_pause;
+ int bdp_nr_dirtied_pause;
+
#ifdef CONFIG_LATENCYTOP
int latency_record_count;
struct latency_record latency_record[LT_SAVECOUNT];
@@ -2246,6 +2246,7 @@ static __latent_entropy struct task_struct *copy_process(
p->nr_dirtied = 0;
p->nr_dirtied_pause = 128 >> (PAGE_SHIFT - 10);
p->dirty_paused_when = 0;
+ p->bdp_nr_dirtied_pause = -1;
p->pdeath_signal = 0;
INIT_LIST_HEAD(&p->thread_group);
Add two new fields to the task_struct to support async write throttling. - One field to store how long writes are throttled: bdp_pause - The other field to store the number of dirtied pages: bdp_nr_dirtied_pause Signed-off-by: Stefan Roesch <shr@fb.com> --- include/linux/sched.h | 3 +++ kernel/fork.c | 1 + 2 files changed, 4 insertions(+)