Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp454661rdh; Thu, 23 Nov 2023 08:19:51 -0800 (PST) X-Google-Smtp-Source: AGHT+IFpHFJhuRLsPzT98up9fofOkSmO0HFni1Cw6SDtvKMtW5h7BatTxTDCdZaqtiuCIa3uhV6Z X-Received: by 2002:a17:903:2347:b0:1cf:837d:1e59 with SMTP id c7-20020a170903234700b001cf837d1e59mr3803853plh.25.1700756390855; Thu, 23 Nov 2023 08:19:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700756390; cv=none; d=google.com; s=arc-20160816; b=Rib8qSHOtPwnxDCJb4l8i1YH3wUr/TgrOAJRoGf60+3fxdKSw4QNBqHph3tNvkTNd1 sHlBVQSPDzEf2TfmhHbvNo451H9dqti4m6knSdUO4FGpdWyQQRI5tjnUm7eEARVuIM1O nS1RyiJ5fnQp1p7yAX7IRjztj0HVf/VVsW+9Wun6cDtRaN0lrJVAU1fCGkDy9uBqQZZq /FSkRvhlLXpz4p7rY4r6Nd9NLv6Zpa0q30UmZhwDTPQqo2J2Dphdt/00xq8SKWdT/YZj Qk2hv4W+jM6YZoySim+of3wyO0Y1SDNjGi6Gzy1UFk4lQwfIAyLvQPHmO9QbQrXLNt/7 uP6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=NCbhRTsSQmLGeB2Y6SZ9GGd5iZSLx7qmMRIcRmE96BM=; fh=/tVN5BJP0qh+yRkTOCGie05XZWM49P5dn1+TI0V9M74=; b=Kqzcbo0Ozz1sEBPb8IjuTmtcyBrBYrgiDaE4lPLUuWQFqlGK3a+KEO3XJrvS1wFf/u 03JP+Jw+c0Af9/sPQUGvAoFe+MPWD0nsPq+IExMFSHZOrgizXZv9gHBmVWrIMCH6KPfG 9+ig3fxBMFMHPRoBUE4EFio4wc47zbVEJB7RdUVngyXQqgKR/32ZfbXcJobYx7UXVGjb 6dqXJrJsqMsOQpOnb5WDRF9xGA5hq1Acdt2vfNzhQ1+vafxdm5pSE2nCa7NYNGno4aLV jQeQfYNpKPZ2snYnxIg7GPWr5Boar11syTsG2Q7286lf99eNYZsHDi/YlI5EwFvmUjYb yK9Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=THdTOt7Z; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id u4-20020a17090282c400b001ca0a487ab2si904126plz.200.2023.11.23.08.19.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Nov 2023 08:19:50 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=THdTOt7Z; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 7D433802A36D; Thu, 23 Nov 2023 08:19:47 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229666AbjKWQTd (ORCPT + 99 others); Thu, 23 Nov 2023 11:19:33 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35028 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229510AbjKWQTc (ORCPT ); Thu, 23 Nov 2023 11:19:32 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 53D7B1A4 for ; Thu, 23 Nov 2023 08:19:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1700756378; 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=NCbhRTsSQmLGeB2Y6SZ9GGd5iZSLx7qmMRIcRmE96BM=; b=THdTOt7ZCi8HPrWfJY49ZEHw9vlwfMPzmZbJ8yHn6Ygmww81m0m+P9IYDS+nfz+oFgcchC F0kKs33N5nM3JN19rLtyaeLJE2AS27ht4B5AwZAKvRNEQpuLEAbYNhyyU/PO/eNb9N/oI2 BTVvjjDGsSIdQBwFW9dtEa5uJZCpiEI= Received: from mail-oi1-f197.google.com (mail-oi1-f197.google.com [209.85.167.197]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-310-u2q_yRu6Nni5EcawShSX4Q-1; Thu, 23 Nov 2023 11:19:36 -0500 X-MC-Unique: u2q_yRu6Nni5EcawShSX4Q-1 Received: by mail-oi1-f197.google.com with SMTP id 5614622812f47-3b83d297fb7so239738b6e.0 for ; Thu, 23 Nov 2023 08:19:36 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700756376; x=1701361176; 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=NCbhRTsSQmLGeB2Y6SZ9GGd5iZSLx7qmMRIcRmE96BM=; b=cNEKY4v5jsheaCKgWbqnWj67h10rSgklch7K/8vTJo62x3Hdj7f++eySgmZ2OPBWZ8 oy9SWyXnYcmMb1D5V/qRFbT8Dgge2qjkzs7mGhlxfMCpSgT1slXe5Tna4KuhtIpp7usO Shqi/QxjQNZiHyMaEs0GkEKLiz+aV3Ugkn9V80ECGhP0szCb0ryUGvxBvC3GweZJ9Qvx ISwe9TPlSef4Z0g35fAwUhcLm94hGFI4BJt3r8JpByuO5Nyp/eOKrt+cgPYcRDlV90ed hlJIXZ3YWN4y5UTrcGhJBEQgu/baiTpp2m3I3b5v4Ne2tyH5voP2tjKJSVTQKyEL6o/s 2IoQ== X-Gm-Message-State: AOJu0YyNlfQTjbtNIc0WkI3HQxMYYDap9CiclB6e/8s6Jp2DvOK68LEW Xx8vDJWT2nlvstuGaZ1OVF186m2w7g0D4RAlo9EEu7uDuPpl2hmr+I8egBSEGJayw9zL7ieCvoc yNF5ubpzk6jYbpcAOHk4Letab X-Received: by 2002:a05:6808:118:b0:3b6:db1b:67b7 with SMTP id b24-20020a056808011800b003b6db1b67b7mr6471457oie.4.1700756375989; Thu, 23 Nov 2023 08:19:35 -0800 (PST) X-Received: by 2002:a05:6808:118:b0:3b6:db1b:67b7 with SMTP id b24-20020a056808011800b003b6db1b67b7mr6471427oie.4.1700756375756; Thu, 23 Nov 2023 08:19:35 -0800 (PST) Received: from x1n (cpe688f2e2cb7c3-cm688f2e2cb7c0.cpe.net.cable.rogers.com. [99.254.121.117]) by smtp.gmail.com with ESMTPSA id e11-20020a0cf34b000000b0065b22afe53csm618347qvm.94.2023.11.23.08.19.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Nov 2023 08:19:35 -0800 (PST) Date: Thu, 23 Nov 2023 11:19:32 -0500 From: Peter Xu To: Christoph Hellwig Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, Mike Kravetz , "Kirill A . Shutemov" , Lorenzo Stoakes , Axel Rasmussen , Matthew Wilcox , John Hubbard , Mike Rapoport , Hugh Dickins , David Hildenbrand , Andrea Arcangeli , Rik van Riel , James Houghton , Yang Shi , Jason Gunthorpe , Vlastimil Babka , Andrew Morton Subject: Re: [PATCH RFC 09/12] mm/gup: Handle huge pud for follow_pud_mask() Message-ID: References: <20231116012908.392077-1-peterx@redhat.com> <20231116012908.392077-10-peterx@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=0.6 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_SORBS_WEB,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Thu, 23 Nov 2023 08:19:47 -0800 (PST) On Wed, Nov 22, 2023 at 11:28:31PM -0800, Christoph Hellwig wrote: > > We need to export "struct follow_page_context" along the way, so that > > huge_memory.c can understand it. > > Again, thankfully not actually exported, just made global. In the new version that shouldn't be needed, because I just noticed huge_memory.c is only compiled with THP=on. Logically it may start to make sense at some point to have thp.c for THP=on, and huge_memory.c for THP || HUGETLB. But I'd rather leave that done separately even if so.. In short, for this one, I'll drop that in the commit message, as I'll leave "struct follow_page_context" alone. > > > @@ -751,24 +746,25 @@ static struct page *follow_pud_mask(struct vm_area_struct *vma, > > unsigned int flags, > > struct follow_page_context *ctx) > > { > > - pud_t *pud; > > + pud_t *pudp, pud; > > This adding of pud while useful seems mostly unrelated and clutter > the patch up quite a bit. If you have to respin this anyway it might > be worth to split it out into a little prep patch. I can do this. I'll also try to do the same for the rest patches, if applicable. Thanks, -- Peter Xu