
A tool and driver are added to control the thp policy per-process. Currently, only supports PMD size THP control. In the future, more functions can be supported based on this tool and driver. Nanyong Sun (2): mm: add thp process control interface module mm: tool: add task_thpctl to control thp per process include/uapi/linux/thp_ctl.h | 19 +++++ kernel/fork.c | 1 + mm/Kconfig | 7 ++ mm/Makefile | 1 + mm/thp_ctl.c | 157 ++++++++++++++++++++++++++++++++++ tools/mm/Makefile | 4 +- tools/mm/task_thpctl.c | 161 +++++++++++++++++++++++++++++++++++ 7 files changed, 348 insertions(+), 2 deletions(-) create mode 100644 include/uapi/linux/thp_ctl.h create mode 100644 mm/thp_ctl.c create mode 100644 tools/mm/task_thpctl.c -- 2.25.1