Received: by 2002:a05:6358:bb9e:b0:b9:5105:a5b4 with SMTP id df30csp2208676rwb; Sun, 4 Sep 2022 10:32:10 -0700 (PDT) X-Google-Smtp-Source: AA6agR7hR6hxz6xtBfmYqhwOupkbexiPKv7Yb9cdpoJ/bLJJMrzLEntl7da7hddA1HyPqubxquY3 X-Received: by 2002:a17:907:2954:b0:742:299b:4f38 with SMTP id et20-20020a170907295400b00742299b4f38mr19590922ejc.508.1662312730516; Sun, 04 Sep 2022 10:32:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662312730; cv=none; d=google.com; s=arc-20160816; b=invN7LtX/F4zTkUA+5Z5qQeAsEMnyvGNR8UapKrSePsJg/DaaxRoUY4e9jRcrvk1no knXBARd5I/fIXchUJVRfbh/lPI1QncKCZPzLB1xGfrmPoWf5XwONkTsk6oAktv+XXBzr 8z/DDAcm6MeSBRtUqEvbkCHiz9CJQgsR2Rvv4uz7mc8p2kZUf07aTxsFVrywodOVoN7L SdlIMKBKMLBRPK1xWinolzg2GvDgJCtm9ica6ywztwKwuBi/8H6L7ugOQwR6lvpsa3vT 6YkgHcABLYrO8hHM4ngyhQ7YwF0SA0TtzeLGERkl+POBWSpj05L7N1hmYM8hY/RU5gWx ljMw== 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:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=B6Gg+IbmF96VX2gQI6DkUdr2TE7NFgdOmCAf0nr6gZY=; b=t0gsM12MiODEChycRmBi2c/tVb+o6vBLDXfrZZj63ruUCRBeUlCsQ6iV6LCbx3KJlw DW69SKtM9NWrISfhB5Xm3ZWrQIQGUtV0Phmnwf0B4UpvpbdGcUQsdFZp5jz4SK3Bg8N7 lTF7kQ4N75O6t8pTkw+q0RC0Cr8MmULfFKGfAhRr4l+SYIxJGyAjtf6A17vR7LV0nvqX 63elYkzm9tLJGjmGCHQ1v5JQ9R34sTC4vVkv9qRp7oGSLt/9w/giB5InMYcN0FGd74nr Pj3W3poZVD+ULO4rveZkDBgnOD7loc/8ggZvfVY9/i3jslQgSrhvAzCs02JlvzpzWMrG HM+A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=KRkDKkqb; 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=ibm.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hr38-20020a1709073fa600b00738483e3d66si5901887ejc.266.2022.09.04.10.31.43; Sun, 04 Sep 2022 10:32:10 -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=@ibm.com header.s=pp1 header.b=KRkDKkqb; 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=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234971AbiIDQuV (ORCPT + 99 others); Sun, 4 Sep 2022 12:50:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53630 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230337AbiIDQuR (ORCPT ); Sun, 4 Sep 2022 12:50:17 -0400 Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D2EBC15719 for ; Sun, 4 Sep 2022 09:50:15 -0700 (PDT) Received: from pps.filterd (m0098419.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 284GN4Er022356; Sun, 4 Sep 2022 16:50:05 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=message-id : date : mime-version : subject : to : cc : references : from : in-reply-to : content-type : content-transfer-encoding; s=pp1; bh=B6Gg+IbmF96VX2gQI6DkUdr2TE7NFgdOmCAf0nr6gZY=; b=KRkDKkqbIdUggMH1M9zSc1gBHBoSJsqJ0FBnXfUCDynAbunPpV+DrBNWqfMZr+64HxDK BPqdgsS16h3kKkwQFGnSW2K1A6P91nB8NM8i+9OLyEuDd8JBqEH8lOoCHthZNZ8Znx0c 3Rqj7WpBf/qGoP1JEVrG74AhyVFIvATPFa3dfyynN8KGvokaUTbG1RaFa7v1kHZKwAwF tmDADkn5bPat8gHM5F1v7+6FW7BLEaV12FoKCILOUpyJuMlQCqg+fp2zGK23yoUEaey2 URSDwL7YyFFqpxO8HOfLVZEjIuJ0qT1oXQaf9mXnDtv5D5+5H8nhs+MxooBMRZ7MGwmL Iw== Received: from pps.reinject (localhost [127.0.0.1]) by mx0b-001b2d01.pphosted.com (PPS) with ESMTPS id 3jcyg8rbn4-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sun, 04 Sep 2022 16:50:05 +0000 Received: from m0098419.ppops.net (m0098419.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 284GfGUF011547; Sun, 4 Sep 2022 16:50:04 GMT Received: from ppma05fra.de.ibm.com (6c.4a.5195.ip4.static.sl-reverse.com [149.81.74.108]) by mx0b-001b2d01.pphosted.com (PPS) with ESMTPS id 3jcyg8rbmf-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sun, 04 Sep 2022 16:50:04 +0000 Received: from pps.filterd (ppma05fra.de.ibm.com [127.0.0.1]) by ppma05fra.de.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 284GaP0M027522; Sun, 4 Sep 2022 16:50:02 GMT Received: from b06avi18626390.portsmouth.uk.ibm.com (b06avi18626390.portsmouth.uk.ibm.com [9.149.26.192]) by ppma05fra.de.ibm.com with ESMTP id 3jbxj8s2g0-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sun, 04 Sep 2022 16:50:02 +0000 Received: from d06av23.portsmouth.uk.ibm.com (d06av23.portsmouth.uk.ibm.com [9.149.105.59]) by b06avi18626390.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 284GkZIM41419230 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sun, 4 Sep 2022 16:46:35 GMT Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id EB7D3A404D; Sun, 4 Sep 2022 16:49:59 +0000 (GMT) Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id B9000A4040; Sun, 4 Sep 2022 16:49:55 +0000 (GMT) Received: from [9.43.81.44] (unknown [9.43.81.44]) by d06av23.portsmouth.uk.ibm.com (Postfix) with ESMTP; Sun, 4 Sep 2022 16:49:55 +0000 (GMT) Message-ID: Date: Sun, 4 Sep 2022 22:19:54 +0530 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.0 Subject: Re: [PATCH v1] mm/gup: adjust stale comment for RCU GUP-fast To: David Hildenbrand , 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> Content-Language: en-US From: Aneesh Kumar K V In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: swZmHjysbqEXO6dfNDbXoGgg3e-qJxEc X-Proofpoint-GUID: KZozTIfBpPdqdGNk-_hamk5yHfyQbeXN X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.895,Hydra:6.0.517,FMLib:17.11.122.1 definitions=2022-09-04_02,2022-08-31_03,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxscore=0 suspectscore=0 malwarescore=0 bulkscore=0 spamscore=0 impostorscore=0 phishscore=0 clxscore=1011 adultscore=0 lowpriorityscore=0 priorityscore=1501 mlxlogscore=999 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2207270000 definitions=main-2209040084 X-Spam-Status: No, score=-3.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE, SPF_PASS,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 9/1/22 10:04 PM, David Hildenbrand wrote: > 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. > Can you point to the other thread ? -aneesh