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=-6.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,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 E7A87C43461 for ; Sat, 17 Apr 2021 17:30:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C6F50613B4 for ; Sat, 17 Apr 2021 17:30:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236882AbhDQRbD (ORCPT ); Sat, 17 Apr 2021 13:31:03 -0400 Received: from mail.kernel.org ([198.145.29.99]:37124 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236595AbhDQRbC (ORCPT ); Sat, 17 Apr 2021 13:31:02 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id DFF69613C7; Sat, 17 Apr 2021 17:30:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1618680635; bh=ugaFr7ubcYoZlftrOW8+is8PkeVPg/pgdCmBuE+ol64=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=pokeBsO6dVRMBkqi8/yu+5t2S6RsKZsuEFRWuOmUllxciYCV/hKsZJPlPIFAn+dFS Lhbp0UYxa+8GNR0jx5rxoIRI19RblhevJhFutJTxtVnnBXTDHcOBAJ9YrYRvhz/ZIQ L0jcpMc04X7RUawJc+GPJ09O1vUXNSxv8aJIKKiK0DnoePGq/How3WpglmniU4DxaZ aM3UgZ/ri2h3v7xS4jm9thXDeLzXtS9YuOOLqr9ghK8DfiZ0bXj/XZNQjjHq4NjZNU iM2DFOrqUDZJrOTKy/CU0rm/zjTn1+nt9fX5AHG1CX2cZw6XqnfgnhxJ9sHCr3nBMG 5Yn65E7dZ6PvA== Received: by mail-wm1-f43.google.com with SMTP id f195-20020a1c1fcc0000b029012eb88126d7so5842261wmf.3; Sat, 17 Apr 2021 10:30:35 -0700 (PDT) X-Gm-Message-State: AOAM532WacjqG1W1CR/OTHLlVHiB9SXyxDIDcXQQ4u9Jj1l5Fn56ekUb inVDMbtPWYl46i5ow8+z+wW7B96M3y3j+fc97oA= X-Google-Smtp-Source: ABdhPJx5c7/qiwMYT0ir136uPjUzW1fYOXrUhmuWfobdjxZ7ZRW1mvPQs0zb5XctbTVKp2LKwzYcR2xXWnxiB9rv6sM= X-Received: by 2002:a7b:c14a:: with SMTP id z10mr13072983wmi.75.1618680634529; Sat, 17 Apr 2021 10:30:34 -0700 (PDT) MIME-Version: 1.0 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> <20210417135642.GR2531743@casper.infradead.org> In-Reply-To: <20210417135642.GR2531743@casper.infradead.org> From: Arnd Bergmann Date: Sat, 17 Apr 2021 19:30:21 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 1/1] mm: Fix struct page layout on 32-bit systems To: Matthew Wilcox Cc: Jesper Dangaard Brouer , Grygorii Strashko , "netdev@vger.kernel.org" , Ilias Apalodimas , "linux-kernel@vger.kernel.org" , "linux-mips@vger.kernel.org" , "linux-mm@kvack.org" , David Laight , Matteo Croce , "linuxppc-dev@lists.ozlabs.org" , Christoph Hellwig , "linux-arm-kernel@lists.infradead.org" Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Apr 17, 2021 at 3:58 PM Matthew Wilcox wrote: > I wouldn't like to make that assumption. I've come across IOMMUs (maybe > on parisc? powerpc?) that like to encode fun information in the top > few bits. So we could get it down to 52 bits, but I don't think we can > get all the way down to 32 bits. Also, we need to keep the bottom bit > clear for PageTail, so that further constrains us. I'd be surprised to find such an IOMMU on a 32-bit machine, given that the main reason for using an IOMMU on these is to avoid the 32-bit address limit in DMA masters. I see that parisc32 does not enable 64-bit dma_addr_t, while powerpc32 does not support any IOMMU, so it wouldn't be either of those two. I do remember some powerpc systems that encode additional flags (transaction ordering, caching, ...) into the high bits of the physical address in the IOTLB, but not the virtual address used for looking them up. > Anyway, I like the "two unsigned longs" approach I posted yesterday, > but thanks for the suggestion. Ok, fair enough. As long as there are enough bits in this branch of 'struct page', I suppose it is the safe choice. Arnd 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=-6.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,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 21ED0C43460 for ; Sat, 17 Apr 2021 17:30:40 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 941E761248 for ; Sat, 17 Apr 2021 17:30:39 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 941E761248 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 2109D6B006C; Sat, 17 Apr 2021 13:30:39 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 1E7C16B006E; Sat, 17 Apr 2021 13:30:39 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 063626B0070; Sat, 17 Apr 2021 13:30:39 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0076.hostedemail.com [216.40.44.76]) by kanga.kvack.org (Postfix) with ESMTP id DED546B006C for ; Sat, 17 Apr 2021 13:30:38 -0400 (EDT) Received: from smtpin40.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id A4F7345D8 for ; Sat, 17 Apr 2021 17:30:38 +0000 (UTC) X-FDA: 78042548556.40.BB377DF Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf11.hostedemail.com (Postfix) with ESMTP id 0B0E6200026C for ; Sat, 17 Apr 2021 17:30:26 +0000 (UTC) Received: by mail.kernel.org (Postfix) with ESMTPSA id DE02E613C5 for ; Sat, 17 Apr 2021 17:30:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1618680635; bh=ugaFr7ubcYoZlftrOW8+is8PkeVPg/pgdCmBuE+ol64=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=pokeBsO6dVRMBkqi8/yu+5t2S6RsKZsuEFRWuOmUllxciYCV/hKsZJPlPIFAn+dFS Lhbp0UYxa+8GNR0jx5rxoIRI19RblhevJhFutJTxtVnnBXTDHcOBAJ9YrYRvhz/ZIQ L0jcpMc04X7RUawJc+GPJ09O1vUXNSxv8aJIKKiK0DnoePGq/How3WpglmniU4DxaZ aM3UgZ/ri2h3v7xS4jm9thXDeLzXtS9YuOOLqr9ghK8DfiZ0bXj/XZNQjjHq4NjZNU iM2DFOrqUDZJrOTKy/CU0rm/zjTn1+nt9fX5AHG1CX2cZw6XqnfgnhxJ9sHCr3nBMG 5Yn65E7dZ6PvA== Received: by mail-wm1-f49.google.com with SMTP id n4-20020a05600c4f84b029013151278decso4609485wmq.4 for ; Sat, 17 Apr 2021 10:30:35 -0700 (PDT) X-Gm-Message-State: AOAM530e842D63xsTy45J/+7Sh8gCYP6bc335X5cbleWGNsmg34Mbxiw ZQ1bsadZXs18JVBqELSYs9nxh64YRJ7flYo6M/U= X-Google-Smtp-Source: ABdhPJx5c7/qiwMYT0ir136uPjUzW1fYOXrUhmuWfobdjxZ7ZRW1mvPQs0zb5XctbTVKp2LKwzYcR2xXWnxiB9rv6sM= X-Received: by 2002:a7b:c14a:: with SMTP id z10mr13072983wmi.75.1618680634529; Sat, 17 Apr 2021 10:30:34 -0700 (PDT) MIME-Version: 1.0 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> <20210417135642.GR2531743@casper.infradead.org> In-Reply-To: <20210417135642.GR2531743@casper.infradead.org> From: Arnd Bergmann Date: Sat, 17 Apr 2021 19:30:21 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 1/1] mm: Fix struct page layout on 32-bit systems To: Matthew Wilcox Cc: Jesper Dangaard Brouer , Grygorii Strashko , "netdev@vger.kernel.org" , Ilias Apalodimas , "linux-kernel@vger.kernel.org" , "linux-mips@vger.kernel.org" , "linux-mm@kvack.org" , David Laight , Matteo Croce , "linuxppc-dev@lists.ozlabs.org" , Christoph Hellwig , "linux-arm-kernel@lists.infradead.org" Content-Type: text/plain; charset="UTF-8" X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: 0B0E6200026C X-Stat-Signature: 55ea9hi3rf5119c4h3njjk4dagk8kkgi Received-SPF: none (kernel.org>: No applicable sender policy available) receiver=imf11; identity=mailfrom; envelope-from=""; helo=mail.kernel.org; client-ip=198.145.29.99 X-HE-DKIM-Result: pass/pass X-HE-Tag: 1618680626-347842 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 Sat, Apr 17, 2021 at 3:58 PM Matthew Wilcox wrote: > I wouldn't like to make that assumption. I've come across IOMMUs (maybe > on parisc? powerpc?) that like to encode fun information in the top > few bits. So we could get it down to 52 bits, but I don't think we can > get all the way down to 32 bits. Also, we need to keep the bottom bit > clear for PageTail, so that further constrains us. I'd be surprised to find such an IOMMU on a 32-bit machine, given that the main reason for using an IOMMU on these is to avoid the 32-bit address limit in DMA masters. I see that parisc32 does not enable 64-bit dma_addr_t, while powerpc32 does not support any IOMMU, so it wouldn't be either of those two. I do remember some powerpc systems that encode additional flags (transaction ordering, caching, ...) into the high bits of the physical address in the IOTLB, but not the virtual address used for looking them up. > Anyway, I like the "two unsigned longs" approach I posted yesterday, > but thanks for the suggestion. Ok, fair enough. As long as there are enough bits in this branch of 'struct page', I suppose it is the safe choice. Arnd 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,DKIM_INVALID, DKIM_SIGNED,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 6674BC433ED for ; Sat, 17 Apr 2021 17:31:07 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (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 7AF5E6109F for ; Sat, 17 Apr 2021 17:31:06 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7AF5E6109F Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4FN0VJ5xcKz30Hp for ; Sun, 18 Apr 2021 03:31:04 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=pokeBsO6; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=kernel.org (client-ip=198.145.29.99; helo=mail.kernel.org; envelope-from=arnd@kernel.org; receiver=) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=pokeBsO6; dkim-atps=neutral Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4FN0Tp6jNGz301F for ; Sun, 18 Apr 2021 03:30:38 +1000 (AEST) Received: by mail.kernel.org (Postfix) with ESMTPSA id D56226128B for ; Sat, 17 Apr 2021 17:30:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1618680635; bh=ugaFr7ubcYoZlftrOW8+is8PkeVPg/pgdCmBuE+ol64=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=pokeBsO6dVRMBkqi8/yu+5t2S6RsKZsuEFRWuOmUllxciYCV/hKsZJPlPIFAn+dFS Lhbp0UYxa+8GNR0jx5rxoIRI19RblhevJhFutJTxtVnnBXTDHcOBAJ9YrYRvhz/ZIQ L0jcpMc04X7RUawJc+GPJ09O1vUXNSxv8aJIKKiK0DnoePGq/How3WpglmniU4DxaZ aM3UgZ/ri2h3v7xS4jm9thXDeLzXtS9YuOOLqr9ghK8DfiZ0bXj/XZNQjjHq4NjZNU iM2DFOrqUDZJrOTKy/CU0rm/zjTn1+nt9fX5AHG1CX2cZw6XqnfgnhxJ9sHCr3nBMG 5Yn65E7dZ6PvA== Received: by mail-wm1-f46.google.com with SMTP id y20-20020a1c4b140000b029011f294095d3so18173918wma.3 for ; Sat, 17 Apr 2021 10:30:35 -0700 (PDT) X-Gm-Message-State: AOAM532aHYxukQ/iAzHZl6ac1bIsc708qW2vrXAOTC50uDhRVRJ12L3V Zmia/M8/KEgz3jKIukNpy27pxvIRkkKQNIvObMM= X-Google-Smtp-Source: ABdhPJx5c7/qiwMYT0ir136uPjUzW1fYOXrUhmuWfobdjxZ7ZRW1mvPQs0zb5XctbTVKp2LKwzYcR2xXWnxiB9rv6sM= X-Received: by 2002:a7b:c14a:: with SMTP id z10mr13072983wmi.75.1618680634529; Sat, 17 Apr 2021 10:30:34 -0700 (PDT) MIME-Version: 1.0 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> <20210417135642.GR2531743@casper.infradead.org> In-Reply-To: <20210417135642.GR2531743@casper.infradead.org> From: Arnd Bergmann Date: Sat, 17 Apr 2021 19:30:21 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 1/1] mm: Fix struct page layout on 32-bit systems To: Matthew Wilcox Content-Type: text/plain; charset="UTF-8" X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Grygorii Strashko , "netdev@vger.kernel.org" , Ilias Apalodimas , "linux-mips@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-mm@kvack.org" , David Laight , Jesper Dangaard Brouer , Matteo Croce , "linuxppc-dev@lists.ozlabs.org" , Christoph Hellwig , "linux-arm-kernel@lists.infradead.org" Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" On Sat, Apr 17, 2021 at 3:58 PM Matthew Wilcox wrote: > I wouldn't like to make that assumption. I've come across IOMMUs (maybe > on parisc? powerpc?) that like to encode fun information in the top > few bits. So we could get it down to 52 bits, but I don't think we can > get all the way down to 32 bits. Also, we need to keep the bottom bit > clear for PageTail, so that further constrains us. I'd be surprised to find such an IOMMU on a 32-bit machine, given that the main reason for using an IOMMU on these is to avoid the 32-bit address limit in DMA masters. I see that parisc32 does not enable 64-bit dma_addr_t, while powerpc32 does not support any IOMMU, so it wouldn't be either of those two. I do remember some powerpc systems that encode additional flags (transaction ordering, caching, ...) into the high bits of the physical address in the IOTLB, but not the virtual address used for looking them up. > Anyway, I like the "two unsigned longs" approach I posted yesterday, > but thanks for the suggestion. Ok, fair enough. As long as there are enough bits in this branch of 'struct page', I suppose it is the safe choice. Arnd 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=-4.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,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 742EFC433B4 for ; Sat, 17 Apr 2021 17:32:51 +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 E813961248 for ; Sat, 17 Apr 2021 17:32:50 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E813961248 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.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:Cc:To:Subject:Message-ID:Date:From:In-Reply-To: References:MIME-Version:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=nsuPt97QhnoZoPvJOj39c+IQ38vdQO4JWdFIhJy3tXE=; b=nhsMoWfhX03Tnj0voVt++/P4J bhhI4i3UQ6XHZRjobxLDZ7Fm5zsHhqHDJOkgy3ek/TRWJfuSDkJQJIWYyjRn3jPJqa11lJdCGglGz FeZ1yzPfHB6gxCyB3aUShq/2G1IymSxHXZmSQpJHBnOx0Xu4x7WN7c7D0Soj208Uz7GliFXDFkWSm XRYBare46xyQaP+JV4Cp0Pmpuu6Hji6BnEoF36+eskDnza6AytEKHe2LDuNXJ0rjKFVKDHmL843V+ iswmQqXMboueVHjsg1Pdl8vGQs/rKMzWDn4xrytj3vb/HXrAOt0WLspCJgfYfNDMSLvfCWoF1bNIu 5E9KMHpJw==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lXomL-005qgx-FO; Sat, 17 Apr 2021 17:30:45 +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 1lXomI-005qgo-Su for linux-arm-kernel@desiato.infradead.org; Sat, 17 Apr 2021 17:30:42 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Type:Cc:To:Subject:Message-ID :Date:From:In-Reply-To:References:MIME-Version:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=GM634SWNwrx53hBSZlm7GnRSFPPpqH6kZsf861qOXhw=; b=IlZcM2wSn5q8LkCKguf99H2HrJ GUp1O5T0xZsshPPgELZBCIJW0TjiuYci2FsVEyXu3Ta32f+5dqzAfw0xY8YSuZqf4ilyN+VXUfVr0 AnHwC7Bl4QipSP5DiNh4RlWfcAc3k7JBuGY3r6fE1Jhbnoo2/BcvTM6Si3jbKUfwq0b5QgG9VCc1L KFfdO1y9JRwyUN8x3d+hEZMN2AMRtwTHszquSbXcrYO+FBE0YXQ7CK2CvAAPGXL1EDwr412D9IBAK L5fAVZ9FFGbCaAZSSaAAAMSsQAqKw+quSolqpsY1kQPzPd1NklU0ghrcU5oDBAD8meZw7dlA0A6Hr y04vFlig==; Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lXomD-00A7qU-1V for linux-arm-kernel@lists.infradead.org; Sat, 17 Apr 2021 17:30:41 +0000 Received: by mail.kernel.org (Postfix) with ESMTPSA id D739F613C0 for ; Sat, 17 Apr 2021 17:30:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1618680635; bh=ugaFr7ubcYoZlftrOW8+is8PkeVPg/pgdCmBuE+ol64=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=pokeBsO6dVRMBkqi8/yu+5t2S6RsKZsuEFRWuOmUllxciYCV/hKsZJPlPIFAn+dFS Lhbp0UYxa+8GNR0jx5rxoIRI19RblhevJhFutJTxtVnnBXTDHcOBAJ9YrYRvhz/ZIQ L0jcpMc04X7RUawJc+GPJ09O1vUXNSxv8aJIKKiK0DnoePGq/How3WpglmniU4DxaZ aM3UgZ/ri2h3v7xS4jm9thXDeLzXtS9YuOOLqr9ghK8DfiZ0bXj/XZNQjjHq4NjZNU iM2DFOrqUDZJrOTKy/CU0rm/zjTn1+nt9fX5AHG1CX2cZw6XqnfgnhxJ9sHCr3nBMG 5Yn65E7dZ6PvA== Received: by mail-wm1-f43.google.com with SMTP id t14-20020a05600c198eb029012eeb3edfaeso5846332wmq.2 for ; Sat, 17 Apr 2021 10:30:35 -0700 (PDT) X-Gm-Message-State: AOAM531Qk4QmTKdLaHXTLnPi6/6cGf0Z8kU1BEtdvIoZRDeaysrxM3fs 9b3dZt1LrGuwOG+EVvNbdygCVdDM4GeAJ5Swh1k= X-Google-Smtp-Source: ABdhPJx5c7/qiwMYT0ir136uPjUzW1fYOXrUhmuWfobdjxZ7ZRW1mvPQs0zb5XctbTVKp2LKwzYcR2xXWnxiB9rv6sM= X-Received: by 2002:a7b:c14a:: with SMTP id z10mr13072983wmi.75.1618680634529; Sat, 17 Apr 2021 10:30:34 -0700 (PDT) MIME-Version: 1.0 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> <20210417135642.GR2531743@casper.infradead.org> In-Reply-To: <20210417135642.GR2531743@casper.infradead.org> From: Arnd Bergmann Date: Sat, 17 Apr 2021 19:30:21 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 1/1] mm: Fix struct page layout on 32-bit systems To: Matthew Wilcox Cc: Jesper Dangaard Brouer , Grygorii Strashko , "netdev@vger.kernel.org" , Ilias Apalodimas , "linux-kernel@vger.kernel.org" , "linux-mips@vger.kernel.org" , "linux-mm@kvack.org" , David Laight , Matteo Croce , "linuxppc-dev@lists.ozlabs.org" , Christoph Hellwig , "linux-arm-kernel@lists.infradead.org" X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210417_103037_144725_54F329BF X-CRM114-Status: GOOD ( 16.62 ) 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 Sat, Apr 17, 2021 at 3:58 PM Matthew Wilcox wrote: > I wouldn't like to make that assumption. I've come across IOMMUs (maybe > on parisc? powerpc?) that like to encode fun information in the top > few bits. So we could get it down to 52 bits, but I don't think we can > get all the way down to 32 bits. Also, we need to keep the bottom bit > clear for PageTail, so that further constrains us. I'd be surprised to find such an IOMMU on a 32-bit machine, given that the main reason for using an IOMMU on these is to avoid the 32-bit address limit in DMA masters. I see that parisc32 does not enable 64-bit dma_addr_t, while powerpc32 does not support any IOMMU, so it wouldn't be either of those two. I do remember some powerpc systems that encode additional flags (transaction ordering, caching, ...) into the high bits of the physical address in the IOTLB, but not the virtual address used for looking them up. > Anyway, I like the "two unsigned longs" approach I posted yesterday, > but thanks for the suggestion. Ok, fair enough. As long as there are enough bits in this branch of 'struct page', I suppose it is the safe choice. Arnd _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel