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 X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 84F72C433ED for ; Mon, 12 Apr 2021 01:17:31 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1BBE361207 for ; Mon, 12 Apr 2021 01:17:31 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1BBE361207 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=sokqTCzhSESRpl1B+jJnlJ0p0q/DTcRQfwhVdBeDGsM=; b=RDmygKW3vmUSznA1fu0Xs6sTT 1GeoUg1E0ds2YUNXMh4FibME57Ae1/BUec6BhoYDsXWxdouH5ovJMM3N+IG081iInW5IuQh1Xrx/V d4EFvgDVusU2H3E/P6F+1yFgzEVz3SpWVTy+Fs8zCpX5ftpMxCrF/jzvGdoJ+ja07LF0Qm1lAyL3H GdlFzITHWl48+0xmRgTfMTDYVZ46RY/F1l6jowBlDT2e1lUE4Jh2LUNU693Ai2K6ED7GohgJzZaAd 5tW3Ex6q5mKUMjOjWTrT+NnBC9z+sHl9ShYSNKmYqRayTfE7YetgHfyttL4ut/uhW4mDTcmwVJR9D sYmCa+tCg==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lVlB7-005PoR-Fi; Mon, 12 Apr 2021 01:15:50 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lVlB4-005PoD-PE for linux-arm-kernel@desiato.infradead.org; Mon, 12 Apr 2021 01:15:46 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=T0Zq9EStO1wC7R34W+g3UOBErmBYCTh0458TpX7pzAM=; b=sJNR212kfJE88C8nTxg0l1UoXm Cbal0fqU992DQHm3N5P+Ml/9N9Nv8acJ4+M9c61cLDw5tVx1vo3l6fZZROGO3u3JvlmQVNt4MgFBF g/LmZnGbLw61COtglVjylsbOp2kznKGio6cRT0PAyvdOG++3HcY0Qj2N4YAZR7/Ongh3aFzuLqR8m XpLj86Ky06EguyRTY9VLPmpIBLI0SVSSf/qM7da3I6iIUxLPkRa6HQGofx88BF7zq2UCvMpdlkUh2 BFDTkwUVNukJv24on8dSKLRot4g8EsOusTp5QhTE7Rt9RCw1g68fuBAJPJZZ1YyczV5CDfiii3KiL qrpu7ngQ==; Received: from willy by casper.infradead.org with local (Exim 4.94 #2 (Red Hat Linux)) id 1lVlAq-003fOL-Tu; Mon, 12 Apr 2021 01:15:34 +0000 Date: Mon, 12 Apr 2021 02:15:32 +0100 From: Matthew Wilcox To: Jesper Dangaard Brouer Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, netdev@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-arm-kernel@lists.infradead.org, linux-mips@vger.kernel.org, Ilias Apalodimas , Matteo Croce , Ivan Khoronzhuk , Grygorii Strashko , Arnd Bergmann , Christoph Hellwig Subject: Re: [PATCH 1/1] mm: Fix struct page layout on 32-bit systems Message-ID: <20210412011532.GG2531743@casper.infradead.org> References: <20210410205246.507048-1-willy@infradead.org> <20210410205246.507048-2-willy@infradead.org> <20210411114307.5087f958@carbon> <20210411103318.GC2531743@casper.infradead.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210411103318.GC2531743@casper.infradead.org> X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Sun, Apr 11, 2021 at 11:33:18AM +0100, Matthew Wilcox wrote: > Basically, we have three aligned dwords here. We can either alias with > @flags and the first word of @lru, or the second word of @lru and @mapping, > or @index and @private. @flags is a non-starter. If we use @mapping, > then you have to set it to NULL before you free it, and I'm not sure > how easy that will be for you. If that's trivial, then we could use > the layout: > > unsigned long _pp_flags; > unsigned long pp_magic; > union { > dma_addr_t dma_addr; /* might be one or two words */ > unsigned long _pp_align[2]; > }; > unsigned long pp_pfmemalloc; > unsigned long xmi; I forgot about the munmap path. That calls zap_page_range() which calls set_page_dirty() which calls page_mapping(). If we use page->mapping, that's going to get interpreted as an address_space pointer. *sigh*. Foiled at every turn. I'm kind of inclined towards using two (or more) bits for PageSlab as we discussed here: https://lore.kernel.org/linux-mm/01000163efe179fe-d6270c58-eaba-482f-a6bd-334667250ef7-000000@email.amazonses.com/ so we have PageKAlloc that's true for PageSlab, PagePool, PageDMAPool, PageVMalloc, PageFrag and maybe a few other kernel-internal allocations. (see also here:) https://lore.kernel.org/linux-mm/20180518194519.3820-18-willy@infradead.org/ _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel