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,URIBL_BLOCKED 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 BCE2BC43460 for ; Mon, 19 Apr 2021 07:18:09 +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 3D88C61073 for ; Mon, 19 Apr 2021 07:18:09 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3D88C61073 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.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=HHatdXHq1gjA4rrIKOxCL/5KbaY0BynghIXHKDu37pg=; b=dSfZ/1MUZKWNlLJ8RFyjrf5OT K+AN1HVejPbYjw0EdKWLiA8olr2GrXsK8tt7g6PCn0Jz6a8FiCLCBNK5rh5AhbvKptP4RMX+AEHfh eviAxhJI64dYJkLMvAGkyozGU+WHVSH3wWVjcInCP5fy9TXgbvH24pWU97r3WUNVgGWfC7pjNKcSp PCJ5qvoPEC5Tx0qmqkN3wNVfnuEb7YLZAUB16LlwHa3bzsvFEAy61Lw3an9culzUdnU6W9LV6XjEp Bawj4QnbHS1arfFXNvFVwkvYmVNoynoQ9PXBdYWEhbz6uBiGe8YsikdUOdghSa3YBwjz8eW8UmyYf jJrab5wIw==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lYO8g-009JEK-5d; Mon, 19 Apr 2021 07:16:10 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lYO8e-009JE2-HL for linux-arm-kernel@desiato.infradead.org; Mon, 19 Apr 2021 07:16:08 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; 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=NN0SIfMjTxjZbQRx0YAvjqNr/mU2jjCeZfOuWM1TKQg=; b=Np2DnwVGf8erSG3YAS6BEgbec6 2FUOCsk7fPDgQ0AwCuq9uTqoawq3K1ag56hkgC+FAgip7U7DS0WovT3KA01yVrBDTjfxBQnMjxsik i8nG/Cjr6eRmJjnc1IIBfZHnK4mve6gC7xPynOfFQJONzV12qLoONbpvlHVMSPe+SSe78O1qV6zsm TR/NPqjfbIBfbTsw71BiiGJliK5RuQR1TbVQ8e0RmgKJLTu8UIEc/ItqFHCS1zfPRHGMKePYL/9eq ZJFQXbt3bXxwzXpK5Yz0Cu5gG0ffSlIeHH1lzYcimcIqSn5dnoaFkZoajg+kWea7dw2jgJ4YuyJu0 BRkZOV6A==; Received: from mail-ej1-x62b.google.com ([2a00:1450:4864:20::62b]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lYO8Z-00B7Bq-A6 for linux-arm-kernel@lists.infradead.org; Mon, 19 Apr 2021 07:16:07 +0000 Received: by mail-ej1-x62b.google.com with SMTP id l4so51228622ejc.10 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=XmrChv6jHM192OBXvyXMTIYBRSAdOfdIX8XYFsAJmutjkfsxg/vsGzG8fyJYMurXY8 mpGc930/tswrye4qsnMQnm21y7mu+atkY3EYZvpQ2UaYQWhr85+9Aw+KGmrfPORs7HGF EMFxKUHFYo6ShZcDOQwIWIWOrt6TTeQdrbVoM+JXTGJg0W9KW+CMGHKIl2jH+MB4LvI1 +lukh3hdWgCpSBeR2YJ8lwa2+YwWcGA0wAzc5ctqyhG6nRC1XSMdABIKgR1FMV4iJDNw LZ5CQphMq7kOTujh9l4m+T1yMdcX1CBqil3Rs8CYOuw/mjyes2KdNnFQvGaOsZ/IISe+ YDRA== X-Gm-Message-State: AOAM532bxIQtpz8Bs3nx+AaE3MDbVVff/TRt4Dtu4/w7j7vlPg/m6UcS fToDOcppFbtmh6Ckx9weBp/Tc70KDA7Lsdds X-Google-Smtp-Source: ABdhPJzED7HcLyGFPWdG5U4GtxJ9nU13WoMu/wsaNmOE8Ia2aHE+xQgk+fFtK5iYslBsmLLlnWZE0A== 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-Disposition: inline In-Reply-To: <20210419063441.GA18787@lst.de> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210419_001603_451191_BD6B7DF4 X-CRM114-Status: GOOD ( 21.36 ) 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 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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel