Received: by 2002:a05:7412:da14:b0:e2:908c:2ebd with SMTP id fe20csp1327231rdb; Sun, 8 Oct 2023 02:35:07 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGIDj1ygLKM8v4W8ZIH57o98WbyEuqe2QsxqVrWlkEAUOhz18HwkqKX0V71ppRX9H2uEPsJ X-Received: by 2002:a05:6358:8824:b0:150:8ba9:55 with SMTP id hv36-20020a056358882400b001508ba90055mr12563886rwb.8.1696757706827; Sun, 08 Oct 2023 02:35:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696757706; cv=none; d=google.com; s=arc-20160816; b=K/PMhuMISox9HvSpJnuKk4sokBXG+YrHDHBfES+f6zlOAx2MI0O9oPo5ZhmpfFXUli uZf2/6a4dQgw4bMje+nfIn1p0qpSE/BN8k43BW2Fn65KnQsmAKCvwMJSzCLiUxvIT2hc lkL73gn2egsmYifXcWH3KnOJoyjBB25htZlVQAufVAswC+QyLAJ5MiSKx1NzAW9UPMRg JVGe+TNo+lbiV9Ibh0UvY/ZCGcS7wRfh/THeJc95Zsh0uCBwSWyAYigTxxC5QtqolIDO 7FyxQnDPnKbZ3pUbBL7qaVZBX8sgdW5aVAzmRuUPl+ESo6YL0eQ9AHAcY/KQBCb3NLhc 2pJQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=kBlUVQJaS2QVKhbKscoUL4NFod1x8khTjMBK7u8aW6o=; fh=0XVP1qiBMVz36bc13KB12oh9/8me9WNAkQ5RbNFhrak=; b=BwbJnaN0rgo3rO2ZDTso4NYBpEzEbvNSE74tbIbJ8E0SmMucJHlAgTkuwurahaC6wU zSPz1KRNsar3AXV/dO/hDMtSRX8LyymySv2B6xMdBp9PD2YucH6fowcmR5gLmxX4vDyg chhHpE9774PMLuaxCu7GABHdGV3f8ZJ/w7ABOzbZgIaGc6SrzKxTKLmGbAB4cUcfrFvv 2ZXdKVqD2x7oeaDjm+RA+e9pezc9innWpNRaZV6TJJlofZTHDsL3lx4oRjpeIfBBUn9b aAbdkNSdzXKSNwid/z+iopI7EOTn188lJlNg0e1BAmEMbCTiZo6XSImfCYe6GFRqljcc CdhA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=ZvqNHj8a; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id nv5-20020a17090b1b4500b002736ff3cc79si4654954pjb.23.2023.10.08.02.35.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 08 Oct 2023 02:35:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=ZvqNHj8a; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id B532280ADF22; Sun, 8 Oct 2023 02:35:05 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343527AbjJHJe7 (ORCPT + 99 others); Sun, 8 Oct 2023 05:34:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42456 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230441AbjJHJe6 (ORCPT ); Sun, 8 Oct 2023 05:34:58 -0400 Received: from mail-vk1-xa29.google.com (mail-vk1-xa29.google.com [IPv6:2607:f8b0:4864:20::a29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E9043B6; Sun, 8 Oct 2023 02:34:56 -0700 (PDT) Received: by mail-vk1-xa29.google.com with SMTP id 71dfb90a1353d-49369d29be3so1512979e0c.3; Sun, 08 Oct 2023 02:34:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1696757696; x=1697362496; darn=vger.kernel.org; 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=kBlUVQJaS2QVKhbKscoUL4NFod1x8khTjMBK7u8aW6o=; b=ZvqNHj8alv/9+LKotQHfuH+zShml24HDq8e0jJUi+ftX+PU9DPeZj+JUIaJ3NfBVlo ZMjukFeyRt1SxAuw2PgLf/wJ3tYpYDmYr8k0XbuHr8ic8Hr+zzk1gH0jCty9kCGP1D0F P3VURKLqxukX2+KKlVejmFRdPA5zR+J0WSD131pGj0wtDOXVMQDWrroJiTMZ6VA1Yvn4 z3drx7zktg8m/l/IxbaI/DV/2+pEg609lj7qx8ImGD1GUj1tRB2vmNaJDK18ghE7Esut x7tPdSPxdSVVb6itKw8RprwSE7a8GNvv2oLu0JvScd3gQUdBdVgLWOeE8yO6QfnU2MoS kF6Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696757696; x=1697362496; 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=kBlUVQJaS2QVKhbKscoUL4NFod1x8khTjMBK7u8aW6o=; b=L0DJIVlSz/Lh69l9r1UgWU1zneZgtbwQto7tT0WsgEVgsUtIRc7m+XZMoD2DbrEgDJ C8iMZa98HF0UcpUJI/bY4EwufVo4VgASi+5r8Sdx2MGgBOLxBtOuPeiWarxq+zy0gBAD jGO+yOq2cZmPDu2DC9PZh1JQYORsvvGoiLDtsKp7Wyhq2iCeiG1MdjFuCG6HayuffI2+ 2Q/Y0bljJIvE82hwoDOCrFGeBYycLthEbnXi1c0iylWgP4c4Yx2WTOiP8RjJ4B2mTYEo 91sw8tPG5rzqPJVgyuOdc7CmzsxBe7gMAqR8JObtLRZiW5P2ro3P7JH74bVD7C1ScMyV /lKg== X-Gm-Message-State: AOJu0YxexSNbAePnpfFRqR/a0/cQob8CeSmOLEzknh/SD2wVAwdNLnfh MM780F3uUdHlltyw1kCl8kxs+eOt6FGwSvtskfBzQaghfSN6clzU X-Received: by 2002:a67:f5cb:0:b0:452:6b50:1e7e with SMTP id t11-20020a67f5cb000000b004526b501e7emr9290513vso.35.1696757695971; Sun, 08 Oct 2023 02:34:55 -0700 (PDT) MIME-Version: 1.0 References: <20231007130905.78554-1-jianlv@ebay.com> <87mswtkj8x.fsf@yhuang6-desk2.ccr.corp.intel.com> <87il7hjzdp.fsf@yhuang6-desk2.ccr.corp.intel.com> In-Reply-To: <87il7hjzdp.fsf@yhuang6-desk2.ccr.corp.intel.com> From: Jianlin Lv Date: Sun, 8 Oct 2023 17:34:44 +0800 Message-ID: Subject: Re: [PATCH] memcg: add interface to force disable swap To: "Huang, Ying" Cc: tj@kernel.org, lizefan.x@bytedance.com, hannes@cmpxchg.org, corbet@lwn.net, mhocko@kernel.org, roman.gushchin@linux.dev, shakeelb@google.com, muchun.song@linux.dev, akpm@linux-foundation.org, yosryahmed@google.com, willy@infradead.org, linmiaohe@huawei.com, wangkefeng.wang@huawei.com, laoar.shao@gmail.com, yuzhao@google.com, wuyun.abel@bytedance.com, david@redhat.com, peterx@redhat.com, vishal.moola@gmail.com, hughd@google.com, cgroups@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, jianlv@ebay.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Sun, 08 Oct 2023 02:35:06 -0700 (PDT) On Sun, Oct 8, 2023 at 4:26=E2=80=AFPM Huang, Ying w= rote: > > Jianlin Lv writes: > > > On Sun, Oct 8, 2023 at 9:17=E2=80=AFAM Huang, Ying wrote: > >> > >> Jianlin Lv writes: > >> > >> > From: Jianlin Lv > >> > > >> > Global reclaim will swap even if swappiness is set to 0. > >> > >> Why? Can you elaborate the situation? > > > > We reproduced the issue of pages being swapped out even when swappiness= is > > set to 0 in the production environment through the following test progr= am. > > Not sure whether this program can reproduce the issue in any environmen= t. > > > > From the implementation of the get_scan_count code, it can be seen that= , > > based on the current runtime situation, memory reclamation will choose = a > > scanning method (SCAN_ANON/SCAN_FILE/SCAN_FRACT) to determine how > > aggressively the anon and file LRU are scanned. However, this introduce= s > > uncertainty. > > > > For the JVM issue at hand, we expect deterministic SCAN_FILE scan to av= oid > > swapping out anon pages. > > Why doesn't memory.swap.max work? The main reason is that deployed nodes are kept on cgroups v1. > > -- > Best Regards, > Huang, Ying