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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id C9B00C54E58 for ; Tue, 12 Mar 2024 20:02:14 +0000 (UTC) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=hZUjP/D6; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=ZKQ3snpr; dkim-atps=neutral Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4TvPgT21Dlz3dXZ for ; Wed, 13 Mar 2024 07:02:13 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=hZUjP/D6; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=ZKQ3snpr; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=redhat.com (client-ip=170.10.133.124; helo=us-smtp-delivery-124.mimecast.com; envelope-from=peterx@redhat.com; receiver=lists.ozlabs.org) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4TvPfb4YKHz3cV5 for ; Wed, 13 Mar 2024 07:01:26 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1710273681; 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=sq8Q7APw4DcVkqWc+oejv1fuFkz+jT1GPn/e6E4W0Yk=; b=hZUjP/D6J9pwOvjbXWl/TnnGrlwZOagSjLsshCH2LeYVshMTIYUmknyoagJorD1uvevAfF a4nng9HJSzz+frcTyPIb6Rpc0GujIDxIIj10rjzImhujng22bOa8AktSwu7TrDvbJT3xlO BbO5RM739tlIkETH9sPjBcrtdeoDA6w= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1710273682; 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=sq8Q7APw4DcVkqWc+oejv1fuFkz+jT1GPn/e6E4W0Yk=; b=ZKQ3snpri8r+3q9plO5BJ7tIv5PnKEWn3i3GPhYPbD1Yezz1guiDCuECvT/2aeu6l1Cq/T lRek4cHQVG7OZb3kGzf/Laa8z+EYkjyvJ3MtT6zB5v2JYZc945iz532YRsbS1IqHabq1cw nSNUtG2aW+Cehope1/h1EuE9mPvAS8s= Received: from mail-qt1-f200.google.com (mail-qt1-f200.google.com [209.85.160.200]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-190-QrdOiWhhPe-eFx_NUA9wQg-1; Tue, 12 Mar 2024 16:01:18 -0400 X-MC-Unique: QrdOiWhhPe-eFx_NUA9wQg-1 Received: by mail-qt1-f200.google.com with SMTP id d75a77b69052e-42ed8fb8ce0so5362891cf.1 for ; Tue, 12 Mar 2024 13:01:18 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710273677; x=1710878477; 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=sq8Q7APw4DcVkqWc+oejv1fuFkz+jT1GPn/e6E4W0Yk=; b=sYq8+nTbIFBMrwgd+52vllIFweuUmvWBYECfBwJyo9yjxr8uMDBnVzNB225kJ7pL9A 0lRuAFgXeXGssByjfQdIKiAnNFYLbY3Iza4SJD34lrtH5qnTxRl9RYNc0qbyT/kNbknF U5dcZDPWXuH9rBns6wFbtj6KUWLd4/UM0zloTOvtpBTUia5QQFLLTMMFB03/hLpU+z4T tdaVNEdxvQRyUu0I3/VHrtZJhmKUmx/JRrmTQjES6CZi+39GttAO4CNgF/iuyqq5Rfxb Eu8Vv3e8G7x+IGJNkOTNmwQmc0Kegi6zXbRA63jq5gUbH1HmCRvIkJgrgOTCVaRvTAUr GA/Q== X-Forwarded-Encrypted: i=1; AJvYcCW1CEzqmEh+ecPDiso08uQwbQjcy2mpzkQ7ae8Ul0r+v4CoKY0WkXWWTJH+5+JebQbvOD15p4j7pt/Rq0a3kpBA+FJp8rcmtbzMSKyT8g== X-Gm-Message-State: AOJu0YwJv58Bak8K5L8kOwC6URGzUErksqo5EQyHInqL9Hk5kftFRcwB UXXZ3mJ2swvug6QU0AQC4+Z4AiEglJNIkxJf2Mbs9tsQhic63HoKQm9xM57YHsx3wOuTPNtNQ0X NZnqX/bs37bRi+5iYy3nXFAwPoiv+BWSR1a1KIneBzWyVUcks8zhQ0DzU/aibTSM= X-Received: by 2002:a05:620a:2715:b0:788:79d3:402e with SMTP id b21-20020a05620a271500b0078879d3402emr3492050qkp.7.1710273677510; Tue, 12 Mar 2024 13:01:17 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGFci8LJ7emFKeNaMhqM4be32i5qK2b8ngNE0xIpit/UyC+7KzN+KAk6ieS3wmiUOL3/zXkrQ== X-Received: by 2002:a05:620a:2715:b0:788:79d3:402e with SMTP id b21-20020a05620a271500b0078879d3402emr3492030qkp.7.1710273677131; Tue, 12 Mar 2024 13:01:17 -0700 (PDT) Received: from x1n (cpe688f2e2cb7c3-cm688f2e2cb7c0.cpe.net.cable.rogers.com. [99.254.121.117]) by smtp.gmail.com with ESMTPSA id f18-20020a05620a12f200b007882915ca34sm3977850qkl.40.2024.03.12.13.01.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Mar 2024 13:01:16 -0700 (PDT) Date: Tue, 12 Mar 2024 16:01:14 -0400 From: Peter Xu To: Christophe Leroy Subject: Re: [PATCH RFC 00/13] mm/treewide: Remove pXd_huge() API Message-ID: References: <20240306104147.193052-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 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: "x86@kernel.org" , Muchun Song , "linux-kernel@vger.kernel.org" , Matthew Wilcox , "linux-mm@kvack.org" , "linux-arm-kernel@lists.infradead.org" , Jason Gunthorpe , "sparclinux@vger.kernel.org" , Andrew Morton , "linuxppc-dev@lists.ozlabs.org" , Mike Rapoport Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" Hi, Christophe, On Mon, Mar 11, 2024 at 09:58:47AM +0000, Christophe Leroy wrote: > Hi Peter, and nice job you are doing in cleaning up things around _huge > stuff. Thanks. I appreciate your help along the way on Power. > > One thing that might be worth looking at also at some point is the mess > around pmd_clear_huge() and pud_clear_huge(). > > I tried to clean things up with commit c742199a014d ("mm/pgtable: add > stubs for {pmd/pub}_{set/clear}_huge") but it was reverted because of > arm64 by commit d8a719059b9d ("Revert "mm/pgtable: add stubs for > {pmd/pub}_{set/clear}_huge"") > > So now powerpc/8xx has to implement pmd_clear_huge() and > pud_clear_huge() allthough 8xx page hierarchy only has 2 levels. Those are so far out of my radar, as my focus right now is still more on hugetlbfs relevant side of things, while kernel mappings are not yet directly involved in hugetlbfs, even though they're still huge mappings. It's a pity to know that broke arm and got reverted, as that looks like a good thing to clean it up if ever possible. I tend to agree with you that it seems for 3lvl we should define pgd_huge*() instead of pud_huge*(), so that it looks like the only way to provide such a treewide clean API is to properly define those APIs for aarch64, and define different pud helpers for either 3/4 levels. But I confess I don't think I fully digested all the bits. Thanks, -- Peter Xu From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.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 8928279DD4 for ; Tue, 12 Mar 2024 20:01:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710273682; cv=none; b=KmK7D9xp4lRrMNZbBetNhG3xcw/eBDj1ILYNspJ8aTEf6LPbwbGr5ee3Rbfew/qf19oDjeq/IXhqDvhOGHeBFFtcml5XJn7WHPaq45z20vI4pgM5Cc+rib5If6yWIIxitQZs46hNW/dpnZuVPTdPzWIFGm753nP2KaU8T1dtcOs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710273682; c=relaxed/simple; bh=0a8n08WPCW1Zky1uteVZ0stAKm5h/96u1j8Uh3AQSwg=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=ueyg6oOM0/vmfjt7M5+ACRNAF7snfCOoN43wnVYTKrwQqBCx0ePqq5gOn5iNmWSTY2WVSJ0ExvhDd1KzGCPkPbKOfCiHu5ZPFOpKQxeMj1Rcr8voRB8ofxM9UbWKbYwPQzd0SiisAvwtn0T+Dv7GRVRZkUHVRzhf3/7eXFJiin8= 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=ZNjZyfxP; arc=none smtp.client-ip=170.10.129.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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="ZNjZyfxP" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1710273679; 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=sq8Q7APw4DcVkqWc+oejv1fuFkz+jT1GPn/e6E4W0Yk=; b=ZNjZyfxPxXGSe3KC3QhPcaQVEc8F70dFtoaEU/+H9DHhN3nB3FSG3ZRQw2K7loOLEmbwu9 kLXYDL4DUUlDaVmNzZ/RA6zCyKT5HNdT6yDpdYFk/4aqKrK2T259ou1kx1WCoJqr7xLY0k jB4hE/8XPTN4nHjDRLOBT+zRQE0mpU8= Received: from mail-qt1-f200.google.com (mail-qt1-f200.google.com [209.85.160.200]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-15-j1vpuxiiPXu2sB-LjHhdjA-1; Tue, 12 Mar 2024 16:01:18 -0400 X-MC-Unique: j1vpuxiiPXu2sB-LjHhdjA-1 Received: by mail-qt1-f200.google.com with SMTP id d75a77b69052e-42ed8fb8ce0so5362901cf.1 for ; Tue, 12 Mar 2024 13:01:18 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710273677; x=1710878477; 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=sq8Q7APw4DcVkqWc+oejv1fuFkz+jT1GPn/e6E4W0Yk=; b=cptmgTUBgglLQLLHQc84k3VNk80QnDDgKjOL6GNMWDuktsvDBgqklvOZjjx4Ddzlw0 JIjq482q/Vtef0TDtgx56WSnPLeJWV7UR4clSsqtgm93L2SJIST3UZbWMdR2jS0ygLlh fx/Yj0nSoIHKTTboAVLB7qY5HdN/x2EU+8i/s4po6HIgSLeXqe6B1AKGLTMAFGyAzXd+ FUb71GN1KSAiCzA6pbmr7kmAF/EbIxpxk/4MgzdYdEwodoL6l5wOXxdAUERkM0NV0UBt prKAa1utYpDcyA65qwiSf8WpBjXHJ0L1S18xjvsSoD4/IaekaDyadKA0hdhkTJwq601H lMLg== X-Forwarded-Encrypted: i=1; AJvYcCXT4W4RKpm1KW6hnkoW14WkVGALZZY5EgZMkNEslKDi5oHXRN3O68Xr4z+daB7HUcjoQ2zFxJZjTQDlBIL/nzqJcir5tUC1Js/V2A== X-Gm-Message-State: AOJu0Yy/0ZWr7CeP2BYATC+U2b0+hpuwFdZ1+UtejeBoEfWi3r1HhoDK hzwLNB6bn2UGTw4enHzbL3eEIxjGc8iQqdUc3SK6lsepTNQ/ww8qbSkbwpSAjCYE9mSvpUXHmTH UksFwvApPWPR3AKoUy4jvrXIgUaFf1ShRDz7tSfDS3THukSy0Q8XCFuqwfZs= X-Received: by 2002:a05:620a:2715:b0:788:79d3:402e with SMTP id b21-20020a05620a271500b0078879d3402emr3492049qkp.7.1710273677509; Tue, 12 Mar 2024 13:01:17 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGFci8LJ7emFKeNaMhqM4be32i5qK2b8ngNE0xIpit/UyC+7KzN+KAk6ieS3wmiUOL3/zXkrQ== X-Received: by 2002:a05:620a:2715:b0:788:79d3:402e with SMTP id b21-20020a05620a271500b0078879d3402emr3492030qkp.7.1710273677131; Tue, 12 Mar 2024 13:01:17 -0700 (PDT) Received: from x1n (cpe688f2e2cb7c3-cm688f2e2cb7c0.cpe.net.cable.rogers.com. [99.254.121.117]) by smtp.gmail.com with ESMTPSA id f18-20020a05620a12f200b007882915ca34sm3977850qkl.40.2024.03.12.13.01.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Mar 2024 13:01:16 -0700 (PDT) Date: Tue, 12 Mar 2024 16:01:14 -0400 From: Peter Xu To: Christophe Leroy Cc: "linux-mm@kvack.org" , "linux-kernel@vger.kernel.org" , "linuxppc-dev@lists.ozlabs.org" , Andrew Morton , Muchun Song , Jason Gunthorpe , Matthew Wilcox , Mike Rapoport , "x86@kernel.org" , "sparclinux@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" Subject: Re: [PATCH RFC 00/13] mm/treewide: Remove pXd_huge() API Message-ID: References: <20240306104147.193052-1-peterx@redhat.com> Precedence: bulk X-Mailing-List: sparclinux@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: Hi, Christophe, On Mon, Mar 11, 2024 at 09:58:47AM +0000, Christophe Leroy wrote: > Hi Peter, and nice job you are doing in cleaning up things around _huge > stuff. Thanks. I appreciate your help along the way on Power. > > One thing that might be worth looking at also at some point is the mess > around pmd_clear_huge() and pud_clear_huge(). > > I tried to clean things up with commit c742199a014d ("mm/pgtable: add > stubs for {pmd/pub}_{set/clear}_huge") but it was reverted because of > arm64 by commit d8a719059b9d ("Revert "mm/pgtable: add stubs for > {pmd/pub}_{set/clear}_huge"") > > So now powerpc/8xx has to implement pmd_clear_huge() and > pud_clear_huge() allthough 8xx page hierarchy only has 2 levels. Those are so far out of my radar, as my focus right now is still more on hugetlbfs relevant side of things, while kernel mappings are not yet directly involved in hugetlbfs, even though they're still huge mappings. It's a pity to know that broke arm and got reverted, as that looks like a good thing to clean it up if ever possible. I tend to agree with you that it seems for 3lvl we should define pgd_huge*() instead of pud_huge*(), so that it looks like the only way to provide such a treewide clean API is to properly define those APIs for aarch64, and define different pud helpers for either 3/4 levels. But I confess I don't think I fully digested all the bits. Thanks, -- Peter Xu 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 5C87BC54E58 for ; Tue, 12 Mar 2024 20:01:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; 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=Lohia+kv940anQ48TpkWUkXJaz/+6kbkwLWaoe1NYd8=; b=j+egqU4+AyzGyT 92a3JkxkhkVGim0018tscbE4TUMPB3LDRPKvgsJTMBXiQQsyMhvqjUPJ/RfjWQYcqFjiGrVfKgfi+ ceIvZI95jKcGNZ+kKMqF5MVs9+6TGHlriNR667xaY2m05IaoCOYLbXE+EyD1UhQicmjsGCTTWWJWZ +6hvj0HojeOWGiLpcJOjtSJBC9yLocO7+pe5KA2pJVt646//yYG90I5/SHc/toPeRmk3hyZdluWgq 3vqb63Deldcnc6W6/S+VefMPJrqD5LW91j0Zcg0t2Z8oWh+KMoDZ37GlNVfCTzlyktUnFgM6TZmsB QvIxTQU0y3mZDYWuIkTw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rk8JU-00000007OBY-3lbR; Tue, 12 Mar 2024 20:01:28 +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 1rk8JQ-00000007O9U-1jsW for linux-arm-kernel@lists.infradead.org; Tue, 12 Mar 2024 20:01:26 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1710273682; 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=sq8Q7APw4DcVkqWc+oejv1fuFkz+jT1GPn/e6E4W0Yk=; b=ZKQ3snpri8r+3q9plO5BJ7tIv5PnKEWn3i3GPhYPbD1Yezz1guiDCuECvT/2aeu6l1Cq/T lRek4cHQVG7OZb3kGzf/Laa8z+EYkjyvJ3MtT6zB5v2JYZc945iz532YRsbS1IqHabq1cw nSNUtG2aW+Cehope1/h1EuE9mPvAS8s= Received: from mail-qt1-f197.google.com (mail-qt1-f197.google.com [209.85.160.197]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-651-clfv8Ne5M1Kz_ZxOhIPvSg-1; Tue, 12 Mar 2024 16:01:18 -0400 X-MC-Unique: clfv8Ne5M1Kz_ZxOhIPvSg-1 Received: by mail-qt1-f197.google.com with SMTP id d75a77b69052e-42ef59a624fso4362811cf.0 for ; Tue, 12 Mar 2024 13:01:18 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710273677; x=1710878477; 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=sq8Q7APw4DcVkqWc+oejv1fuFkz+jT1GPn/e6E4W0Yk=; b=U9eUrCBwALJUZkliMKOteY4emAhSHZHIVgPUYj/tlqHaeiOX80mTZrJNjRHXhlgFjy QmDE+mCxQLGyESOZhdx8bJ1Wj6zcoJVD3IKkHKm+lfoaNBqP97MDoGb3yKLwkBrIG5VH q0GJm1T2be7z+2OgRRp0KDulCfES3l/zy4cjqXESyHGTG513K3RcpM0ho4ImjPa4+U1Q KxUjn31oUPIdpCJM806OnPlTM5ygEIIBMmPOCaPDZGsojedr5QeWmMyac4Nn8I2j4gCF zSW/lStmUQDtJ/KtE+svADupOvMxt5ViX9ahRofLa0deV9Yqrum13AyoLMN633s71gqA voLA== X-Forwarded-Encrypted: i=1; AJvYcCWQIJSDtqpyOm/lurd+TO2r5QENrTK6nE6VfENkttJtC+lW2yStlBJwwaaC4dicof6vT/vSx5ArCvKTuNXabn87P5PF3JQodDa+OYKhKHkpx+AdhIo= X-Gm-Message-State: AOJu0YyRreCv84s2ShyCEOIXRTuhOXO9utVlyH4YeIjl31Z8LM7VV6tH AVyWQE6k5ggm9BlGSd5MviOfaUeFkGaNjmYDTsJ4tKWXNVVQelPhduRBk5S2F9oghmhGI1exUr8 /zvSQhnxf6AdJfPZgqTqOf2LoncWucUnqCUkeEYW3M83Mu59htras5GmF9odsZLOPCcyBYPgC X-Received: by 2002:a05:620a:2715:b0:788:79d3:402e with SMTP id b21-20020a05620a271500b0078879d3402emr3492042qkp.7.1710273677507; Tue, 12 Mar 2024 13:01:17 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGFci8LJ7emFKeNaMhqM4be32i5qK2b8ngNE0xIpit/UyC+7KzN+KAk6ieS3wmiUOL3/zXkrQ== X-Received: by 2002:a05:620a:2715:b0:788:79d3:402e with SMTP id b21-20020a05620a271500b0078879d3402emr3492030qkp.7.1710273677131; Tue, 12 Mar 2024 13:01:17 -0700 (PDT) Received: from x1n (cpe688f2e2cb7c3-cm688f2e2cb7c0.cpe.net.cable.rogers.com. [99.254.121.117]) by smtp.gmail.com with ESMTPSA id f18-20020a05620a12f200b007882915ca34sm3977850qkl.40.2024.03.12.13.01.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Mar 2024 13:01:16 -0700 (PDT) Date: Tue, 12 Mar 2024 16:01:14 -0400 From: Peter Xu To: Christophe Leroy Cc: "linux-mm@kvack.org" , "linux-kernel@vger.kernel.org" , "linuxppc-dev@lists.ozlabs.org" , Andrew Morton , Muchun Song , Jason Gunthorpe , Matthew Wilcox , Mike Rapoport , "x86@kernel.org" , "sparclinux@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" Subject: Re: [PATCH RFC 00/13] mm/treewide: Remove pXd_huge() API Message-ID: References: <20240306104147.193052-1-peterx@redhat.com> MIME-Version: 1.0 In-Reply-To: X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240312_130124_789345_66A20135 X-CRM114-Status: GOOD ( 17.51 ) 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, Christophe, On Mon, Mar 11, 2024 at 09:58:47AM +0000, Christophe Leroy wrote: > Hi Peter, and nice job you are doing in cleaning up things around _huge > stuff. Thanks. I appreciate your help along the way on Power. > > One thing that might be worth looking at also at some point is the mess > around pmd_clear_huge() and pud_clear_huge(). > > I tried to clean things up with commit c742199a014d ("mm/pgtable: add > stubs for {pmd/pub}_{set/clear}_huge") but it was reverted because of > arm64 by commit d8a719059b9d ("Revert "mm/pgtable: add stubs for > {pmd/pub}_{set/clear}_huge"") > > So now powerpc/8xx has to implement pmd_clear_huge() and > pud_clear_huge() allthough 8xx page hierarchy only has 2 levels. Those are so far out of my radar, as my focus right now is still more on hugetlbfs relevant side of things, while kernel mappings are not yet directly involved in hugetlbfs, even though they're still huge mappings. It's a pity to know that broke arm and got reverted, as that looks like a good thing to clean it up if ever possible. I tend to agree with you that it seems for 3lvl we should define pgd_huge*() instead of pud_huge*(), so that it looks like the only way to provide such a treewide clean API is to properly define those APIs for aarch64, and define different pud helpers for either 3/4 levels. But I confess I don't think I fully digested all the bits. Thanks, -- Peter Xu _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel