diff options
Diffstat (limited to 'fs/proc/array.c')
-rw-r--r-- | fs/proc/array.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/fs/proc/array.c b/fs/proc/array.c index 0ceb3b6b37e7..9d428d5a0ac8 100644 --- a/fs/proc/array.c +++ b/fs/proc/array.c | |||
@@ -392,6 +392,15 @@ static inline void task_core_dumping(struct seq_file *m, struct mm_struct *mm) | |||
392 | seq_putc(m, '\n'); | 392 | seq_putc(m, '\n'); |
393 | } | 393 | } |
394 | 394 | ||
395 | static inline void task_thp_status(struct seq_file *m, struct mm_struct *mm) | ||
396 | { | ||
397 | bool thp_enabled = IS_ENABLED(CONFIG_TRANSPARENT_HUGEPAGE); | ||
398 | |||
399 | if (thp_enabled) | ||
400 | thp_enabled = !test_bit(MMF_DISABLE_THP, &mm->flags); | ||
401 | seq_printf(m, "THP_enabled:\t%d\n", thp_enabled); | ||
402 | } | ||
403 | |||
395 | int proc_pid_status(struct seq_file *m, struct pid_namespace *ns, | 404 | int proc_pid_status(struct seq_file *m, struct pid_namespace *ns, |
396 | struct pid *pid, struct task_struct *task) | 405 | struct pid *pid, struct task_struct *task) |
397 | { | 406 | { |
@@ -406,6 +415,7 @@ int proc_pid_status(struct seq_file *m, struct pid_namespace *ns, | |||
406 | if (mm) { | 415 | if (mm) { |
407 | task_mem(m, mm); | 416 | task_mem(m, mm); |
408 | task_core_dumping(m, mm); | 417 | task_core_dumping(m, mm); |
418 | task_thp_status(m, mm); | ||
409 | mmput(mm); | 419 | mmput(mm); |
410 | } | 420 | } |
411 | task_sig(m, task); | 421 | task_sig(m, task); |