Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp2239310pxb; Mon, 19 Apr 2021 00:17:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxbC1wZaFR0PDrq0EB7JPURcyzAoBjJoQz3c/ZcL+cisOxygW5Szg6qKEtUgXx1RfVEkVPe X-Received: by 2002:a17:906:1d0e:: with SMTP id n14mr20727028ejh.97.1618816675581; Mon, 19 Apr 2021 00:17:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618816675; cv=none; d=google.com; s=arc-20160816; b=tddJzrIcJIxV2CNAAq83H0IiE7Nuc1ahsJBPPSeWYaopC2nItb3zOYmKGUjH0YEXnL 0zCgMYZpixcFFm7yvhXBIhEE/LUW16k3LLqR2OZx5JtuJY7k5/peyCyCTbGlqMhZxKCX NV2SpCCvPuRysFWKjwThavHjqqjtvCzETE5XHHCewvPC1nbr/n7Xt2UTZQSq1tL93vsI RZ2ZKLV2w4oObOKKt49MHNZ+nlZfciwEW06Rq34FWOHm+eVtAHPw59IJJ6lB4xLFPRcE +gmseyRmCh/LsN6TE48dQElYdzNEj2zL7vUPzZrgEp2Gcg1wYGkRdoQtVSOqRexMDBh0 4jhQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=NN0SIfMjTxjZbQRx0YAvjqNr/mU2jjCeZfOuWM1TKQg=; b=gJertCkwLEoxL5Ofjjw3lGqv4XT1r/PVQ+cbju7UPzpwZgHAzGg5zHNzVtvEpM4LN1 9VRHwleTJZ6Pv+h7eVwQdLYK1hW8eb0joGGjBXMmfGdh1lL4ftZZPdF+NjDmSOgMc3Vs 42P4Hlw3tf6k9scccdv2Rx67X9FO7ouF8rTd9a5j+FtfbAGfEWwZjXKklvwPks/3DK2s PYbhb8/u3wnLuv2no2izeG0HiW3q6ZcA6TrsHLIg4en9OwVy2R53IGMNpsRFZNIEloLZ CGeNF1lKnNQ5FpWQu11pqQjpLeBx5+Tk4nZBiAVOX5QBI8nreh8L8coAoV9QFGyUz+Nr nsZw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="eey/l+RH"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a23si10361354edy.94.2021.04.19.00.17.32; Mon, 19 Apr 2021 00:17:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="eey/l+RH"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237630AbhDSHQg (ORCPT + 99 others); Mon, 19 Apr 2021 03:16:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34674 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237628AbhDSHQe (ORCPT ); Mon, 19 Apr 2021 03:16:34 -0400 Received: from mail-ej1-x62c.google.com (mail-ej1-x62c.google.com [IPv6:2a00:1450:4864:20::62c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EC3C9C06174A for ; Mon, 19 Apr 2021 00:16:02 -0700 (PDT) Received: by mail-ej1-x62c.google.com with SMTP id v6so49969788ejo.6 for ; Mon, 19 Apr 2021 00:16:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=NN0SIfMjTxjZbQRx0YAvjqNr/mU2jjCeZfOuWM1TKQg=; b=eey/l+RHXKvQeN6pj97BCplXIBEybQcxN3b7FvQmF61jOBhQh1L3SEeQQ75h/2HdsS lvYIqu8K+q2WjsDlLAeK9Wnb1NF6cyeqhlkGq0FPAm8DlUPS+AQFo/NJsd07cj0Q3ZlL w8WQ5kpSsHEVNjJVZ5gBLqQKoIsyvcX+/cFN8KMQZ3Iv///hFKsd8BwPgREnubNCqPL5 Dv9i0qdko+0u1NPVIEUTdH9QkepmL8RujKMziiyLsXYQvB3kYOx688e/XZFtgAngxGsq QiydkHhZuGPAi067UJ3NLgK8UACRsB/vwxJjcJLrUCb9fFPP+3Jmcp+S2QopZl9iPKxG oZVQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=NN0SIfMjTxjZbQRx0YAvjqNr/mU2jjCeZfOuWM1TKQg=; b=ewVZM0+YkGfCShr1oLPeJujEa80XwZhu8UJL/wuQfFOJJLh6AjoD8bIpAFAK7/iKUX JxX5wS1oP5ID8Uc7aNLyMqeQ+MGaJwd5TR1i1RCcWtvNRXUFSfjWB7a0MUavAux564Gl V+ZHDEHya7abal4oYZsy30I4xncLQflrIR/FQ1d6Hdw3YOEvT7fvnCfURf6T7nEw7F4i /3uZWDroZOnsuErSpNqe3uDKcFIhTR4OZY9O2p+p3BEZZfsIbV9iQ9eohu0tgiz7em2z sSUDjMA+JfeMn+17j3PNMHjWWRxg8hyxt3y2l18/gL4jdVEjjb1CwDQEvXFc06Nv7RpY kZsg== X-Gm-Message-State: AOAM533G3kBSanIhM1AIuKvCDm0/mGMUpRq+uioRefCsVF1SbuUzLjCh 93FWqugSbfiz/bgakze9d/TSjA== X-Received: by 2002:a17:906:d109:: with SMTP id b9mr1894772ejz.548.1618816561662; Mon, 19 Apr 2021 00:16:01 -0700 (PDT) Received: from apalos.home (ppp-94-65-92-88.home.otenet.gr. [94.65.92.88]) by smtp.gmail.com with ESMTPSA id q10sm8586361eds.26.2021.04.19.00.16.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Apr 2021 00:16:01 -0700 (PDT) Date: Mon, 19 Apr 2021 10:15:58 +0300 From: Ilias Apalodimas To: Christoph Hellwig Cc: Matthew Wilcox , Jesper Dangaard Brouer , David Laight , "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" , Matteo Croce , Grygorii Strashko , Arnd Bergmann Subject: Re: [PATCH 1/1] mm: Fix struct page layout on 32-bit systems Message-ID: References: <20210411103318.GC2531743@casper.infradead.org> <20210412011532.GG2531743@casper.infradead.org> <20210414101044.19da09df@carbon> <20210414115052.GS2531743@casper.infradead.org> <20210414211322.3799afd4@carbon> <20210414213556.GY2531743@casper.infradead.org> <20210415200832.32796445@carbon> <20210416152755.GL2531743@casper.infradead.org> <20210419063441.GA18787@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210419063441.GA18787@lst.de> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Christoph, On Mon, Apr 19, 2021 at 08:34:41AM +0200, Christoph Hellwig wrote: > On Fri, Apr 16, 2021 at 04:27:55PM +0100, Matthew Wilcox wrote: > > On Thu, Apr 15, 2021 at 08:08:32PM +0200, Jesper Dangaard Brouer wrote: > > > See below patch. Where I swap32 the dma address to satisfy > > > page->compound having bit zero cleared. (It is the simplest fix I could > > > come up with). > > > > I think this is slightly simpler, and as a bonus code that assumes the > > old layout won't compile. > > So, why do we even do this crappy overlay of a dma address? This just > all seems like a giant hack. Random subsystems should not just steal > a few struct page fields as that just turns into the desasters like the > one we've seen here or probably something worse next time. The page pool API was using page->private in the past to store these kind of info. That caused a problem to begin with, since it would fail on 32-bit systems with 64bit DMA. We had a similar discussion on the past but decided struct page is the right place to store that [1]. Another advantage is that we can now use the information from the networking subsystem and enable recycling of SKBs and SKB fragments, by using the stored metadata of struct page [2]. [1] https://lore.kernel.org/netdev/20190207.132519.1698007650891404763.davem@davemloft.net/ [2] https://lore.kernel.org/netdev/20210409223801.104657-1-mcroce@linux.microsoft.com/ Cheers /Ilias