psi: Move PF_MEMSTALL out of task->flags
[sfrench/cifs-2.6.git] / kernel / sched / psi.c
index 955a124bae817156fa06af439f776c1ef3af3024..8f45cdb6463b88d87ddac3af0150ff1730e18c9e 100644 (file)
@@ -865,17 +865,17 @@ void psi_memstall_enter(unsigned long *flags)
        if (static_branch_likely(&psi_disabled))
                return;
 
-       *flags = current->flags & PF_MEMSTALL;
+       *flags = current->in_memstall;
        if (*flags)
                return;
        /*
-        * PF_MEMSTALL setting & accounting needs to be atomic wrt
+        * in_memstall setting & accounting needs to be atomic wrt
         * changes to the task's scheduling state, otherwise we can
         * race with CPU migration.
         */
        rq = this_rq_lock_irq(&rf);
 
-       current->flags |= PF_MEMSTALL;
+       current->in_memstall = 1;
        psi_task_change(current, 0, TSK_MEMSTALL);
 
        rq_unlock_irq(rq, &rf);
@@ -898,13 +898,13 @@ void psi_memstall_leave(unsigned long *flags)
        if (*flags)
                return;
        /*
-        * PF_MEMSTALL clearing & accounting needs to be atomic wrt
+        * in_memstall clearing & accounting needs to be atomic wrt
         * changes to the task's scheduling state, otherwise we could
         * race with CPU migration.
         */
        rq = this_rq_lock_irq(&rf);
 
-       current->flags &= ~PF_MEMSTALL;
+       current->in_memstall = 0;
        psi_task_change(current, TSK_MEMSTALL, 0);
 
        rq_unlock_irq(rq, &rf);
@@ -970,7 +970,7 @@ void cgroup_move_task(struct task_struct *task, struct css_set *to)
        } else if (task->in_iowait)
                task_flags = TSK_IOWAIT;
 
-       if (task->flags & PF_MEMSTALL)
+       if (task->in_memstall)
                task_flags |= TSK_MEMSTALL;
 
        if (task_flags)