Received: by 2002:ab2:69cc:0:b0:1fd:c486:4f03 with SMTP id n12csp424426lqp; Tue, 11 Jun 2024 08:20:25 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXvaYaNeZmRAQOJl65HbUGF2SvMKiq5RfVg+HKp8ZliM6dJUJ9kEgWK7VuOJaMiEqBU7PIZhOxhV1Xnbj/c7n64JXqW9uA8Tn49ihpQRw== X-Google-Smtp-Source: AGHT+IGx37B0s9/s8EawOhAJGYY8X4/wzbFFITwhDZTS46CbS4jl2dsv5sr2tB9wfeteKpd8v8ZK X-Received: by 2002:a05:620a:2a08:b0:795:6b7b:6929 with SMTP id af79cd13be357-7956b7b6b33mr787190785a.1.1718119224950; Tue, 11 Jun 2024 08:20:24 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718119224; cv=pass; d=google.com; s=arc-20160816; b=xlFTFvSIhiSwBQaRFxkX7hHohJU4GCd+yXgRux5CXZlUfRPsdKJ7Sdmmo7RaY/goG4 iDQfsW6ZAPv7mBlhvwHRqNjKzLPR9mvrteV+L0CVm8Md++hb17c1qK6lKwuS97a/f83d FC00vLtIT1wlI3//DROxcVLx/kguqkEK+QWagrAtMyv+qjQoBYlXwU91usr/6tL+3jiV gh+PA8F9wSimnVARqYj1lH7Pv+Hruq0Lfwg7tIkI5k0Tj6SIViS4HsvBZGXJh3G2Dr8k dxvt3LuTnAfNhaJPXAnJWDPiHI4lo1BtHea3Xxg8XVRtQNtRw9Rv4Xy6sBbpNWW6A/g7 xM1g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=T5mvQKuhxaeQQofAs6C4gb9DRnHzKICw8L5tE3p1+hQ=; fh=+hEb/Q3MjqL533pvcvvGZ4ob9CyFzg8nlJnTXp1yS0U=; b=o7MDXUS8CS1nlvbHzQP27AZee8hlH8MxWCRz89OQmIZIHdKb+DPkfYST446JkMkw3a 7Ra66ub5ccwIf1j2tLb4Qzr/dMVtCM5nl+5hR8CpDjKgYOyIsVQpQZm3WW5GlRDHRe63 pkjKecN6Y6CmASCDW00KrTDPu5uyA4jxgE7emxDxi4aNcbec1UVU9Pcox3Vy0q/2IDaW Pne6dLhRCWhtBh0GmtKtD/6lTM5mhW7ehQ/4ppFcNd8N9RGIxq+0MXHGttvhtISAWRjC pECoeKeCnTVTRqFsQDaTtFuHshyjYci6l3srxQoIsGl22wFS5QlZ1bwcVp14gdD62wPw AuXw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=TVkJdpBQ; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-210141-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-210141-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id af79cd13be357-79547c1c7a0si1108616585a.344.2024.06.11.08.20.24 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Jun 2024 08:20:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-210141-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=TVkJdpBQ; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-210141-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-210141-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id A918E1C23791 for ; Tue, 11 Jun 2024 15:20:24 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A68A220DC8; Tue, 11 Jun 2024 15:20:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="TVkJdpBQ" Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 691A614A96 for ; Tue, 11 Jun 2024 15:20:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718119216; cv=none; b=VutV0PZQZvcdM9wRZhyWA2UNNv/PdA9Ph/grFtCnn3a6OZIDnnYCzUQ3RoHDONE3/V2+k8xHwOfx3Ub7FmLuZeHvYYrEayKQgOZNZxYHioiPwqhQsmcaDJolmCm6eJQjv+hDtayBE5gxJ9wU72Lmj5qIV80sFjfDxem4nwrouAM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718119216; c=relaxed/simple; bh=ygpd/NUM0MXtrTTCxV9OZ1XYVALSgdgXlPbB77lA7QY=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=HvqiWkcue5uLUeOcZSOOxLvn+bP9j3Bv9FoECsLjR5tg6MS1U7xsL6VOJEoTMDAvFb/+FUvsp6rUi6+fbnMaKe+3zj53e1b6BECRfxiYOAIVIKRvXMoCr9q6Ts4pxII8A1puCEnTLoaX3rScb9DzQy/7YNJm9cb7FNVw371jmvQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=TVkJdpBQ; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1718119214; 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: in-reply-to:in-reply-to:references:references; bh=T5mvQKuhxaeQQofAs6C4gb9DRnHzKICw8L5tE3p1+hQ=; b=TVkJdpBQxc4zrzyL7aanp31I68opJrtFrApUz9b+UvKY9KEDkUTLN9F3KA2hI1EZMlU8cV +BEh7APWZ5X/tbgvxoQtrkiraXlvgRNds0P0BAYShahtLocmFZM075CjDEaehuOGJ9Obex 2qmD+qudl87fnRiuzLJOjSGKl/4H0K8= 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-136-x-tXif45M-2lVpOzXvGoKA-1; Tue, 11 Jun 2024 11:20:11 -0400 X-MC-Unique: x-tXif45M-2lVpOzXvGoKA-1 Received: by mail-qv1-f72.google.com with SMTP id 6a1803df08f44-6b07a472e83so5729326d6.1 for ; Tue, 11 Jun 2024 08:20:11 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718119211; x=1718724011; h=in-reply-to: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=T5mvQKuhxaeQQofAs6C4gb9DRnHzKICw8L5tE3p1+hQ=; b=cnl2qWd2Kz3d3J6XTvBg35bC2niEnL2ZQ61JKdVrJWEMM6MEBcPy7FNW5oQdD87OEm 8CaCIJDb1j8xVfw6NM36+N+33E0ccph+MOmGu8CW28nGpYroP0rV6R41Kcj1IQxLZY5w TbRl5Uoj1NViUvSZHT6TOuUSsxnyR+R1oebGKaSKN0Exkmis2OsKH3IfAvMYvKdGHu1Y z/n/MyR/srsNThLtlOhn3vvqkkzuEVwXdSYG7NaOpSPca+VqpMbp1ygWqru00ABkWeo8 vkcQ8TyOmQOKGaSPQIQTWgWdTrS6hQy6eDSPb+4fwPd6yGK2TB1nhSKXUCZTIy/SnBDS nKww== X-Forwarded-Encrypted: i=1; AJvYcCVCbcsDXRdIolkgpLheT/nHq3zVdqmiIWodsT/P5RpLSuUjqVspxQlAPtRQjifNyF4SFkRC6RHczm32v67cb+lnZwOjz+jzOMfJhZej X-Gm-Message-State: AOJu0YxYgKXv1oVPOevIZotNwqXDzHLp86JPs5z25RHlKdsbkszKB34j +cfjHJBNhTaz1+IT4NJZ8JB8qY/IeU6q0kWZ7ikNBlX/4Rpc5ShLlnV5qTUnHb6HZ4KQRkynRo2 1E5v4420YlP6E4D8VQMwtHxTjWD2YdjT8NpMvMmyCmZVNOqGcUGzhUJEXLqHX9g== X-Received: by 2002:a0c:f2c4:0:b0:6b0:6a38:e01d with SMTP id 6a1803df08f44-6b06a38e41dmr101257536d6.0.1718119211077; Tue, 11 Jun 2024 08:20:11 -0700 (PDT) X-Received: by 2002:a0c:f2c4:0:b0:6b0:6a38:e01d with SMTP id 6a1803df08f44-6b06a38e41dmr101257016d6.0.1718119210384; Tue, 11 Jun 2024 08:20:10 -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 d75a77b69052e-4406203775bsm25557621cf.72.2024.06.11.08.20.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Jun 2024 08:20:09 -0700 (PDT) Date: Tue, 11 Jun 2024 11:20:01 -0400 From: Peter Xu To: Oscar Salvador Cc: Christophe Leroy , Andrew Morton , Jason Gunthorpe , Michael Ellerman , Nicholas Piggin , linux-kernel@vger.kernel.org, linux-mm@kvack.org, linuxppc-dev@lists.ozlabs.org Subject: Re: [PATCH v5 02/18] mm: Define __pte_leaf_size() to also take a PMD entry Message-ID: References: <172b11c93e0de7a84937af2da9f80bd17c56b8c9.1717955558.git.christophe.leroy@csgroup.eu> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: On Tue, Jun 11, 2024 at 05:08:45PM +0200, Oscar Salvador wrote: > The problem is that we do not have spare bits for 8xx to mark these ptes > as cont-ptes or mark them pte as 8MB, so I do not see a clear path on how > we could remove huge_ptep_get for 8xx. Right, I remember I thought about this too when I initially looked at one previous version of the series, I didn't come up yet with a good solution, but I guess we probably need to get rid of hugepd first anyway. We may somehow still need to identify this is a 8M large leaf, and I guess this is again the only special case where contpte can go over >1 pmds. > > I am really curious though how we handle that for THP? Or THP on 8xx > does not support that size? I'll leave this to Christophe, but IIUC thp is only PMD_ORDER sized, so shouldn't apply to the 8MB pages. Thanks, -- Peter Xu