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 03766CD4F5B for ; Thu, 5 Sep 2024 08:20:13 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 80B296B0178; Thu, 5 Sep 2024 04:20:13 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 794A96B017B; Thu, 5 Sep 2024 04:20:13 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 1C7186B017A; Thu, 5 Sep 2024 04:20:13 -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 EF5A46B0178 for ; Thu, 5 Sep 2024 04:20:12 -0400 (EDT) Received: from smtpin14.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id B477A1A09CE for ; Thu, 5 Sep 2024 08:20:12 +0000 (UTC) X-FDA: 82529987064.14.8333A39 Received: from nyc.source.kernel.org (nyc.source.kernel.org [147.75.193.91]) by imf16.hostedemail.com (Postfix) with ESMTP id D6DFD18000B for ; Thu, 5 Sep 2024 08:20:10 +0000 (UTC) Authentication-Results: imf16.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=mLDBEKj8; spf=pass (imf16.hostedemail.com: domain of chrisl@kernel.org designates 147.75.193.91 as permitted sender) smtp.mailfrom=chrisl@kernel.org; dmarc=pass (policy=quarantine) header.from=kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1725524361; a=rsa-sha256; cv=none; b=JPHwrP1N/I+5f82CRlq3O+oDzaOk/dpQz2hatuMy4XqaGNAu7E7OUzb/vcdf/9u7/Sqfab auItrVV9qhsVD3QiuaY8nCFX8M4I8Xr+QnFVgvnsIPTYJogjQ+7/v6l42ADjqN2V8atX3J HvdsT1iZXi3AOvjtVMVm1VXQ/hYbQjY= ARC-Authentication-Results: i=1; imf16.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=mLDBEKj8; spf=pass (imf16.hostedemail.com: domain of chrisl@kernel.org designates 147.75.193.91 as permitted sender) smtp.mailfrom=chrisl@kernel.org; dmarc=pass (policy=quarantine) header.from=kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1725524361; 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=hNS1xguVDWQNKTijPRMZFqq16vpbFfxwaPirgEgkMfU=; b=zkE7VjWVCKzVRw+CJWPyUYXBZC9NKfZJgazFVE4HvjfubeX6SK384F1M0yMQ0ucjIzLOHK xr5jdE4ijjn98hbsIUjM2xMsx6OSdM8fP5ZjgAsFl01pVl7qMa30V7VzR1N0q/5zHxhLOh 7hAh/R62KKj/ImbFvJw+p/8MPMroiR4= Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by nyc.source.kernel.org (Postfix) with ESMTP id 049FDA44101 for ; Thu, 5 Sep 2024 08:20:03 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id CCF23C4CECF for ; Thu, 5 Sep 2024 08:20:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1725524409; bh=hNS1xguVDWQNKTijPRMZFqq16vpbFfxwaPirgEgkMfU=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=mLDBEKj8DjmR0uwBepN3z0CvvV0bP5kGO7Bdg3m4mq7lu9BtdXYc/JybNf6kjFR05 UTMJxmSt+B8F8pKOHUZPKpMYv6rDaPheJkzV5C3CC4xfyxjj7LH9tbxYS3KvlEykCy 7nDRAedWeANwjXoggI5uUFGwsr62NvMoME0s1I9VFiFbvmDoFY+cK+NUU+4Cn7Bwy7 QnjokF7D50+76sov9Rho6uDo8b21Xnqlfybd/GD4YcflV4Cpiu+EreOWjLDRyjx7DJ 8wq6aWky3xaHwAiIUtr5WVA1BLdijowgx0t93ZQMhLATt+S4P0x5iGd3uHkCSFYXST T49iwcpP6M5Lg== Received: by mail-yw1-f171.google.com with SMTP id 00721157ae682-6b747f2e2b7so4367747b3.3 for ; Thu, 05 Sep 2024 01:20:09 -0700 (PDT) X-Forwarded-Encrypted: i=1; AJvYcCXqq2Fbeb90om8fxeaq8eVKBOdHU3BmfpVnrm6e7Yl5K/lw6MVBNw0CwGuKSGIai+XFT0OEEcJV5w==@kvack.org X-Gm-Message-State: AOJu0YzE/B8r6htGNTpKfPgPigaKYaBwmg0WjhpOhzDW0ZYzGimWDSyk d9q+p3wLdfbjQeB6DTZgOQ2l0gUIBeNTegLD9v+O9bsMU8aOuGMlU0HQukBOPkYV/twyHBQx6LX j5g21Y3XVS0prFm9+AgEBnZI+6Un0XgqvVX8MtQ== X-Google-Smtp-Source: AGHT+IFXtwS0nG9o30m6bnG6CPrX+SPf8hVqmtejLkuUgeL2gu2BYQwyAbAfe5vGtSdSEIo1Ada6GvWoqN183ETy2Ds= X-Received: by 2002:a05:690c:fd4:b0:6ac:f8ac:7296 with SMTP id 00721157ae682-6daf484a7f7mr100310507b3.1.1725524408953; Thu, 05 Sep 2024 01:20:08 -0700 (PDT) MIME-Version: 1.0 References: <20240904-lru-flag-v1-1-36638d6a524c@kernel.org> In-Reply-To: From: Chris Li Date: Thu, 5 Sep 2024 01:19:58 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] mm: vmscan.c: fix OOM on swap stress test To: Thorsten Leemhuis Cc: Yu Zhao , Andrew Morton , yangge , David Hildenbrand , Hugh Dickins , baolin.wang@linux.alibaba.com, Kairui Song , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Linux kernel regressions list Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Stat-Signature: i1rqpugdjquk4z74grypsjmr8p9ur55h X-Rspamd-Queue-Id: D6DFD18000B X-Rspam-User: X-Rspamd-Server: rspam10 X-HE-Tag: 1725524410-166898 X-HE-Meta: U2FsdGVkX1/de4ltGUSSpajy7c9Dw1NPTRMgX1QtHkqh/87c6UVh8iK2U8RWZmnCV2ZkDIu0qDbaYQXi6UT3Looew5UHT/3jSjAphj4Jnd6crMImwymzl8dF9G5sQlBK0hieTTLNs567I08RfcxoUZ7IMsnYWyvbOEo7AXT8YDuB9iVcb5goFBml7UOyiRMFmf1RWgGstH9iyDGslAwgJod5my+sGX6a2KgiPEokkazomgXiIQQWI278Kn2B4sHGuw+u48VqqttDurYOqDWa0NHqOP9sJeVatg33YbU5Y9OsjIKhU1PzCaDUXc47ydFpW79pnt/sQtZ7EmHd+usOSe/pJOyI94Uqo65pjnl+pmVoRdx6eZ14OGOvnIajA2iQ119Of7JarSt0M7jcEKgRiJnFwDanDM+gBA3yvPoWGhA+2NC279tSqNOicfEYGuVznM8EuYVlPu9lkJWJ+D7p+kVPY888N/CbUb1K6mvMWgI218qWBDbo6btkHCd4kN4aLZxTKK3gVlI6nWXvC2fRkq8nfqIXhGyjkOuF65qgYCBaKjeSsCRPwL9mxe/zLY8wBFNlqSeU5tvCBdlfJNAWkkC4UUCjvWiK+y0uzl5VozpxVazbaeK9Lr1zvElvqKTG5B0SaWgCb/HtGR3nMJuF24QR0m+Kr0WrjVqW6lGK5v3alEZZ1wFAK9XryIG4njgfxUq3uWYakJLCvquUym0NdxxnP7rYRY0p1nxGfY45T4cQ2gzZGysqjaFd1n+wuFZ4WQjJtHE65Ok0/LJnWteO20IYS9iyMAdLYVZqVEyslsxSp7iQ8ZtCQnoUC4Q5DWZYichehQQF4vBe0BghLBMT74XYnyVN5ErYXO83g8JrLMnWYbuTliCB/6DFwe0JCcW6CNPC6ljHNSjsJkrkKNCbZLFKomWSbFiQwoURV+bgK8jrOYVFXSVQfFANMw6uPT2eL2SJoLIql9dClV45049 1agCyiRk e9/Uu+a85stqiWDfDeOMzqBozBnClxzZ8FiZlUurs+SzGGaRcpZOlwy+CmB0UBe/6Yrm3M+5VbCYN+jTeoD7ZhzPNQEiK3+BrnW84tGvHtQsWPjZFoMj+2AUoI154QSO79RqeXIlcvfiQSe4iLRqoPX0/pQI24a5gAH1wn0qqIywGixld0RUJEOvl2wz43O0yzi9hbjxRcm4RmTalcZGhg8VOH1zsOg9JW/CjlUEekCrw+h3W90acRWJjuYKsxPKzbat0drmOrn9errjzv28wXV3PRwDh+/xPju/LhehNP09mckzOPgXa1Yora+yVxGr1jnltrgpafbyDfVl4g9bs7Gshfl96tmm5Sa2lLnZXRn1d3ogGmisfJwZid671zexVx1DjXs7OsM7pDhjqx0QzD4scfbGm2EkWpO05mMh4GB0h1po= 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: List-Subscribe: List-Unsubscribe: On Wed, Sep 4, 2024 at 11:54=E2=80=AFPM Thorsten Leemhuis wrote: > > > > On 05.09.24 08:42, Yu Zhao wrote: > > On Thu, Sep 5, 2024 at 12:21=E2=80=AFAM Chris Li wr= ote: > >> > >> I found a regression on mm-unstable during my swap stress test, > >> using tmpfs to compile linux. The test OOM very soon after > >> the make spawns many cc processes. > >> > >> It bisects down to this change: 33dfe9204f29b415bbc0abb1a50642d1ba94f5= e9 > >> (mm/gup: clear the LRU flag of a page before adding to LRU batch) > >> > >> Yu Zhao propose the fix: "I think this is one of the potential side > >> effects -- Huge mentioned earlier about isolate_lru_folios():" > >> > >> I test that with it the swap stress test no longer OOM. > >> > >> Link: https://lore.kernel.org/r/CAOUHufYi9h0kz5uW3LHHS3ZrVwEq-kKp8S6N-= MZUmErNAXoXmw@mail.gmail.com/ > >> Fixes: 33dfe9204f29 ("mm/gup: clear the LRU flag of a page before addi= ng to LRU batch") > >> Suggested-by: Yu Zhao > >> Suggested-by: Hugh Dickins > >> Tested-by: Chris Li > >> Signed-off-by: Chris Li > > Thx for taking care of this, Chris! > > > Closes: https://lore.kernel.org/56651be8-1466-475f-b1c5-4087995cc5ae@le= emhuis.info/ > > FWIW, no big deal, but that ideally should be (in general and for > regression tracking) the following instead, as that link above is just > at the end of the thread with the report, but not the report itself -- > and that is what often needed when someone needs to look up the > backstory of this chance sooner or later: > > Closes: > https://lore.kernel.org/all/CAF8kJuNP5iTj2p07QgHSGOJsiUfYpJ2f4R1Q5-3BN9Ji= D9W_KA@mail.gmail.com/ Thanks you Yu and Thorsten, I just submitted the V2 to include the Closes tag. Technically it passes midnight here so it is another day I can submit another version :-). Chris