Merge tag 'stackleak-v4.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git...
[muen/linux.git] / include / linux / sched.h
index ae9d10e..a51c13c 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>
@@ -571,12 +572,8 @@ union rcu_special {
        struct {
                u8                      blocked;
                u8                      need_qs;
-               u8                      exp_need_qs;
-
-               /* Otherwise the compiler can store garbage here: */
-               u8                      pad;
        } b; /* Bits. */
-       u32 s; /* Set of bits. */
+       u16 s; /* Set of bits. */
 };
 
 enum perf_event_task_context {
@@ -710,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;
 
@@ -723,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;
@@ -739,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;
@@ -960,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;
@@ -1394,6 +1402,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 */