From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 76E1C2F0661; Tue, 12 Aug 2025 22:52:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755039153; cv=none; b=dFaudrFafl1wQgmpGfDv89FmmwjapiuG+fRtET02D+x9MEiZGQHg/slplTuoN8fQSrOfI/IX351g2KK4hcGYmRTgiJq80XQ8vzqFTvG32WzFd+FKzBJaZSdApcRm9oXyVhf4jFvQU8kggJ5lM/zOrmQwR9Hq4JW3egIPtrCSejs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755039153; c=relaxed/simple; bh=4QcopLUUVGIVRRCSZ4jv8Sl09V42iH0FB+VA3/a1kZI=; h=Date:From:To:Cc:Subject:Message-Id:In-Reply-To:References: Mime-Version:Content-Type; b=UMbJjJOw6feHKJGPiblFVbMUd80U79UIYm461AxmxQNrIX9MEnFsIu5gruIHsmOk84tbnuu/rlO+z3dt5GgvXUx/ET6Pvcu0ZOT6GwNOcnPcootQ+qXUW7I1E9JaflxGnxnVoMrhWEyUHeW8oJEqoPpkBcMSIbvHLWGbNQ5Sd1E= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b=a+VJflJa; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b="a+VJflJa" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 48B46C4CEF0; Tue, 12 Aug 2025 22:52:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1755039153; bh=4QcopLUUVGIVRRCSZ4jv8Sl09V42iH0FB+VA3/a1kZI=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=a+VJflJavF7yIMQioCGtFvNcvBDFfTx45hCKkTusYA2BdnqZ4kWT38UBmlbg+oIZ8 J7h9f7rapCJ5U4FK5B6scoDK/gC4UcmFx7+jCF9mS1b8IzhQgiAFmp5Exg01cPkPBS 9/DB97qAo9nryrBGFF/USiAc3gsuzO/6GNmoq6vM= Date: Tue, 12 Aug 2025 15:52:30 -0700 From: Andrew Morton To: Lorenzo Stoakes Cc: Alexander Gordeev , Gerald Schaefer , Heiko Carstens , Vasily Gorbik , Christian Borntraeger , Sven Schnelle , "David S . Miller" , Andreas Larsson , Dave Hansen , Andy Lutomirski , Peter Zijlstra , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H . Peter Anvin" , Alexander Viro , Christian Brauner , Jan Kara , Kees Cook , David Hildenbrand , Zi Yan , Baolin Wang , "Liam R . Howlett" , Nico Pache , Ryan Roberts , Dev Jain , Barry Song , Xu Xin , Chengming Zhou , Vlastimil Babka , Mike Rapoport , Suren Baghdasaryan , Michal Hocko , David Rientjes , Shakeel Butt , Arnaldo Carvalho de Melo , Namhyung Kim , Mark Rutland , Alexander Shishkin , Jiri Olsa , Ian Rogers , Adrian Hunter , Kan Liang , Masami Hiramatsu , Oleg Nesterov , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , Valentin Schneider , Jason Gunthorpe , John Hubbard , Peter Xu , Jann Horn , Pedro Falcato , Matthew Wilcox , Mateusz Guzik , linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org, sparclinux@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-trace-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org Subject: Re: [PATCH 02/10] mm: convert core mm to mm_flags_*() accessors Message-Id: <20250812155230.f955c6470db223bb371ac683@linux-foundation.org> In-Reply-To: <1eb2266f4408798a55bda00cb04545a3203aa572.1755012943.git.lorenzo.stoakes@oracle.com> References: <1eb2266f4408798a55bda00cb04545a3203aa572.1755012943.git.lorenzo.stoakes@oracle.com> X-Mailer: Sylpheed 3.8.0beta1 (GTK+ 2.24.33; x86_64-pc-linux-gnu) Precedence: bulk X-Mailing-List: linux-fsdevel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Tue, 12 Aug 2025 16:44:11 +0100 Lorenzo Stoakes wrote: > As part of the effort to move to mm->flags becoming a bitmap field, convert > existing users to making use of the mm_flags_*() accessors which will, when > the conversion is complete, be the only means of accessing mm_struct flags. > > This will result in the debug output being that of a bitmap output, which > will result in a minor change here, but since this is for debug only, this > should have no bearing. > > Otherwise, no functional changes intended. Code is obviously buggy - you cannot possibly have tested it. --- a/mm/khugepaged.c~mm-convert-core-mm-to-mm_flags_-accessors-fix +++ a/mm/khugepaged.c @@ -1459,7 +1459,7 @@ static void collect_mm_slot(struct khuge /* * Not strictly needed because the mm exited already. * - * mm_clear(mm, MMF_VM_HUGEPAGE); + * mm_flags_clear(MMF_VM_HUGEPAGE, mm); */ /* khugepaged_mm_lock actually not necessary for the below */ there, fixed. I applied the series to mm-new, thanks. Emails were suppressed out of kindness.