Commit 422583ee authored by Yang Shi's avatar Yang Shi Committed by Suren Baghdasaryan
Browse files

UPSTREAM: mm: huge_memory: don't force huge page alignment on 32 bit

commit efa7df3e ("mm: align larger anonymous mappings on THP
boundaries") caused two issues [1] [2] reported on 32 bit system or compat
userspace.

It doesn't make too much sense to force huge page alignment on 32 bit
system due to the constrained virtual address space.

[1] https://lore.kernel.org/linux-mm/d0a136a0-4a31-46bc-adf4-2db109a61672@kernel.org/
[2] https://lore.kernel.org/linux-mm/CAJuCfpHXLdQy1a2B6xN2d7quTYwg2OoZseYPZTRpU0eHHKD-sQ@mail.gmail.com/

Link: https://lkml.kernel.org/r/20240118180505.2914778-1-shy828301@gmail.com


Fixes: efa7df3e ("mm: align larger anonymous mappings on THP boundaries")
Signed-off-by: default avatarYang Shi <yang@os.amperecomputing.com>
Reported-by: default avatarJiri Slaby <jirislaby@kernel.org>
Reported-by: default avatarSuren Baghdasaryan <surenb@google.com>
Tested-by: default avatarJiri Slaby <jirislaby@kernel.org>
Tested-by: default avatarSuren Baghdasaryan <surenb@google.com>
Reviewed-by: default avatarMatthew Wilcox (Oracle) <willy@infradead.org>
Cc: Rik van Riel <riel@surriel.com>
Cc: Christopher Lameter <cl@linux.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>

(cherry picked from commit 4ef9ad19)

Bug: 254683164
Change-Id: Id56f3fb61ce24f5c155f73f4992d9e3bec5c3357
Signed-off-by: default avatarSuren Baghdasaryan <surenb@google.com>
parent afde2def
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment