[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250506124341.GDaBoD_cYkXsnTmRdj@fat_crate.local>
Date: Tue, 6 May 2025 14:43:41 +0200
From: Borislav Petkov <bp@...en8.de>
To: "Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>
Cc: akpm@...ux-foundation.org, vbabka@...e.cz, surenb@...gle.com,
mhocko@...e.com, jackmanb@...gle.com, hannes@...xchg.org,
tglx@...utronix.de, david@...hat.com, ast@...nel.org,
linux-mm@...ck.org, linux-coco@...ts.linux.dev,
linux-kernel@...r.kernel.org, stable@...r.kernel.org
Subject: Re: [PATCH 2/2] mm/page_alloc: Fix race condition in unaccepted
memory handling
On Tue, May 06, 2025 at 02:25:09PM +0300, Kirill A. Shutemov wrote:
> The page allocator tracks the number of zones that have unaccepted
> memory using static_branch_enc/dec() and uses that static branch in hot
> paths to determine if it needs to deal with unaccepted memory.
>
> Borisal and Thomas pointed out that the tracking is racy operations on
Boris or Borislav would be nice.
> static_branch are not serialized against adding/removing unaccepted pages
> to/from the zone.
Also, that sentence needs massaging.
> The effect of this static_branch optimization is only visible on
> microbenchmark.
>
> Instead of adding more complexity around it, remove it altogether.
Yah, good idea.
> Signed-off-by: Kirill A. Shutemov <kirill.shutemov@...ux.intel.com>
> Fixes: dcdfdd40fa82 ("mm: Add support for unaccepted memory")
> Link: https://lore.kernel.org/all/20250506092445.GBaBnVXXyvnazly6iF@fat_crate.local
> Reported-by: Borislav Petkov <bp@...en8.de>
Tested-by: Borislav Petkov (AMD) <bp@...en8.de>
Thx for the quick fix.
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette
Powered by blists - more mailing lists