Received: by 2002:ab2:710b:0:b0:1ef:a325:1205 with SMTP id z11csp1302729lql; Tue, 12 Mar 2024 13:01:30 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVn6kfgXPb1hH54y5Ir9zZgpVoW0XVVRwu7wZAEy3a3brDcGf6PgrhY6mv8QpZDihbRqvd8T50OBfFYAPmdg/L0fC/zE0S0bluYnP9bYQ== X-Google-Smtp-Source: AGHT+IHfIV0vrAYwGWLKvnNVX21m4d1eE5CDbjxCANszZvl/s3c8MDC/9Tj8qedSyIr82AXhyV8d X-Received: by 2002:a50:9b15:0:b0:567:26ba:d207 with SMTP id o21-20020a509b15000000b0056726bad207mr3380133edi.18.1710273690641; Tue, 12 Mar 2024 13:01:30 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710273690; cv=pass; d=google.com; s=arc-20160816; b=A1Kaam4UsrpAWV8KjcsGF+Jy4nz3cUR/6CTxQlOsAgq2d7IeBmB2jyG9Q0x8XZJRLN 1h7X4W/QlKlXCQ1r9vw8dzrK22TS5RruIKUrYhg1RLcab+kS5IVPJQSjK9XYKV9b2xOF Qrtti/uIMSctErzilkuPns8nP6CjvpwqrgRPXTcj72xg4N4gNPgPXr53COC15+cfFIX+ NXRk/lg28r4+m5D9hDiPHO1anEfFiqYnKndnTQD61es81hEqwYdJF5+6n5PocVdK1hi6 72PEJt5fUUw/4q6K63rnp4M43q68JTanXfR5uaRoRGHpGWlIxpNIv8OBBLafNSh6XXny Fgrw== 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=sq8Q7APw4DcVkqWc+oejv1fuFkz+jT1GPn/e6E4W0Yk=; fh=s/9BEYbQ2fjQEHSjr+j0PHlAqhkjnBxhD6vvvk2wN6g=; b=p6bmeXLH8taa3cL+JzEd0ULqX30w/tiWRMZZB2fkKQag8Et6R12fSyll89dB/5ZGpF DE4KXGddEQQF/w9uRSJLe5XithXjyoxYEzsAsHbvwRm7dSFB8ASR4bwF5ULnwMJxG9NZ /f4bijzLgwkkahPAd3H0rFXiuLbLrS0csHNguz2dZ0QLaNzgBFtIr1Wg1+FgF3QdlNI4 WNTtSwYmJjdNgsQbXjcBL9j84H0NmkUVzNoXau31ypgBwG8MzBAmjAp60ERc+lwcSieZ OsaMhBnPqNsExS7W05Ls3rJdQaSzBu6W6/NPwz+VdjJ8e4rGO7DNU6+yDIvHgJ2scKZP f8Zw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Ssdzl1tc; 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-100737-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-100737-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id f16-20020a0564021e9000b005681b16293asi3859008edf.211.2024.03.12.13.01.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Mar 2024 13:01:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-100737-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Ssdzl1tc; 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-100737-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-100737-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 55A391F2188B for ; Tue, 12 Mar 2024 20:01:30 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 86067142658; Tue, 12 Mar 2024 20:01:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="Ssdzl1tc" 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 422A37D406 for ; Tue, 12 Mar 2024 20:01:21 +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=KAxiTz9rMXxvmCgXTxRF/6k1R+9tT6FAJtsy6j1nvP/0lijUTtLvYpxJpTjeYS7y0qQTmIbbRGqzFuCqp+4iIOa+j28jHzH+xe62YUxjCSaPlN5Y6vaofReUIMzEZrxxLfSjOQMcxX5VpBL99ZffPX2SuqNEKGd2n5WUmENejps= 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=Ssdzl1tc; 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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1710273680; 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=Ssdzl1tcJyX3A5Ni+bh5+qjHz6HBHNM5e1zo3guh50e8sMRROo6pMGe0W7hb4lVouv/L7Q oaR3ZJRPvVvHS3CWjWMJXlTSldoW7PWoi0MzCRufktfh/mQvA8OkqN/AANS0tm6S3sRl4Y c18n03dEieLWj6cYsGVc1YpXN4J59ao= 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-281-_UKF141UMwaesL5cKyYTSQ-1; Tue, 12 Mar 2024 16:01:18 -0400 X-MC-Unique: _UKF141UMwaesL5cKyYTSQ-1 Received: by mail-qt1-f200.google.com with SMTP id d75a77b69052e-42ef59a624fso4362771cf.0 for ; Tue, 12 Mar 2024 13:01:17 -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=cbTQnTs4CPCFwr1QHDeD/cx1aYloFcesAj8WCbuNdkxqk5bq6zOMmYYvI+7XphrEGf WPbc3BLK7D8Hdsd/NLybXmz9kiY2W0KIAkluA674vQFg+UUD1J3HIliuuFYYFPTTNM4j V40LGCksH64dNRxcLPWlruuG1sIrolG+7xfeu6rLrj1Y+LQpZAxLJ6VZpWkyX7T0AT3h tmikJfl+9fzN/XsrotkuhZAu8GFWuZoxSdG8nMQhxybp1iVoIUSyzvzOk2cbW0PuqhS+ vg9swKhjcFsftJZ+Yd8Ir9XitkhgjrKclJckX8lpAMW6GDJwAO7+atwn9SopbLHHmUzY KFHA== X-Forwarded-Encrypted: i=1; AJvYcCVIMPzAXbXhnUk/QEsekWKr0VQ2JqQZQ+L8TxoL4XdEHOWAyoPxyZIU7sZNdQRNdczpbNziEcn630gREAJNW8IFsyr2wEkTz0OySsxv X-Gm-Message-State: AOJu0Yz4L1FZ95701gj68PD8G9aUUimG+qSsTyi9iW1sna7m+RekR4hF rmFRPYmM2qg3ag0Sa621R3z3S6iwhzLtt6W4hVC92LR/QABfi1/i92Q1m+OsjlmN4fdiIGqyu4r ou1vO/elicR9GZV2x8vOR4u8hVuLAqf6/cS0Rhc5lynftubDG5zi+wrbMQ3sSww== X-Received: by 2002:a05:620a:2715:b0:788:79d3:402e with SMTP id b21-20020a05620a271500b0078879d3402emr3492044qkp.7.1710273677507; Tue, 12 Mar 2024 13:01:17 -0700 (PDT) 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: 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: 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