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 8B01AC7EE23 for ; Wed, 7 Jun 2023 18:22:25 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 0B5F2900005; Wed, 7 Jun 2023 14:22:25 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 06688900003; Wed, 7 Jun 2023 14:22:25 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E4882900005; Wed, 7 Jun 2023 14:22:24 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id D0EA6900003 for ; Wed, 7 Jun 2023 14:22:24 -0400 (EDT) Received: from smtpin01.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id 9072FA0373 for ; Wed, 7 Jun 2023 18:22:24 +0000 (UTC) X-FDA: 80876771808.01.DD2D82F Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by imf28.hostedemail.com (Postfix) with ESMTP id 6CBF0C0008 for ; Wed, 7 Jun 2023 18:22:22 +0000 (UTC) Authentication-Results: imf28.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=evmNX6lQ; spf=pass (imf28.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=1686162142; 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=DQ6zuroINio1c01IojiuLixyZvJ+SrwsYpib8PCoHh4=; b=8k4h5j7zmK/kC23PZo1gbKhDRCCNXqAJOiWIIwedwxJNU7m5tBaJ4+wg1/7VmwigBCC6o1 THkTRmdHn8PVA1uIs2Hdq9yKPO9SMS1R6SXafyCWQ7nKK/PswfjnskDMMQ0nuWCpiphTCO eX+R6EzoXhVYRy0IHIllErMehdDjj0A= ARC-Authentication-Results: i=1; imf28.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=evmNX6lQ; spf=pass (imf28.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-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1686162142; a=rsa-sha256; cv=none; b=O5o6BTFzg4RslWTMxduW6x6W8PgUEJ/lqlKXawm9xl2oZNn/RG2wvUo0OjmkMsVbRsBgBb fhP4UvdodjMDQ92fn4j6HhQ1ThDdm3yshtlmg8ZmWyFyTHsUfYrA9CO7KVySmRXFKPm7yU aMhVWXeA+OIPkIVewZB/Iv71/+6skuY= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1686162141; 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=DQ6zuroINio1c01IojiuLixyZvJ+SrwsYpib8PCoHh4=; b=evmNX6lQYqTBkWPl9iDi6RLvqQbVU5VxVnd94x6KTx+XrA+Duh37SiZjSvNgiz76ChplJC iM0f+cSDSKsyHh8blDV7bJ2Zb6MlNIru8CHQ+fTh5gGJXWU9S3XzHeIUFvY27Dz3+C8DTY IswLggyYWkuxWJr3NP94sEWt8sehv/4= Received: from mail-qt1-f199.google.com (mail-qt1-f199.google.com [209.85.160.199]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-73-_x5AVKUyNrmcBAyrEVcSeg-1; Wed, 07 Jun 2023 14:22:20 -0400 X-MC-Unique: _x5AVKUyNrmcBAyrEVcSeg-1 Received: by mail-qt1-f199.google.com with SMTP id d75a77b69052e-3f6c58d57adso11776501cf.1 for ; Wed, 07 Jun 2023 11:22:20 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686162140; x=1688754140; 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=DQ6zuroINio1c01IojiuLixyZvJ+SrwsYpib8PCoHh4=; b=fxXxLjCZ4FxPeL6gmNOscBILmr+YpwsC+pCnAhsgl7c/ZWYnFFeAaEpSRqKBW/tAuJ o+M9MzUeePcuDSbnpwF2kj+M6nnzEYZ1KXAZy2YQoIyoLlXQmQeHYAdfsOg5p9cW6M8n nnJq4T9tvEkhZlJYAMstuvAH//b9T602VCVIrpzSIfLZoj+70ZWxRmCsNE7vmxcVRRuT PYEMBOJxoqK3pcFVNlNywAsRALLUFmDHW03CcfhDJFtRGSwa9ZkS/uUpFK4l5sdCQrUZ sAoVTbb4GrRjJ+3VxHh9ZpTyEB6H7Hrv3GammIhdCTpBug/JHy/LMy1thN36wp7cvKZe LxTg== X-Gm-Message-State: AC+VfDxrZFSpZA4PYEDC2/RxKRMcPnCNIL9bXRkCWaRsPLuzYfYUlbgy hx8IPhTv4ybvKc+xEQNBfGg34WjWOQtW1Od/fvQSnOJQVntu+cNXH/4CgSYliVE271eTROuA6Or EVaWfEmGFyiQ= X-Received: by 2002:a05:622a:19a9:b0:3f6:b465:8ccc with SMTP id u41-20020a05622a19a900b003f6b4658cccmr3472032qtc.1.1686162140141; Wed, 07 Jun 2023 11:22:20 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6VsarLh9zWccCzKu6NqQJaXaG487KhdkCDF7y3mDR8vRwifniTr+jEXmQxGJvbERcYk3iHvQ== X-Received: by 2002:a05:622a:19a9:b0:3f6:b465:8ccc with SMTP id u41-20020a05622a19a900b003f6b4658cccmr3472011qtc.1.1686162139901; Wed, 07 Jun 2023 11:22:19 -0700 (PDT) Received: from x1n (cpe5c7695f3aee0-cm5c7695f3aede.cpe.net.cable.rogers.com. [99.254.144.39]) by smtp.gmail.com with ESMTPSA id l10-20020a05622a174a00b003ef2c959d1bsm85097qtk.67.2023.06.07.11.22.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Jun 2023 11:22:19 -0700 (PDT) Date: Wed, 7 Jun 2023 14:22:17 -0400 From: Peter Xu To: Yang Shi Cc: David Hildenbrand , linux-kernel@vger.kernel.org, linux-mm@kvack.org, Alistair Popple , Andrew Morton , Andrea Arcangeli , "Kirill A . Shutemov" , Johannes Weiner , John Hubbard , Naoya Horiguchi , Muhammad Usama Anjum , Hugh Dickins , Mike Rapoport Subject: Re: [PATCH 0/4] mm: Fix pmd_trans_unstable() call sites on retry Message-ID: References: <20230602230552.350731-1-peterx@redhat.com> <97b5657d-e09d-b3a9-c09d-eaff9fb7929d@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 X-Rspamd-Queue-Id: 6CBF0C0008 X-Rspam-User: X-Stat-Signature: deh7d1acw6zuzjwst44hoertwsujxi86 X-Rspamd-Server: rspam01 X-HE-Tag: 1686162142-814635 X-HE-Meta: U2FsdGVkX19z3C/4jv+U/Yrln66V5uJulCOKFV9cM1PjBHhR+F8ffnQul3fSpaK0OE29LugWpcXdQd1Y9m/T/3O4qqG0ERRfnAuoWuucBo7MVuS5btGm4DaShOjYOwlLWwWrndUFy3KwvKildnAiDz0CnEhcjal0H0BH8QXC0qXLXixr74tpIDa3LcY7231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fUIK7r624/lY2LgLPo2ppbj5wdglqYg9PBFe62agtkqJV8e8Eozyon5CPWxht+tJF0W/lW/c1BO4Ce2Y/IGZfmi1krqquVowDk0nYEdK0jICKY9nVCppEUP/oUKVRpq0z8tmHdhtKfZ0iuVFotPQPk+i2u1Ou14aOzdQziasDW737RbZvF++/VPqdK40fWWD6lcT7vBTIBRb6W4gu/Go+T146sxU= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000033, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Wed, Jun 07, 2023 at 09:39:44AM -0700, Yang Shi wrote: > I don't think this is an important thing. There are plenty of other > conditions that could make the accounting inaccurate, for example, > isolating page from LRU fails, force charge, etc. And it seems like > nobody was bothered by this either. Yes, I read that a bit more and I agree. So let me summarize after I read Hugh's series just now.. With the pre-requisite of the new __pte_map_offset() that Hugh proposed here: [PATCH 04/31] mm/pgtable: allow pte_offset_map[_lock]() to fail https://lore.kernel.org/r/8218ffdc-8be-54e5-0a8-83f5542af283@google.com We should not need pmd_trans_unstable() anymore as Hugh pointed out, which I fully agree. I think Hugh has covered all the issues that this series wanted to address alongside, namely: Patch 1 (mprotect) is covered in: [PATCH 18/31] mm/mprotect: delete pmd_none_or_clear_bad_unless_trans_huge() https://lore.kernel.org/r/4a834932-9064-9ed7-3cd1-99466f549486@google.com No way to move spinlock outside, so one -EAGAIN needed which makes sense. Patch 2 (migrate_device) is covered in: [PATCH 24/31] mm/migrate_device: allow pte_offset_map_lock() to fail https://lore.kernel.org/r/ea51bb69-189c-229b-fc0-9d3e7be5d6b@google.com By a direct retry, and more code unified so even better. Patch 3 () is covered in: [PATCH 19/31] mm/mremap: retry if either pte_offset_map_*lock() fails https://lore.kernel.org/r/2d3fbfea-5884-8211-0cc-954afe25ae9c@google.com Instead of WARN_ON_ONCE(), it got dropped which looks all good, too. Most of patch 4's changes are done in: [PATCH 09/31] mm/pagewalkers: ACTION_AGAIN if pte_offset_map_lock() fails https://lore.kernel.org/r/6265ac58-6018-a8c6-cf38-69cba698471@google.com There're some different handling on memcg changes, where in Hugh's series it was put separately here: [PATCH 17/31] mm/various: give up if pte_offset_map[_lock]() fails https://lore.kernel.org/r/c299eba-4e17-c645-1115-ccd1fd9956bd@google.com After double check, I agree with Yang's comment and Hugh's approach, that no retry is needed for memcg. Let's ignore this series, not needed anymore. Thanks, -- Peter Xu