On Mon, Feb 19, 2024 at 07:25:38PM -0800, Andrew Morton wrote:
From: Byungchul Park byungchul@sk.com Subject: mm/vmscan: fix a bug calling wakeup_kswapd() with a wrong zone index Date: Fri, 16 Feb 2024 20:15:02 +0900
With numa balancing on, when a numa system is running where a numa node doesn't have its local memory so it has no managed zones, the following oops has been observed. It's because wakeup_kswapd() is called with a wrong zone index, -1. Fixed it by checking the index before calling wakeup_kswapd().
... ...
Link: https://lkml.kernel.org/r/20240216111502.79759-1-byungchul@sk.com Signed-off-by: Byungchul Park byungchul@sk.com Reported-by: Hyeongtak Ji hyeongtak.ji@sk.com Fixes: c574bbe917036 ("NUMA balancing: optimize page placement for memory tiering system") Cc: Baolin Wang baolin.wang@linux.alibaba.com Cc: "Huang, Ying" ying.huang@intel.com Cc: Johannes Weiner hannes@cmpxchg.org Cc: Oscar Salvador osalvador@suse.de Cc: stable@vger.kernel.org Signed-off-by: Andrew Morton akpm@linux-foundation.org
It's a shame that N_MEMORY can actually have no memory (e.g: memmap consuming all zone's memory), but here we are:
Reviewed-by: Oscar Salvador osalvador@suse.de