Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp1001274rwe; Thu, 1 Sep 2022 10:48:16 -0700 (PDT) X-Google-Smtp-Source: AA6agR5v3XqZWdXdbamsi4OkzgWJVvuz+zWmwkSiuaFhdfne7SR0u3MewAZcdCZvqlh7xNHVAZMg X-Received: by 2002:a17:907:1c1e:b0:741:8abe:320e with SMTP id nc30-20020a1709071c1e00b007418abe320emr14757472ejc.123.1662054496460; Thu, 01 Sep 2022 10:48:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662054496; cv=none; d=google.com; s=arc-20160816; b=s+pOSIy/Dhqx4HF/w56yFf+V9+Yag+WQBMbyinRiGlQLYmU2NYVjSHPV6MJpYKVH3v g6sMJ9mOXYK9eVEMWV670/GYyHcKUlWPKQLxivGz4vY3HWtECkWinc7AACEjLcchvnkH KkMKbpLW8xQ1Oubtv+prGnD+3YAtYnT15oXvlWTs/A551P+8a3uxaBit27sZaK3iNygr dLaAbfEuLFwJ847Nhuj3PrclVEvFwjkztdpaxeDl1E1N8Vla6V2buXYG8q278oFRgF2p 6X38iK1kO3i3HSLwWc1mHVwCQsy83YM6Jakg+T6cCDmsQOWyRV+gzNFQyS5UgYMOBIOq Bl3w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to :organization:from:references:cc:to:content-language:subject :user-agent:mime-version:date:message-id:dkim-signature; bh=/x6/oc1hUeYoqiDjprB/jyaSxWFouy8LEiafZnROgZo=; b=F5veqIZ89AIpsMozJ1DiA19QIhb8yggN6gKvIF742mNupqVfPPedgoqlNBZPpp7sXs Cbf3Lg3SJ13i1fTo/+7f+vxIS40l9xDN5KsXW2NdEOasxHFXFLdti8MPWT99xzLNRUa7 RZOlSbCWfhntyRHBT+ZseCExltk5decMIe7lD2z9Grkyp98wLLqRBJLZF95ySsou6eNE j6JAhuTVe2uDpicC+dH0s5yQBDpHUybmoTC9FSd78gY5qTpt6frXSBoG9pZZgi+gYsBx dXVvb0gVFRYkl+deLmD21solDcmy/VxWewQB19hrqpMsJ8F6bMheAkvSoMHa/+8DnnOv SjpA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=bRNkPFdT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id go40-20020a1709070da800b0073d81e22d19si7435534ejc.544.2022.09.01.10.47.49; Thu, 01 Sep 2022 10:48:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=bRNkPFdT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234012AbiIAQet (ORCPT + 99 others); Thu, 1 Sep 2022 12:34:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59130 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232489AbiIAQer (ORCPT ); Thu, 1 Sep 2022 12:34:47 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D24A6B3E for ; Thu, 1 Sep 2022 09:34:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1662050084; 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=/x6/oc1hUeYoqiDjprB/jyaSxWFouy8LEiafZnROgZo=; b=bRNkPFdTDnSMfpm6fNLpZsq18QNdE+XvKhIjQ3Xl+66jsMa2rSFBXWHelIow6jrthpPWXN leOwsxlx30crXHHFH54nRU8Jgq1tRU8G3KV4k+jWBgIxIYimWoSHl7xboJpxyOM6iRZFNl 6Tb+Kr19RXzL4Exy/rP8HWsc/VmCinc= Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-377-EritIfH8OYutoZ6fyysxvg-1; Thu, 01 Sep 2022 12:34:43 -0400 X-MC-Unique: EritIfH8OYutoZ6fyysxvg-1 Received: by mail-wm1-f72.google.com with SMTP id h133-20020a1c218b000000b003a5fa79008bso1495660wmh.5 for ; Thu, 01 Sep 2022 09:34:43 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:organization:from:references :cc:to:content-language:subject:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date; bh=/x6/oc1hUeYoqiDjprB/jyaSxWFouy8LEiafZnROgZo=; b=snkovLEwveWqB1rDBgDz1vfmfCf/mWw1NDniHxkZCT/B6USUdVuOiGVREU6korHyNG /ojExZ5/Ddvco52aphAp5JOIFNe7VSjl+39sO2ZfS6I8szsG2kNTeXLwf058UCPfKFUi ppwKrOyOBJ0fiUWEziEMBSIPwQwlixZXYFTSd64GTId9radifJed8cXmrQXmWkL0dhsG 8dVEJZlzzSnPd2AdyYy3M+9CXRSn045dQ1L3Okz0TGaL1lxDQQKWY7ia38nWOy+9DDez FyjOgcmfaz13WpapqYFgi7jzcQRMcQ+hfo5MrY5knZnxZ5XzwAnFCrZDXMOakQF308bv /yUQ== X-Gm-Message-State: ACgBeo373uuoXB2YG1d/JBKCb4M8EN2yZ9Xk1oLljvam1VWennV2J5QB Fvq5d5XVnbfBH8Z9IQnBS8jR+ib2Qd8fFHTmqpibJbDL/XycmyHJn+q/9u11DeDb3CsXH3Gb62C o+KnlPjQYu2KqMnpYk5EbGdw2 X-Received: by 2002:a05:600c:1e05:b0:3a5:b441:e9c with SMTP id ay5-20020a05600c1e0500b003a5b4410e9cmr10079wmb.24.1662050082592; Thu, 01 Sep 2022 09:34:42 -0700 (PDT) X-Received: by 2002:a05:600c:1e05:b0:3a5:b441:e9c with SMTP id ay5-20020a05600c1e0500b003a5b4410e9cmr10065wmb.24.1662050082371; Thu, 01 Sep 2022 09:34:42 -0700 (PDT) Received: from ?IPV6:2003:cb:c707:9e00:fec0:7e96:15cb:742? (p200300cbc7079e00fec07e9615cb0742.dip0.t-ipconnect.de. [2003:cb:c707:9e00:fec0:7e96:15cb:742]) by smtp.gmail.com with ESMTPSA id r1-20020a5d4e41000000b00226d1711276sm14940816wrt.1.2022.09.01.09.34.41 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 01 Sep 2022 09:34:41 -0700 (PDT) Message-ID: Date: Thu, 1 Sep 2022 18:34:41 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.12.0 Subject: Re: [PATCH v1] mm/gup: adjust stale comment for RCU GUP-fast Content-Language: en-US To: Peter Xu Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, "Kirill A . Shutemov" , Sasha Levin , "Aneesh Kumar K . V" , Vlastimil Babka , Jerome Marchand , Andrea Arcangeli , Hugh Dickins , Jason Gunthorpe , John Hubbard , Yang Shi References: <20220901072119.37588-1-david@redhat.com> From: David Hildenbrand Organization: Red Hat In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_LOW,SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 01.09.22 18:28, Peter Xu wrote: > On Thu, Sep 01, 2022 at 09:21:19AM +0200, David Hildenbrand wrote: >> commit 4b471e8898c3 ("mm, thp: remove infrastructure for handling splitting >> PMDs") didn't remove all details about the THP split requirements for >> RCU GUP-fast. >> >> IPI broeadcasts on THP split are no longer required. >> >> Cc: Kirill A. Shutemov >> Cc: Sasha Levin >> Cc: Aneesh Kumar K.V >> Cc: Vlastimil Babka >> Cc: Jerome Marchand >> Cc: Andrea Arcangeli >> Cc: Hugh Dickins >> Cc: Jason Gunthorpe >> Cc: John Hubbard >> Cc: Peter Xu >> Cc: Yang Shi >> Signed-off-by: David Hildenbrand >> --- >> mm/gup.c | 5 ++--- >> 1 file changed, 2 insertions(+), 3 deletions(-) >> >> diff --git a/mm/gup.c b/mm/gup.c >> index 5abdaf487460..cfe71f422787 100644 >> --- a/mm/gup.c >> +++ b/mm/gup.c >> @@ -2309,9 +2309,8 @@ EXPORT_SYMBOL(get_user_pages_unlocked); >> * >> * Another way to achieve this is to batch up page table containing pages >> * belonging to more than one mm_user, then rcu_sched a callback to free those >> - * pages. Disabling interrupts will allow the fast_gup walker to both block >> - * the rcu_sched callback, and an IPI that we broadcast for splitting THPs >> - * (which is a relatively rare event). The code below adopts this strategy. >> + * pages. Disabling interrupts will allow the fast_gup walker to block the >> + * rcu_sched callback. > > This is the comment for fast-gup in general but not only for thp split. "an IPI that we broadcast for splitting THP" is about splitting THP. > > I can understand that we don't need IPI for thp split, but isn't the IPIs > still needed for thp collapse (aka pmdp_collapse_flush)? That was, unfortunately, never documented -- and as discussed in the other thread, arm64 doesn't do that IPI before collapse and might need fixing. We'll most probably end up getting rid of that (undocumented/forgotten) IPI requirement and fix it in GUP-fast by re-rechecking if the PMD changed. Thanks! -- Thanks, David / dhildenb