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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id E8D80ECAAD1 for ; Thu, 1 Sep 2022 18:07:17 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 481538003A; Thu, 1 Sep 2022 14:07:17 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 42FA78000D; Thu, 1 Sep 2022 14:07:17 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 2F8068003A; Thu, 1 Sep 2022 14:07:17 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id 219168000D for ; Thu, 1 Sep 2022 14:07:17 -0400 (EDT) Received: from smtpin31.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id EB32EAB547 for ; Thu, 1 Sep 2022 18:07:16 +0000 (UTC) X-FDA: 79864298472.31.5BB94E5 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by imf22.hostedemail.com (Postfix) with ESMTP id 881A2C0055 for ; Thu, 1 Sep 2022 18:07:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1662055636; 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=W2tBVosZJdi+ecAm8FBwm9AwoZE5y1iiOsRB8iRR70c=; b=SxZehDUGNvWOcRw4mThs0RTT6NgLBcTX1lhi2QJ8eJw1DGSaocoXoL8ZB5gljIu839iZ3v EnzffbWg2TazdgQxuSUKQfVBee+W511C49DpODj1+e0PsyhpZUC2HUTk65GzAwTsZWPO+8 BHR5PkOluy418Hx0gSnqJzIoiQS+iFo= Received: from mail-qv1-f72.google.com (mail-qv1-f72.google.com [209.85.219.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-137-xg1_ip8rNISXetBflDhcMQ-1; Thu, 01 Sep 2022 14:07:14 -0400 X-MC-Unique: xg1_ip8rNISXetBflDhcMQ-1 Received: by mail-qv1-f72.google.com with SMTP id h13-20020a0ceecd000000b00498f5b113e6so9948195qvs.21 for ; Thu, 01 Sep 2022 11:07:14 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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; bh=W2tBVosZJdi+ecAm8FBwm9AwoZE5y1iiOsRB8iRR70c=; b=Sq3E2oFdKTYAc19gtM9TTlTOPUBcdsMMWyqYIclIncMdg5J/coUpKLVTEzotxEAZ0/ 7Xp/kyCvb4SGkJZJ7OtlgF0VNHjF8dJNMqJuTJbMTReNXCZWHdEf2VaSFQlP9VP2xDGW ArbrdMr/5DOecP9Mi75J6Hw0WrW3iaj4GB8+Xy+NPN/ak64uieSpKrXFDSIU246rFMHC iOtmsfDWkIEHlMVz2QZKZ3OsHTP5h2B6+Wn2Fc/NT7d5IfkI988n8uJGNOXFwy3WY6ig W5p499XugRx0sLKyYh7+TDJWuodnClNY9ohYhvwvsjagmFJJH8sfINta31hH7uxg3cFJ YOZQ== X-Gm-Message-State: ACgBeo2kWBzQ612BsUFhRezOduJDEliZbbt2IRQh+qEuUUGUomh9mcyX 98RMXljbW0w36dK0qJnGMjRAzhkGyhwK02+gOWrX4SoOi/8ofRgnpF1Cft3fzhsxM+TVC4qxSVY 8d0sZ6OeeBko= X-Received: by 2002:ad4:5cc5:0:b0:499:2b4:8909 with SMTP id iu5-20020ad45cc5000000b0049902b48909mr19239752qvb.127.1662055634551; Thu, 01 Sep 2022 11:07:14 -0700 (PDT) X-Google-Smtp-Source: AA6agR5mUIP4VOZzlWTTQeu7Bx6rwimn4BcdAW+eSzUnzv3npqB0SZ5VHxR2LwhMMlFuX5IQwIJUrQ== X-Received: by 2002:ad4:5cc5:0:b0:499:2b4:8909 with SMTP id iu5-20020ad45cc5000000b0049902b48909mr19239725qvb.127.1662055634367; Thu, 01 Sep 2022 11:07:14 -0700 (PDT) Received: from xz-m1.local (bras-base-aurron9127w-grc-35-70-27-3-10.dsl.bell.ca. [70.27.3.10]) by smtp.gmail.com with ESMTPSA id i7-20020ae9ee07000000b006a6ab259261sm12287379qkg.29.2022.09.01.11.07.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Sep 2022 11:07:13 -0700 (PDT) Date: Thu, 1 Sep 2022 14:07:12 -0400 From: Peter Xu To: Yang Shi Cc: David Hildenbrand , 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 Subject: Re: [PATCH v1] mm/gup: adjust stale comment for RCU GUP-fast Message-ID: References: <20220901072119.37588-1-david@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 ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1662055636; a=rsa-sha256; cv=none; b=x+1/3RJ/fszye4tYDxIwZrjPDKcBOif6fneqkTBT11Ow3jkhKYd5ULcfyfj4HoBagZ0eeg /NtLnWdZl4ZbDUCJLz1Ucq+mLzMuzloRZ1HCWwMRxcV9qZTJAg58KajEDsaexbnjAs6Ngl h69JLt4qMOBO4BeE9ep+cu3RCUzo9HU= ARC-Authentication-Results: i=1; imf22.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=SxZehDUG; spf=pass (imf22.hostedemail.com: domain of peterx@redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=peterx@redhat.com; dmarc=pass (policy=none) header.from=redhat.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1662055636; h=from:from:sender: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: in-reply-to:in-reply-to:references:references:dkim-signature; bh=W2tBVosZJdi+ecAm8FBwm9AwoZE5y1iiOsRB8iRR70c=; b=r3Qt7GPfLHX0cs2ExzAREwO9G1yN6Yt6/Bip1nM0c3crIMKPmJIkU/wpqobKD5OZOpwYNk bFxIkdYt4jME62MEAwVFlMfLarjeZ+4lkDwXvGUdHFfCSd5rKpGZ8Q5aHD2exBAISWo4CR dvjnD347v2dYGGzKcBZq4P7ydwVj3+Y= X-Stat-Signature: s3odfx3tk3qqssoktaib4mzwkpscoqqo X-Rspam-User: X-Rspamd-Queue-Id: 881A2C0055 X-Rspamd-Server: rspam07 Authentication-Results: imf22.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=SxZehDUG; spf=pass (imf22.hostedemail.com: domain of peterx@redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=peterx@redhat.com; dmarc=pass (policy=none) header.from=redhat.com X-HE-Tag: 1662055636-656546 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Thu, Sep 01, 2022 at 10:50:48AM -0700, Yang Shi wrote: > Yeah, because THP collapse does copy the data before clearing pte. If > we want to remove pmdp_collapse_flush() by just clearing pmd, we > should clear *AND* flush pte before copying the data IIRC. Yes tlb flush is still needed. IIUC the generic pmdp_collapse_flush() will still be working (with the pte level flushing there) but it should just start to work for all archs, so potentially we could drop the arch-specific pmdp_collapse_flush()s, mostly the ppc impl. This also reminded me that the s390 version of pmdp_collapse_flush() is a bit weird, since it doesn't even have the tlb flush there. I feel like it's broken but I can't really tell whether something I've overlooked. Worth an eye on. -- Peter Xu