From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D6330C433F5 for ; Wed, 6 Oct 2021 15:48:38 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 6407561166 for ; Wed, 6 Oct 2021 15:48:38 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 6407561166 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=zeniv.linux.org.uk Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id EFC566B0071; Wed, 6 Oct 2021 11:48:37 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id EAB2E6B0073; Wed, 6 Oct 2021 11:48:37 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id DC25D900002; Wed, 6 Oct 2021 11:48:37 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0176.hostedemail.com [216.40.44.176]) by kanga.kvack.org (Postfix) with ESMTP id CFC346B0071 for ; Wed, 6 Oct 2021 11:48:37 -0400 (EDT) Received: from smtpin31.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 8C55B82499A8 for ; Wed, 6 Oct 2021 15:48:37 +0000 (UTC) X-FDA: 78666445074.31.B9D1223 Received: from zeniv-ca.linux.org.uk (zeniv-ca.linux.org.uk [142.44.231.140]) by imf04.hostedemail.com (Postfix) with ESMTP id 47A455001988 for ; Wed, 6 Oct 2021 15:48:37 +0000 (UTC) Received: from viro by zeniv-ca.linux.org.uk with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1mY99o-00AWbb-GU; Wed, 06 Oct 2021 15:48:36 +0000 Date: Wed, 6 Oct 2021 15:48:36 +0000 From: Al Viro To: Matthew Wilcox Cc: linux-mm@kvack.org, David Hildenbrand , Kent Overstreet , Johannes Weiner , linux-fsdevel@vger.kernel.org Subject: Re: [RFC] pgflags_t Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: 47A455001988 X-Stat-Signature: 87s5hydftdh5fqex6y7ewozahkkyfb83 Authentication-Results: imf04.hostedemail.com; dkim=none; dmarc=none; spf=none (imf04.hostedemail.com: domain of viro@ftp.linux.org.uk has no SPF policy when checking 142.44.231.140) smtp.mailfrom=viro@ftp.linux.org.uk X-HE-Tag: 1633535317-19077 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Wed, Oct 06, 2021 at 04:38:49PM +0100, Matthew Wilcox wrote: > On Wed, Oct 06, 2021 at 03:22:29PM +0000, Al Viro wrote: > > On Wed, Oct 06, 2021 at 03:58:14PM +0100, Matthew Wilcox wrote: > > > David expressed some unease about the lack of typesafety in patches > > > 1 & 2 of the page->slab conversion [1], and I'll admit to not being > > > particularly a fan of passing around an unsigned long. That crystallised > > > in a discussion with Kent [2] about how to lock a page when you don't know > > > its type (solution: every memory descriptor type starts with a > > > pgflags_t) > > > > Why bother making it a struct? What's wrong with __bitwise and letting > > sparse catch conversions? > > People don't run sparse. I happen to have a built allmodconfig tree > here and running make C=2 fs/ gives 1147 lines of warnings. Why would > adding more warnings help? First of all, they are easy to grep for (they'll mention pgflags_t in warning message). What's more, we ought to reduce the amount of noise, rather than giving up on the tool and going for contortions like that...