This series introduces three patches related to the kernel parameters
controlling mTHP. The first patch is a straightforward documentation update,
correcting the format of the kernel parameter ``thp_anon=``.
The second and third patches focus on controlling THP support for shmem
via the kernel command line. The second patch introduces a parameter to
control the global default huge page allocation policy for the internal
shmem mount. The third patch implements a parameter similar to ``thp_anon=``,
but for shmem.
The goal of these changes is to simplify the configuration of systems that
rely on mTHP support for shmem. For instance, a platform with a GPU that
benefits from huge pages may want to enable huge pages for shmem. Having
these kernel parameters streamlines the configuration process and ensures
consistency across setups.
Regarding the third patch, I’m open to suggestions on how to reduce code
duplication between ``thp_anon=`` and ``thp_shmem=``. While I duplicated
the ``get_order_from_str()`` function, I realize this isn’t ideal and
would appreciate advice on where best to place the function.
Let me know your thoughts.
[1] https://lore.kernel.org/linux-mm/20240820105244.62703-1-21cnbao@gmail.com/
Best Regards,
- Maíra
Maíra Canal (3):
mm: fix the format of the kernel parameter ``thp_anon=``
mm: shmem: control THP support through the kernel command line
mm: shmem: override mTHP shmem default with a kernel parameter
.../admin-guide/kernel-parameters.txt | 19 ++-
Documentation/admin-guide/mm/transhuge.rst | 25 ++-
mm/shmem.c | 147 +++++++++++++++++-
3 files changed, 186 insertions(+), 5 deletions(-)
--
2.46.2