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 C58DA285053; Wed, 13 Aug 2025 16:24:47 +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=1755102287; cv=none; b=BT2zSSBRmMuHJk0IYcx55iT99Sanfzg788ljfC+vtTq+OTMyolekrwfMgjCv3N+TzxuBi97AjlBuRrZb7R0qsTjrXR6+x9Shk2h3m1/ByFXgWe913y7XGgCX9vGc+ClAkhLCnJxHyPd7Sy5RERAL+bct9CWoGDePjx9ouxxfMIg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755102287; c=relaxed/simple; bh=K1Qnz6FeiAMe891bHx38SnseQkGtn7jJpOFA1e7ci+8=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=TtNIV5327wJHOdlMm1X42tiRJtmpG9VZcmdBhq5G1HocIebBSMha/Qk75hKuaedodYuOgHTxel+F5pO6OVrVYYVkmKmsl3J3rIWdgxAHG+btFJKt5ysW57qqKk34WVjjCoXwjTn1wkwtrKyEGeKe4Ng8ft57CLpuLHItjLaqaJk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=NowuzJLv; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="NowuzJLv" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 09AF3C4CEEB; Wed, 13 Aug 2025 16:24:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1755102287; bh=K1Qnz6FeiAMe891bHx38SnseQkGtn7jJpOFA1e7ci+8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=NowuzJLvoDcytU2mnlkUjH9a3VkVMtm7ue/1JeEievbLShowGrZYKS4ljQgIc4Tvt 3+vYZnNOWzD9UQ8pSH9fEmYwxPiiGspKJ3H0P32SvVzl8AqitUBhqFYwGCZ45kSKAJ 87/gu7vuZjna5FtZYWWUpp9S1G/8o7Ty64t0lObmjPlPr2MXYLPDtH4Sc4eAU6xND8 ThhzDQ4hSAh1VB48U+GqBbKfJNoQAGi7b1yhwF4mFVAalvl713Ll6uzzSrl8gdzvsB qxd/OanAUdPmrliRUlwzqp8QiFiC+SAvfzE7ZdQVKX6a28IsBlnq34Yk6UcqsLFVxB 8m4KWJEM4NWXw== From: SeongJae Park To: Lorenzo Stoakes Cc: SeongJae Park , 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 00/10] mm: make mm->flags a bitmap and 64-bit on all arches Date: Wed, 13 Aug 2025 09:24:45 -0700 Message-Id: <20250813162445.5456-1-sj@kernel.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: References: Precedence: bulk X-Mailing-List: sparclinux@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit On Wed, 13 Aug 2025 05:18:31 +0100 Lorenzo Stoakes wrote: > On Tue, Aug 12, 2025 at 01:13:26PM -0700, SeongJae Park wrote: > > On Tue, 12 Aug 2025 16:44:09 +0100 Lorenzo Stoakes wrote: [...] > > > In order to execute this change, we introduce a new opaque type - > > > mm_flags_t - which wraps a bitmap. > > > > I have no strong opinion here, but I think coding-style.rst[1] has one? To > > quote, > > > > Please don't use things like ``vps_t``. > > It's a **mistake** to use typedef for structures and pointers. > > You stopped reading the relevant section in [1] :) Keep going and you see: > > Lots of people think that typedefs help readability. Not so. They > are useful only for: totally opaque objects (where the typedef is > actively used to hide what the object is). Example: pte_t > etc. opaque objects that you can only access using the proper > accessor functions. > > So this is what this is. > > The point is that it's opaque, that is you aren't supposed to know about or > care about what's inside, you use the accessors. > > This means we can extend the size of this thing as we like, and can enforce > atomicity through the accessors. > > We further highlight the opaqueness through the use of the __private. > > > > > checkpatch.pl also complains similarly. > > > > Again, I have no strong opinion, but I think adding a clarification about why > > we use typedef despite of the documented recommendation here might be nice? > > I already gave one, I clearly indicate it's opaque. You're completely right and I agree all the points. Thank you for kindly enlightening me :) Thanks, SJ [...]