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 148E5C7EE25 for ; Wed, 7 Jun 2023 16:39:59 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 87CF46B0072; Wed, 7 Jun 2023 12:39:59 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 82D0D6B0074; Wed, 7 Jun 2023 12:39:59 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 6F4468E0001; Wed, 7 Jun 2023 12:39:59 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id 5C9836B0072 for ; Wed, 7 Jun 2023 12:39:59 -0400 (EDT) Received: from smtpin11.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id E4506C0377 for ; Wed, 7 Jun 2023 16:39:58 +0000 (UTC) X-FDA: 80876513676.11.83A7E0E Received: from mail-pl1-f175.google.com (mail-pl1-f175.google.com [209.85.214.175]) by imf30.hostedemail.com (Postfix) with ESMTP id EA36680018 for ; Wed, 7 Jun 2023 16:39:56 +0000 (UTC) Authentication-Results: imf30.hostedemail.com; dkim=pass header.d=gmail.com header.s=20221208 header.b=orm4BQQM; spf=pass (imf30.hostedemail.com: domain of shy828301@gmail.com designates 209.85.214.175 as permitted sender) smtp.mailfrom=shy828301@gmail.com; dmarc=pass (policy=none) header.from=gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1686155997; 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:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=haXOY3QmS0fTsttw/m0QvphvkCV0nGYqGozTlwd/PLA=; b=DfpQS30xfM6CLonW8JlfGE2bWt0b1r/AYrxtaXDV5sGZORvC0RFEXDfkS9TanhgwXITLHZ 8RuFYlYQcFKczYOQ0K0AOvNl64oLTOuQEhVQBG2hWVxaSMEfe8iBx16WT/l70QDotgSPwv W7NjAi0hT+KXfxS0yIAYNzfHLLU3QrY= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1686155997; a=rsa-sha256; cv=none; b=u5iqhRxIUo45TbwyLXo0XbGvBg5aRI46oIEzz1fldfX1J6+/mJbgG9xCAISF1f2cBm1Lcv wmtzBO/Zq7FeIFoNOTLThyWT5prwdsiOYlCJVMIfjQasLUrwOODErOCpIQ+pV3WHsc7pL6 cDSK7R4BRatrD3j/YIn91uXwbds/IPE= ARC-Authentication-Results: i=1; imf30.hostedemail.com; dkim=pass header.d=gmail.com header.s=20221208 header.b=orm4BQQM; spf=pass (imf30.hostedemail.com: domain of shy828301@gmail.com designates 209.85.214.175 as permitted sender) smtp.mailfrom=shy828301@gmail.com; dmarc=pass (policy=none) header.from=gmail.com Received: by mail-pl1-f175.google.com with SMTP id d9443c01a7336-1b0236ee816so6386965ad.1 for ; Wed, 07 Jun 2023 09:39:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1686155995; x=1688747995; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=haXOY3QmS0fTsttw/m0QvphvkCV0nGYqGozTlwd/PLA=; b=orm4BQQMfYCElS2J0K9B44CwqHOVtqq1UBdOIxiBGWU9Bv/G0xFghgAQ9ctWK68eTo GPf2TzN7C2H7Ia2L/Onx3ppykoBtnpejiks57TqHoXrkvvOM+SLhrsZqGPD37lYmr01j QdXpWfEM4eWE3RwiQzvKB1SL8t84Rkm8dq2owC7UGWtbcTK8qgr8eu/WnefjGJL/MzJ6 5J8AW5SkizWArXgvhTTkO7oTZc8umAjZeA04yNmNWjuDjHqm4nqM/uiAOQ/iMYiX9rqD fNi4xLdEzXj+Krf8JbfmyXbzDQXzclVBSYeEBYE2FH7GYTxqWm7W3fezRqsTdFDZQ79q HgjQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686155995; x=1688747995; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=haXOY3QmS0fTsttw/m0QvphvkCV0nGYqGozTlwd/PLA=; b=LCN6WMlNU/GeuMAsMBoB+42KiksDRwYpi0mf0hTNpYZd57xv6tsjq/HBDnYXuejZej aP/N0BrsWU2b0Gep2rhxdhcdIHWhZFZhSWGRdr6vHAdkwsNMZlDwgEfE6zw6tk5dzi5P NGXMgaalnaJMrEgIYiy3IQ+3ZFKMZMjRgNd9Jo0TG8gsAoSaRyLDoF2d1JKRp0Hfj8h6 BEuY8kezkH9nGtQ7Glh1kxdMwZx+6O7sazBbs7Z73SCZdaFAyICSlVeO5PhVpWtGYNtf 6Qk2d7JDi8O0ncPPMk4nF62H3fSxUVaeyPPPFxAokUQyfvnffKcsNbsSjTcL7vYLs88b xAEQ== X-Gm-Message-State: AC+VfDyAuT6lRzRZchIJxpqHmS9zDiSV/Ale/PDPPXe7VjSyI4050ga/ QHkibxDfhtbg1gCynV1Pu1DB1glKSl8cqT5hUVY= X-Google-Smtp-Source: ACHHUZ5ZajRbcgvECTPIMkPVc+zO5SV97dXF0sN2J3j3b0jxb1yHOOEGLewn0/yqz5ZJD/OkPXfUSJQqHx+5MBndtvo= X-Received: by 2002:a17:902:b18e:b0:1b0:7cc:982a with SMTP id s14-20020a170902b18e00b001b007cc982amr6156551plr.5.1686155995416; Wed, 07 Jun 2023 09:39:55 -0700 (PDT) MIME-Version: 1.0 References: <20230602230552.350731-1-peterx@redhat.com> <97b5657d-e09d-b3a9-c09d-eaff9fb7929d@redhat.com> In-Reply-To: From: Yang Shi Date: Wed, 7 Jun 2023 09:39:44 -0700 Message-ID: Subject: Re: [PATCH 0/4] mm: Fix pmd_trans_unstable() call sites on retry To: Peter Xu 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 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: EA36680018 X-Rspam-User: X-Stat-Signature: 6bebz1ufbg6bgtkds67gsnpbtzfzfbbo X-Rspamd-Server: rspam03 X-HE-Tag: 1686155996-727477 X-HE-Meta: U2FsdGVkX1/ADTbzJPRVuFHcS58fWjouth30fxldWvYQpp0FHE6vZ953UBiYB6mB3ltGuGV/M6P92XrlqJhE3IsegdqLp9ptXHdAEjjhFr9cORP7mt3zSZrbWAMd2XXJNt3vnwefYVNudnbsQG/KzYo9/dC6A+Ylqv6w5RxqofrDIDgLHictnxrlZzpjZHoicsL/BXEZPJGwDtkO+4Z/8HWfzZwND+7RmNFcQfy7Klj14UdzXw3df0RIPWL1fSGtcDohuZHZKrU4sasHrqnXygatng3yzjBIWCA/4QjujPqG46hoRH4SlyUxcGdjsLhzjCg9Qws/sKs7Z/N3tFVJ7M8QNJacjrPcMvCVD0EWWrtdqN2uNVOBKkQXB07WqVOGdI80R7T2YGdLz9Oy9ywL09/AXoWOW/L75/LQhdqVurSoM+u1Ll2Eyt8/pVqfPpbYCMUzNaOfF+fO+yfWPL8pKyRrHe+7ty8xE+pKvldQ3Om/oQ3PwjQflAl6fE8mEPMSO20a5JAQ30l5FkXNoELBpGtAtGf3QqaUze7ed/Hqs8kTLnAo3S99ijWRLne7KT37p/1k/9cfIvEUcqVD7DDNLF5lRCMHpvi/fGSLFG2ToY8h7enBABcyRrMerKAWdvsPjaZ4W1sambmizQ2g3+LZhpJJ4wS1GCnZDW1RSn9rgCGrEWO+ZutA+JZFDJBan86qYkAkJ9pDCND7cz7jMarylvCrj2Ym4LZ7C6K6DjTmibHNupxb+kMtqmx6U9KrLj1mgBlV9VjXaP8MK/zHOwZQlzC3CvID1IHqzQqpTxRc4KjUen82ofil53vurgCSVYOO/NZjMYrPu8q35yDE85Q8A0/ZFPjitpZl2Tk/Cx/++PAAQkKxNGeB3gQgDrpUMfTz0KqXO1BXOek+K7f2tZ7DeCEMmGqR0ucTn+haUIoK57wMLuUIXaUQgravM8DrfdDzlQKiQEn5mGxIV2FTrQK /fe9zJg9 2HxrL9DDO8K6LKgjySrDMxLBr9bQITYxBEqid3aK80xt0KvTdgAW26aJ0DmbuazYUuF5JhjOWIdkXTES03wIE6a7UBeL63vwP/IwkR7B9oueyEHaOweDuOH+zd9nl8LxzdvqQlTsTBs0bLZd/dQe9dRAof7bBeJ38zb4FsO0goOsjS0NG6+v0qeRoykBikaMzkiAejVwVCgjTtgbKGANQOOTbpIMV1ZAqeBJ//wgycbj/eIkEM7I0j5B269pPajwxDBthqkdsa8lFDH4EzDauTo1TiE2lL99hLtnS0LOtVSgR3QfasRy6ecYBG0BrdDJ4CxcYLPp3E0WzT1uhrjYTeO6eiKttBM16hBE4ul3fZJP7s/FNRn9o95L9W4FgWjGwNxjPnkdhs1rxwocNsH/QrUgK7Q7/3hZ7cE/bEhA8pqhWazU= 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 Wed, Jun 7, 2023 at 9:21=E2=80=AFAM Peter Xu wrote: > > On Wed, Jun 07, 2023 at 05:45:28PM +0200, David Hildenbrand wrote: > > On 07.06.23 15:49, Peter Xu wrote: > > > On Fri, Jun 02, 2023 at 07:05:48PM -0400, Peter Xu wrote: > > > > Please have a look, thanks. > > > > > > Hello, all, > > > > > > This one seems to have more or less conflict with Hugh's rework on pm= d > > > collapse. Please hold off review or merging until I prepare another = one > > > (probably based on Hugh's, after I have a closer read). > > > > > > Sorry for the noise. > > > > > > > [did not have time to look yet] > > > > Are there any fixes buried in there that we'd like to have in earlier? = I > > skimmed over the patches and all read like "cleanup" + "consistency", > > correct? > > There are bug fixes when unluckily hitting unstable pmd I think, these on= es > worth mentioning: > > - pagemap can be broken, causing read to be shifted over to the next > (wrong data read) Yes, it may corrupt the pagemap data. But anyway it seems like nobody was busted by this one as you said. > > - memcg wrong accounting, e.g., moving one task from memcg1 to memcg2, = we > can skip an unstable pmd while it could quickly contain something tha= t > can belong to memcg1, I think. This one needs some eyes from memcg > developers. 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. > > I don't rush on having them because these are all theoretical and no bug > report I saw, no reproducer I wrote, only observed by my eyes. > > At least the pagemap issue should have been there for 10+ years without > being noticed even if rightfully spot this time. Meanwhile this seems to > have conflict with Hugh's series which should have been posted earlier - = I > still need to check on how that will affect this series, but not yet. > > Said that, let me know if any of you hit any (potential) issue with above > or think that we should to move this in earlier. > > Thanks, > > -- > Peter Xu > >