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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 70289C6FA82 for ; Fri, 2 Sep 2022 23:28:35 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id B800E80144; Fri, 2 Sep 2022 19:28:34 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id B2E8D80120; Fri, 2 Sep 2022 19:28:34 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 9F6C980144; Fri, 2 Sep 2022 19:28:34 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id 8F94680120 for ; Fri, 2 Sep 2022 19:28:34 -0400 (EDT) Received: from smtpin15.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 54E28C0A31 for ; Fri, 2 Sep 2022 23:28:34 +0000 (UTC) X-FDA: 79868736948.15.A6007C5 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by imf31.hostedemail.com (Postfix) with ESMTP id 0760820057 for ; Fri, 2 Sep 2022 23:28:33 +0000 (UTC) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id AEA91B82E03; Fri, 2 Sep 2022 23:28:32 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3D287C433D7; Fri, 2 Sep 2022 23:28:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1662161311; bh=yJZahqcBMsYfWVHlynG0/2YxqjoMRZUVwblnjgyWB20=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=JX5Eqnul85kkHX6wFpLz7RDmZfwDouphkPIiD7F4xywgZQJJvn0srOCjfWAFon6QY GlxQyVrZr+YItFOS8buhBdqEivnz44lCy7yALxj/rdUAuxK/VZxvaVT50MGw8l8cpi K5h0qZcLM/kx0khoqz4xmaRGBYE17Rcs1WyskoV0= Date: Fri, 2 Sep 2022 16:28:30 -0700 From: Andrew Morton To: "Matthew Wilcox (Oracle)" Cc: linux-mm@kvack.org Subject: Re: [PATCH v2 02/57] mm: Add the first tail page to struct folio Message-Id: <20220902162830.dbf5291da3570017414544eb@linux-foundation.org> In-Reply-To: <20220902194653.1739778-3-willy@infradead.org> References: <20220902194653.1739778-1-willy@infradead.org> <20220902194653.1739778-3-willy@infradead.org> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.33; x86_64-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit ARC-Authentication-Results: i=1; imf31.hostedemail.com; dkim=pass header.d=linux-foundation.org header.s=korg header.b=JX5Eqnul; spf=pass (imf31.hostedemail.com: domain of akpm@linux-foundation.org designates 145.40.68.75 as permitted sender) smtp.mailfrom=akpm@linux-foundation.org; dmarc=none ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1662161314; a=rsa-sha256; cv=none; b=1t8LXG4iKHTUAkEzYcxIxFu791bCe5iVcZSj6Uxj4G9dVIvxwxoGmKbU4jpIW4cFtoXtmw rAXa0WiLZJBB6UaL0chF4Wllcvhgyzp+thVLdESoh1mNl0SkcMV7zcyQg+hmcjnxBgBh8M 8tTlvSonPoLXkPWGLMtTmyrG3YWObrQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1662161314; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=7k3Ry1zamVZ9NpGiu3c4GsLhQP+4cR64EcHK6gwGvHA=; b=HSG9anaNQLJT/iq82PRz6K1n36/PSq3otOnLJK/44oY5gow81qm3xcyPg/wS0EDDt+kJe/ EtBfRFs8nhHqXO8Q/5GxfxLDkSfLo2oOoaFkMslmGblcTY16XhkF2fWBiJ5uF+wbk8G26F pPNf7RWGPll43PCr7lY+VAVwhbTk07o= X-Stat-Signature: b66xwkggmrb7a39jx6y8uhcr4dkmmt5a X-Rspamd-Queue-Id: 0760820057 Authentication-Results: imf31.hostedemail.com; dkim=pass header.d=linux-foundation.org header.s=korg header.b=JX5Eqnul; spf=pass (imf31.hostedemail.com: domain of akpm@linux-foundation.org designates 145.40.68.75 as permitted sender) smtp.mailfrom=akpm@linux-foundation.org; dmarc=none X-Rspam-User: X-Rspamd-Server: rspam05 X-HE-Tag: 1662161313-409880 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 Fri, 2 Sep 2022 20:45:58 +0100 "Matthew Wilcox (Oracle)" wrote: > Some of the static checkers get confused by extracting the page from > the folio and referring to fields in the first tail page. Adding these > fields to struct folio lets us avoid doing that. It has the risk that > people will refer to those fields without checking that the folio is > actually a large folio, so prefix them with underscores and document > the preferred function to use instead. > Huh. Silly checkers. Which one(s)? > @@ -282,9 +289,17 @@ struct folio { > }; > struct page page; > }; > + unsigned long _flags_1; > + unsigned long __head; > + unsigned char _folio_dtor; > + unsigned char _folio_order; > + atomic_t _total_mapcount; > + atomic_t _pincount; > +#ifdef CONFIG_64BIT > + unsigned int _folio_nr_pages; > +#endif > }; Do we really want to muck things up like this? Can it at least be declared temporary until the checker(s?) are fixed?