Merge tag 'm68k-for-v4.20-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git...
[sfrench/cifs-2.6.git] / include / linux / sched.h
index 004ca21f7e80f43a348c109b52349339c4f0bcfd..8f8a5418b627a2db2377add2da367796e572cd2d 100644 (file)
@@ -25,6 +25,7 @@
 #include <linux/latencytop.h>
 #include <linux/sched/prio.h>
 #include <linux/signal_types.h>
+#include <linux/psi_types.h>
 #include <linux/mm_types_task.h>
 #include <linux/task_io_accounting.h>
 #include <linux/rseq.h>
@@ -706,6 +707,10 @@ struct task_struct {
        unsigned                        sched_contributes_to_load:1;
        unsigned                        sched_migrated:1;
        unsigned                        sched_remote_wakeup:1;
+#ifdef CONFIG_PSI
+       unsigned                        sched_psi_wake_requeue:1;
+#endif
+
        /* Force alignment to the next boundary: */
        unsigned                        :0;
 
@@ -719,9 +724,6 @@ struct task_struct {
 #endif
 #ifdef CONFIG_MEMCG
        unsigned                        in_user_fault:1;
-#ifdef CONFIG_MEMCG_KMEM
-       unsigned                        memcg_kmem_skip_account:1;
-#endif
 #endif
 #ifdef CONFIG_COMPAT_BRK
        unsigned                        brk_randomized:1;
@@ -735,6 +737,12 @@ struct task_struct {
        unsigned                        use_memdelay:1;
 #endif
 
+       /*
+        * May usercopy functions fault on kernel addresses?
+        * This is not just a single bit because this can potentially nest.
+        */
+       unsigned int                    kernel_uaccess_faults_ok;
+
        unsigned long                   atomic_flags; /* Flags requiring atomic access. */
 
        struct restart_block            restart_block;
@@ -956,9 +964,13 @@ struct task_struct {
 
        /* Ptrace state: */
        unsigned long                   ptrace_message;
-       siginfo_t                       *last_siginfo;
+       kernel_siginfo_t                *last_siginfo;
 
        struct task_io_accounting       ioac;
+#ifdef CONFIG_PSI
+       /* Pressure stall state */
+       unsigned int                    psi_flags;
+#endif
 #ifdef CONFIG_TASK_XACCT
        /* Accumulated RSS usage: */
        u64                             acct_rss_mem1;
@@ -1385,6 +1397,7 @@ extern struct pid *cad_pid;
 #define PF_KTHREAD             0x00200000      /* I am a kernel thread */
 #define PF_RANDOMIZE           0x00400000      /* Randomize virtual address space */
 #define PF_SWAPWRITE           0x00800000      /* Allowed to write to swap */
+#define PF_MEMSTALL            0x01000000      /* Stalled due to lack of memory */
 #define PF_NO_SETAFFINITY      0x04000000      /* Userland is not allowed to meddle with cpus_allowed */
 #define PF_MCE_EARLY           0x08000000      /* Early kill for mce process policy */
 #define PF_MUTEX_TESTER                0x20000000      /* Thread belongs to the rt mutex tester */