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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 2099BECE57A for ; Mon, 9 Sep 2024 15:04:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: Content-Type: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=6l+xHNqXTthDlFZ3K9cVgVJ/sPPZ9HvpzFqB6gZQUko=; b=3AMIkkhntDfDaDfVhtRbtFwtRh ZEgpfPgVkFNIVz7WWWUXfoH9oOr73oSYoWYzVjZG5M/z9x8AXuigyfmMas4zBJVjIwc48cz4ck28j wccZp/iuuM9+Fek6rWvnf3Rg3DQcElXcwcdHBQJEBZcr8bXSeA8NVY//AnD8CNI4/ZGLnwwYeKXCR iRrS7sLjhQc9vBtUCPeUa+KBxu3moca2s+XdYbjo8F7f27zhkWDiP6079jWQUGb1ZzP9sRV2Q/mch SROTvv8osZMHl77LBEQihPcirK9ceTMOe63B1Nm5GwAONqoh8wKUXybwJt2QE5l6LLxOOEQH8oO1z zI7IRaJw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1snfwC-00000002OCu-0JvX; Mon, 09 Sep 2024 15:04:20 +0000 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1snfvA-00000002O47-3qPo for linux-arm-kernel@lists.infradead.org; Mon, 09 Sep 2024 15:03:18 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1725894194; h=from:from: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; bh=6l+xHNqXTthDlFZ3K9cVgVJ/sPPZ9HvpzFqB6gZQUko=; b=LQbbyUpFJd+q7CoGR6j3DlhyRxOTue2ivwpPKveSWJJjFe5lFqArSjzUnPKoeiE0soqWe3 TeuOUx/Oar7EUiQF8AVQFbSBs0Iq1LdoLHjhX9zE8RjncEPBzB/9JxyVhti6UowBGC50sk KtxYlQuEPtzOte27JE1/AUuSLff1pzQ= Received: from mail-qv1-f72.google.com (mail-qv1-f72.google.com [209.85.219.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-575-OVerki3LNlq5VQ_v3WkwDA-1; Mon, 09 Sep 2024 11:03:13 -0400 X-MC-Unique: OVerki3LNlq5VQ_v3WkwDA-1 Received: by mail-qv1-f72.google.com with SMTP id 6a1803df08f44-6bf6d3e210eso50713166d6.3 for ; Mon, 09 Sep 2024 08:03:13 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725894193; x=1726498993; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=6l+xHNqXTthDlFZ3K9cVgVJ/sPPZ9HvpzFqB6gZQUko=; b=Y2DE4MXgsaqDI+6f2Yw68DcOpul6MxhLSQQzVmyrzBF7STwriHNOJgXaFqOgrVuUaG hti4eMYJFhZ/kKRgMM5LKc/yHRGnBTpX1mpqyQ+OLC8daV12SzoXj5W8zp47bfNsn+GH aYmcbfvqlxfvNDaeUgb/zsIrtF9TyzylcF6KZCqQY4oFdE/GMi8zBMLUga1ufLTmKNWq 1MxLcYsbKD3d1kEKPBs+hIwWzauZtUHTMYjTOYx/Xz40wpNc6t62T19OJ+kNTbF3fpxa vG0VhhLuwm6RkdsQYpVJU5IIsxGcihiBrpnuNIM8+fBD3EhFPNNmiTK8Ab0sIh6KvzDJ DYuA== X-Forwarded-Encrypted: i=1; AJvYcCVdcntBk/P4UYpCz0aweT6qnQij2uPDykOFlKaVz8AMBan8hpjWHv3pn9vj8ddyphPX0gRPXXvVN4izKQeqQgxZ@lists.infradead.org X-Gm-Message-State: AOJu0Yx3PLklX0FiT/jy4h6+F8pY/fefLtV9TG7Yr7pZtFRkUx+kDirj JCDAtIEHVLHv/z/OYBLPft4Nm7luxcLbIi5QPNsWJDSwtuTgDZvzbz6idDcllpCtH79H92KJkz+ XmuxvFYZGsUlN3xVQ+yTDu+C9HKmGRl06l8Saak1QIYbQiQ9HyAdCe7q7H2Wdu41b3YB0J00n X-Received: by 2002:a05:6214:5b84:b0:6c3:5789:62f8 with SMTP id 6a1803df08f44-6c5323fe2b4mr100989416d6.19.1725894193164; Mon, 09 Sep 2024 08:03:13 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHXyNgnw3o/IQrxRWaaUJgRseDSr7DTlug9i0O8HD+tnUNFFXmzQMuc9otVGIFfDiIY6ds48Q== X-Received: by 2002:a05:6214:5b84:b0:6c3:5789:62f8 with SMTP id 6a1803df08f44-6c5323fe2b4mr100988886d6.19.1725894192696; Mon, 09 Sep 2024 08:03:12 -0700 (PDT) Received: from x1n (pool-99-254-121-117.cpe.net.cable.rogers.com. [99.254.121.117]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-6c53432dfb8sm21272326d6.24.2024.09.09.08.03.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Sep 2024 08:03:12 -0700 (PDT) Date: Mon, 9 Sep 2024 11:03:09 -0400 From: Peter Xu To: Ankit Agrawal Cc: "linux-kernel@vger.kernel.org" , "linux-mm@kvack.org" , Gavin Shan , Catalin Marinas , "x86@kernel.org" , Ingo Molnar , Andrew Morton , Paolo Bonzini , Dave Hansen , Thomas Gleixner , Alistair Popple , "kvm@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , Sean Christopherson , Oscar Salvador , Jason Gunthorpe , Borislav Petkov , Zi Yan , Axel Rasmussen , David Hildenbrand , Yan Zhao , Will Deacon , Kefeng Wang , Alex Williamson Subject: Re: [PATCH v2 00/19] mm: Support huge pfnmaps Message-ID: References: <20240826204353.2228736-1-peterx@redhat.com> MIME-Version: 1.0 In-Reply-To: X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240909_080317_050161_8DB5EC48 X-CRM114-Status: GOOD ( 24.21 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, Sep 09, 2024 at 04:03:55AM +0000, Ankit Agrawal wrote: > > More architectures / More page sizes > > ------------------------------------ > > > > Currently only x86_64 (2M+1G) and arm64 (2M) are supported.  There seems to > > have plan to support arm64 1G later on top of this series [2]. > > > > Any arch will need to first support THP / THP_1G, then provide a special > > bit in pmds/puds to support huge pfnmaps. > > Just to confirm, would this also not support 512M for 64K pages on aarch64 > with special PMD? Or am I missing something? I don't think it's properly tested yet, but logically it should be supported indeed, as here what matters is "pmd/pud", not the explicit size that it uses. > > > remap_pfn_range() support > > ------------------------- > > > > Currently, remap_pfn_range() still only maps PTEs.  With the new option, > > remap_pfn_range() can logically start to inject either PMDs or PUDs when > > the alignment requirements match on the VAs. > > > > When the support is there, it should be able to silently benefit all > > drivers that is using remap_pfn_range() in its mmap() handler on better TLB > > hit rate and overall faster MMIO accesses similar to processor on hugepages. > > Does Peter or other folks know of an ongoing effort/patches to extend > remap_pfn_range() to use this? Not away of any from my side. Thanks, -- Peter Xu