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 D4B64C433EF for ; Wed, 6 Oct 2021 15:29:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B4D7761027 for ; Wed, 6 Oct 2021 15:29:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239051AbhJFPbC (ORCPT ); Wed, 6 Oct 2021 11:31:02 -0400 Received: from zeniv-ca.linux.org.uk ([142.44.231.140]:52744 "EHLO zeniv-ca.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231671AbhJFPbB (ORCPT ); Wed, 6 Oct 2021 11:31:01 -0400 Received: from viro by zeniv-ca.linux.org.uk with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1mY8kX-00AWIy-GM; Wed, 06 Oct 2021 15:22:29 +0000 Date: Wed, 6 Oct 2021 15:22:29 +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: Sender: Al Viro Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org 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?