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 8888FC61DA4 for ; Mon, 6 Mar 2023 02:45:15 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id C4CC56B0072; Sun, 5 Mar 2023 21:45:14 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id BFCAA6B0073; Sun, 5 Mar 2023 21:45:14 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id AC44E6B0074; Sun, 5 Mar 2023 21:45:14 -0500 (EST) 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 9D7326B0072 for ; Sun, 5 Mar 2023 21:45:14 -0500 (EST) Received: from smtpin29.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id 6817B14058C for ; Mon, 6 Mar 2023 02:45:14 +0000 (UTC) X-FDA: 80536931748.29.E5000D3 Received: from mail-lj1-f171.google.com (mail-lj1-f171.google.com [209.85.208.171]) by imf29.hostedemail.com (Postfix) with ESMTP id 93263120010 for ; Mon, 6 Mar 2023 02:45:12 +0000 (UTC) Authentication-Results: imf29.hostedemail.com; dkim=pass header.d=chromium.org header.s=google header.b=HGDh2jGG; spf=pass (imf29.hostedemail.com: domain of stevensd@chromium.org designates 209.85.208.171 as permitted sender) smtp.mailfrom=stevensd@chromium.org; dmarc=pass (policy=none) header.from=chromium.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1678070712; 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=AkxVEOnLXdzZ8oxAMds+zBzrKmQ/RUz5Y0ymy8fjSrA=; b=PL+G8qXSZwv3RQg88JE/r1hvTH+2VN0Y0SV52esLdWmh5UzTDypb2RJithkxgbjjG1PbfW 67r+U2bU0Qb8tNFoe+mp8NIY2Erv7O2BvHDqwWYgJkeljxJb6EmppQoo5T8l3X1l8NUNTq tYl+YiJuuclBgMI+DDSePT/nCNnfaII= ARC-Authentication-Results: i=1; imf29.hostedemail.com; dkim=pass header.d=chromium.org header.s=google header.b=HGDh2jGG; spf=pass (imf29.hostedemail.com: domain of stevensd@chromium.org designates 209.85.208.171 as permitted sender) smtp.mailfrom=stevensd@chromium.org; dmarc=pass (policy=none) header.from=chromium.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1678070712; a=rsa-sha256; cv=none; b=uNyDuZRj+ItuYvRnUYK1lSQh7iY9PWHPl7gaalq81DrGMyptY78W4FDKT8OGMMBaIeYMO3 gdFBj/CXd+yO2Uu3npB0RuwMK0JXf3tZqmuIqVa8l2RrHsy9XHzVHqyGwqECaqScMBA0x7 9rKogv42gpDChA8RlEQtqxRkkcOBh5w= Received: by mail-lj1-f171.google.com with SMTP id by8so8171612ljb.7 for ; Sun, 05 Mar 2023 18:45:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1678070711; 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=AkxVEOnLXdzZ8oxAMds+zBzrKmQ/RUz5Y0ymy8fjSrA=; b=HGDh2jGGctTOgHb/Q39GRM38SU7nBEdTwe+fvmwy0w8aUkYBmxGtNMUGn5Ri6WG1BM 8F5Sei844wfe1Bl0iWqEbrbiTVuVjBLDig/bdKh8N6hlII/1/i1nYGvFi30Dqa6AkdKI dLxyJNfaQz+69th1K95kd4dObvSCCDWRJEfnE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678070711; 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=AkxVEOnLXdzZ8oxAMds+zBzrKmQ/RUz5Y0ymy8fjSrA=; b=3B17ElK+vFnYpyDMR2LGXWa5IHCHoUzLOlxyHICjWkiEp0Ayp4Pv7QuGlp6fuJYzWh lO/gFKZ6ixui3XyDMnRlz2inpIlMB1VPzy8e3Pt2e7/mO09ibZtd9Qee9PqQ4PdsQdMp 7IpdTja9IcYcAPGnFVdItHlRHNZfU+hOM1lLC6XaeJZNVKIrEyw+R4NNW7ZXib9u4BHO XBgVBIdcz6X2yQPS918QDSAlvXck/IOmgyjXiCYddZBPpDq6dU7QR+GMltoaYDnWGgnI slPaMRr4t46C5okVDz/rTPK+ZjAgf85nnqUHN7IUE+y0ZnT3HE3xpeMsmyknwhSB+SA2 SW4A== X-Gm-Message-State: AO0yUKX15UmoqqK0nXYPrjkLgEXXFUwAPw98SWFa9cCTtWeL5hNBDGHX rVPfg8wPE+zXRwzjr0nWsCJMf4ISMIPAa7wg+viY0g== X-Google-Smtp-Source: AK7set/6UwLe2xvdiAfPdHv93LUIof3Ti2CMS0E5ffkC1d0PMIO3LiOXGDCjMJOQUuPgXgEC4k0In8r3kwXQ6Pgh7qs= X-Received: by 2002:a2e:a4b0:0:b0:295:b0cc:d99c with SMTP id g16-20020a2ea4b0000000b00295b0ccd99cmr2680702ljm.6.1678070710712; Sun, 05 Mar 2023 18:45:10 -0800 (PST) MIME-Version: 1.0 References: <20230217085439.2826375-1-stevensd@google.com> <20230303145258.866b985b21b3ccd9bc41bc4b@linux-foundation.org> In-Reply-To: <20230303145258.866b985b21b3ccd9bc41bc4b@linux-foundation.org> From: David Stevens Date: Mon, 6 Mar 2023 11:44:59 +0900 Message-ID: Subject: Re: [PATCH v4 0/3] mm/khugepaged: fix khugepaged+shmem races To: Andrew Morton , "jiaqiyan@google.com" Cc: Peter Xu , linux-mm@kvack.org, Matthew Wilcox , "Kirill A . Shutemov" , Yang Shi , David Hildenbrand , Hugh Dickins , linux-kernel@vger.kernel.org, "Zach O'Keefe" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Stat-Signature: 5am9tcrnn4f967etpmtfuoffhs1mpxeo X-Rspam-User: X-Rspamd-Queue-Id: 93263120010 X-Rspamd-Server: rspam06 X-HE-Tag: 1678070712-361217 X-HE-Meta: U2FsdGVkX1+sifryk5zVxmRcADlP+qzTcma4szHqn19JhF2mTUGFNUe3O5oCMVT/YaQb5zymSOynFgoXRFBOkrwOHIxk1dmSm+wo/ycxmUr3z2EShoXY/otv+v1D2e2oQNn1NQ2WOV3NUakpki/emdK3vs31X1iNBgcYWR7y1DmZpcKYPs4YJQh3MAdlXHj3hlrOI4sUzRc/uQRvjcJqjvPqYaR8q5IqofU0sfO/whExv5gQwV2omz3s2wp0n4uEIPRKypdhwbZDU6HRtAnkzcDOZad7f9kRT6S3j5BGr1cwhMbi1rXrc6bgpRqIYl+i6JmJ+jPAV+Mm89vJqingtLGRVvzJhp6bLsu+zQ2NCn0FcxHnoezf2K5A8onfcxFu2QJgXx4nIEDRHiWGhB/Utx//IsPQdCIsqsKdSmgXk+vqwkPRmH6vNMNVi0EmtBAXh/2i5z1ovpb4cEODA0v7L657Gzp+2HsY6lnRbcJLUJiQfTVJxhXGFU+mrWHFCUuZgG4uEytG4YxT0YZOSWAQ+zZvblrvw37fIbDk3ejQcukamys8HCKaXUqpZPDlrdkRY43UeKzLN1PU3oXBQ+sVGPbJ1ZA58+MNNnIEaIpLjT9cBp6mWtttrj+Wwni1N4oc0rUld+tlGu6WKGgfpZhq5qOb+5MJH3jzwvxbNwByccaTkBfku+S34BXRaoFsTuQF5M6Z8YOixN3ZRMJI2gQkKvIfllbbn8RCw0nKQVsdLQABeYnw/H3IfwbykvZWSQ93FaL6Ayfhkz0ZZztjBKmh0T27btMn/7/2b8hAlMVOASK2yFGX487iZXdFIP63ESg3pRO0HL7qqP6xUw1qWTbkKBrClDyfi1YOkrEmV/b+8keSB4t04cen3BjYLeMHsgShtE8mLFFMn39U3JE1krYXGrk82vnheDMMP2zxxzugHiysnJ3pFWhqRp18uh5ll4vbHFytWU6aQDsjP6ILg+V 9g75n41f PMA6PLyR4gb7zSRMpZizpjRBUYj4CpI/MdQpBxKdrxGvJ8gEsBjy4Mx4u6txWNW+0vqAUZPLd85ug0BdloJJ+T6Dv0noAPugJUHWERT5Ts2LqlyQuoq5ZPbcnL1vHyJQyMkj+iSxWz7D3/M1Z63cQUR5oN+lSJKMv3pWpYMaamwr6YhxK4wkMdJfFTOIk7LJEqpYL+BNi7oAvMlH8OdwL1nzwr89yiWiw4R+iNQo7ayPxW+C8CKmT/X0ksQp6F/LCBq2dPycKkiInVKviqKwSv1LvhgwTnRzkCxuOI67BRCZd9J4qWTxpXTjUU3HdGgIA/6BtewEF43nyyxvvGzPJARGYG3PA8YzqfsJYCcY9OA91PdvfOQ2WlBR4zfPuxC0WVG0OSDeY9jMJDWOrCUosK4QRrgUsxUuF4DD0GJyZSWlc/eqxyBpnTFf81feDnpJ+lF8gSPunfKmAZeaARErZdsO+noj+v4wOJkUnQR564MoqkZU= 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 Sat, Mar 4, 2023 at 7:53=E2=80=AFAM Andrew Morton wrote: > > On Fri, 3 Mar 2023 10:35:53 -0500 Peter Xu wrote: > > > On Fri, Feb 17, 2023 at 05:54:36PM +0900, David Stevens wrote: > > > From: David Stevens > > > > > > Fix two races in khugepaged+shmem that cause issues with userfaultfd = and > > > lseek, respectively. > > > > > > v3 -> v4: > > > - Base changes on mm-everything (fba720cb4dc0) > > > - Add patch to refactor error handling control flow in collapse_file > > > - Rebase userfaultfd patch with no significant logic changes > > > - Different approach for fixing lseek race > > > > I just noticed this one hasn't landed unstable, so I guess I just poste= d a > > trivial cleanup that can conflict with this so it won't apply cleanly.. > > > > https://lore.kernel.org/r/20230303151218.311015-1-peterx@redhat.com > > > > The resolution will be fairly straightforward though, and I'm happy to > > rebase that one to this since this targets a real bug so should have hi= gher > > priority. > > Even without the above patch ("mm/khugepaged: Cleanup memcg uncharge > for failure path") I'm seeing a big reject in khugepaged.c. Might be > easily fixed, didn't look. > > > I guess it's possible Andrew thought the series has unsettled comment s= o > > Andrew could just have ignored that whole set in the mark ups. A repos= t > > could possibly clarify that. > > Yes please. Lets gather the acks thus far, rebase on > git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm's mm-unstable > branch and resend? This conflicts pretty heavily with the "Memory poison recovery in khugepaged collapsing" series. This series was written on top of v9 of that series, but it looks like v9 of that series was dropped and is being replaced with v10. Which series should go in first? If we're confident that v10 of that series won't also be dropped, then rebasing this series onto v10 of that series should be pretty easy. Otherwise we could try reworking things to minimize conflicts between the two series (create a 0th refactoring series?). Andrew, what course would you prefer? -David > > Again, it'll always great to get another eye on this slightly involved > > series. Matthew / Yang were already on the list, also copying Zach for = his > > recent works on khugepaged just in case he spots anything wrong. >