Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1429633rwd; Thu, 8 Jun 2023 18:34:05 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5iqdPnE4MLoE+5XGvUPYB9ubBhpuH5As0aB9nEjemiipVsMUxAwlSzaKrX1ZM8zxPzZFtX X-Received: by 2002:a17:903:120c:b0:1b0:3224:e53a with SMTP id l12-20020a170903120c00b001b03224e53amr65889plh.20.1686274445256; Thu, 08 Jun 2023 18:34:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686274445; cv=none; d=google.com; s=arc-20160816; b=tGxEI2BSkAfyNYWsnY7syM/Df1poT4zGxaX+2TkHq6q8Sdq0lABmNg/jliQY6SU7YV 1kCItefkym4BBU4ANolJKGZN6oKGvQQjLi23zPQthvaufVRna6kojSCp2Yh2ZHf58N+x ic3eLzUY3MWkfWtSr5mPX+STR81IKwxji1QZ/JRoO959Wyc8rwcOLxhiEpGYs8gMopLS 21h5c5dw1grATZ1zkix8WSGj0RzpOryXqsCnf5tMxCms4D31eloF7yaG89Bpdpoae/p6 l9W6u3sfrJJE2O6Z1+oidfConpwxR8VBDgo3ynhhJzCZeNFaO5czmHW/Zco44ewnxs86 Yh2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:message-id:in-reply-to :subject:cc:to:from:date:dkim-signature; bh=zTm3eSBiFsuHpLmgEmMbxBID/kzy6WIASRGS/m4xNS4=; b=JIvC2U4dpYD27xJhLceWv8EWXQdylOzrf1GDtTUZPE1Fs3YmCyhjqxWNoCtXnC5bnZ xdll59NbElUYlW1FBI5idN4UEaRj/kbDhfDTs05iQuxYvF20Ja6qJJ7XGkZsG5jT8CPK ikc5NXeFNpCEtPyI2CHJXpirrgtbamQxS8yMdOm3v+uMh7B4L8M+yBtl8oPGeIYnEIe+ c+8/hAZwZXNCyilSZFFo5J513zHo03iGLT1rxvuL8rISlBnOG1lEu6dv1+L1O114Khht 8XhHU39lN4SyeiMryLuVHSOuEqF5J/PzRhg5nXtTEnezKR6bWZHJ+kUYxNz3YPyQuLBY Hz3w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20221208 header.b="W/4m2uxI"; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d17-20020a170903231100b001b2483a46cdsi1832521plh.480.2023.06.08.18.33.53; Thu, 08 Jun 2023 18:34:05 -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=@google.com header.s=20221208 header.b="W/4m2uxI"; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237411AbjFIBNA (ORCPT + 99 others); Thu, 8 Jun 2023 21:13:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34262 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237379AbjFIBM6 (ORCPT ); Thu, 8 Jun 2023 21:12:58 -0400 Received: from mail-yw1-x112b.google.com (mail-yw1-x112b.google.com [IPv6:2607:f8b0:4864:20::112b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B630A1B9 for ; Thu, 8 Jun 2023 18:12:57 -0700 (PDT) Received: by mail-yw1-x112b.google.com with SMTP id 00721157ae682-5659d85876dso10704177b3.2 for ; Thu, 08 Jun 2023 18:12:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20221208; t=1686273177; x=1688865177; h=mime-version:references:message-id:in-reply-to:subject:cc:to:from :date:from:to:cc:subject:date:message-id:reply-to; bh=zTm3eSBiFsuHpLmgEmMbxBID/kzy6WIASRGS/m4xNS4=; b=W/4m2uxIgiBxYZeqFiaOJ+t56Xk1lzeX/0joWZYYIlyVr9x1rZQ0PVY6idfgJo3YAs J06WtHIbHcuFZFi7CTRbs4r/YWp12HHJP2GIpjC6Vtuxoe9P0OFgcqDXalAZfOXD7v9f PF1TUdN6QUVjLjHU9HZGO/hqyJB/REsEub0tjNaQLQmNIjXpYIuYk+iYoQFltIweg+DY h7yV6zg9eLJCboUD4lcwwTs6Aiti1k/7W+hJoajF2B88W4XFTVhUJC0bytvim02PYS13 jSNRaWmPHUADOzQcYjUwHqikvc9EsK2V2BuWiEGpR+wVTRiltwgLI4HXCzIB2BRua0U+ cdFg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686273177; x=1688865177; h=mime-version:references:message-id:in-reply-to:subject:cc:to:from :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=zTm3eSBiFsuHpLmgEmMbxBID/kzy6WIASRGS/m4xNS4=; b=UVSSapVj1y1RVmv+xCo6QBK9LzR/L2ZGa3fhWlQOEJjhVmWp4HqG7Enl44vCFKXZP/ w/cdcFvp/huelKrBfARW93AFFTfCIwyAobGZi7NByGwIoB6vb2eTeta1UGgz/FES76Sn k6Iyfm9KoYKiv06AcNJEe3vSF4zkfebX6B0w0uCsyQwB+jvfsE2lxHgOFUb9zE0UfD0P AvI0Gt4v72awmF4UofyXjC4zZilnMejXOpOPltTtP+G5DjMWYJFF0zQP88lgek+ULGqc jF5eT/ysuMHtA8ZFoQWBArqVbM1FRLWW/uye2EDp7GbjxUIcYcBBpL1wRs4X6UVQIcSD b2wQ== X-Gm-Message-State: AC+VfDxdKgfKKspsouo8MAWWO95yWf64Lj2bxxaGLA/Jb6kA7MnHISN2 YhyQsCMM9INK+1Bw1mYhpzhUGw== X-Received: by 2002:a25:b11e:0:b0:b8e:cb88:1b69 with SMTP id g30-20020a25b11e000000b00b8ecb881b69mr1064722ybj.34.1686273176726; Thu, 08 Jun 2023 18:12:56 -0700 (PDT) Received: from ripple.attlocal.net (172-10-233-147.lightspeed.sntcca.sbcglobal.net. [172.10.233.147]) by smtp.gmail.com with ESMTPSA id b1-20020a252e41000000b00ba6ffc7ef35sm573643ybn.65.2023.06.08.18.12.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Jun 2023 18:12:56 -0700 (PDT) Date: Thu, 8 Jun 2023 18:12:52 -0700 (PDT) From: Hugh Dickins X-X-Sender: hugh@ripple.attlocal.net To: Andrew Morton cc: Mike Kravetz , Mike Rapoport , "Kirill A. Shutemov" , Matthew Wilcox , David Hildenbrand , Suren Baghdasaryan , Qi Zheng , Yang Shi , Mel Gorman , Peter Xu , Peter Zijlstra , Will Deacon , Yu Zhao , Alistair Popple , Ralph Campbell , Ira Weiny , Steven Price , SeongJae Park , Lorenzo Stoakes , Huang Ying , Naoya Horiguchi , Christophe Leroy , Zack Rusin , Jason Gunthorpe , Axel Rasmussen , Anshuman Khandual , Pasha Tatashin , Miaohe Lin , Minchan Kim , Christoph Hellwig , Song Liu , Thomas Hellstrom , Ryan Roberts , linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: [PATCH v2 06/32] mm/page_vma_mapped: delete bogosity in page_vma_mapped_walk() In-Reply-To: Message-ID: <87475a22-e59e-2d8b-d78a-df376d314bd@google.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Spam-Status: No, score=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL 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 Revert commit a7a69d8ba88d ("mm/thp: another PVMW_SYNC fix in page_vma_mapped_walk()"): I was proud of that "Aha!" commit at the time, but in revisiting page_vma_mapped_walk() for pte_offset_map() failure, that block raised a doubt: and it now seems utterly bogus. The prior map_pte() has taken ptl unconditionally when PVMW_SYNC: I must have forgotten that when making the change. It did no harm, but could not have fixed a BUG or WARN, and is hard to reconcile with coming changes. Signed-off-by: Hugh Dickins --- mm/page_vma_mapped.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/mm/page_vma_mapped.c b/mm/page_vma_mapped.c index 64aff6718bdb..007dc7456f0e 100644 --- a/mm/page_vma_mapped.c +++ b/mm/page_vma_mapped.c @@ -275,10 +275,6 @@ bool page_vma_mapped_walk(struct page_vma_mapped_walk *pvmw) goto restart; } pvmw->pte++; - if ((pvmw->flags & PVMW_SYNC) && !pvmw->ptl) { - pvmw->ptl = pte_lockptr(mm, pvmw->pmd); - spin_lock(pvmw->ptl); - } } while (pte_none(*pvmw->pte)); if (!pvmw->ptl) { -- 2.35.3