Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp2748404rdh; Sun, 26 Nov 2023 18:37:02 -0800 (PST) X-Google-Smtp-Source: AGHT+IFtQJ81G91KWamtIbX8CfE+g/kQrMIgFgBqe2nTL9rW0QhoB594WSrGvvN4Ht2a9j5VFpIM X-Received: by 2002:a17:902:d5cb:b0:1cc:5a1c:3d94 with SMTP id g11-20020a170902d5cb00b001cc5a1c3d94mr9436773plh.18.1701052621833; Sun, 26 Nov 2023 18:37:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701052621; cv=none; d=google.com; s=arc-20160816; b=QGhrohfc73YP+TQ6eIMsGMU74KIjVgBVsfsQruSdFMovXgMA12yVm7l+T26nX7QkUg IAhCms8/hFPTjm6YWhB72kkClPLVbmTT+HXjFrHNd/zgCcg0lTAFulWwzXqzBighnwM8 QY79hRYkoIwrCrq+5ZlZe70YvFqB4itrT7Zq2H7ZADJyOTUx4SIQM2QMhRtPIf50ESKj tUntdyIaXRhRGS+AJgfO0rE833tK6QOE4LocLqWR48GdxB4UCVqt43QPOsIE1wJyXipB ujqI0+hsm3p7Ot3FVP8mmeELoczGQyJkW3GxXKOpg+Tm0GSOY07o6MtO2sCku/vOBdZF z0mw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:dkim-signature; bh=WkJuTMj7NJk4vRVr+ExKsNekJBU15U09Jae1JZ3JnAw=; fh=K9rEoWDMAWfXwhDkRRH3hTLfIbf9SOuugY+VGBQ0Q2A=; b=Ar0urCfjNCHP4ljaQ/TU/E6bjk/nIwIyIH88Vo/CvDFYR8dPhn0tzLSqRxFkR8PIl0 er7xBHh66zsNG6rsCLX6YfgMqm4+4mTZjQ2SDeup6M1CNc2HoL8A76O5QjRvBlpGvIiF EG2MwXd3MXqwXWF5Dkrm+O5/apPwWdAhjQFY6L8nd03KDmGdhoFxLBD8G9iwzbZRVQAo 2TtHTC83iMdXsopQa1Avdh2KlLbp2G2QIilhhEkgWez3NiESzdd2Qb3/bjfA+Bk6e+rt X1euJVRZg+aE5cB+Q7KF5xwjKxOhbVrRasailmm+DE+S6fdB54AJwivZ07qVMBhhLFvv 0KBQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=jNEUHckx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id v5-20020a1709029a0500b001c604fdbb14si8187665plp.81.2023.11.26.18.37.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 26 Nov 2023 18:37:01 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=jNEUHckx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id DAD3480658DA; Sun, 26 Nov 2023 18:37:00 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229502AbjK0Cgp (ORCPT + 99 others); Sun, 26 Nov 2023 21:36:45 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58738 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229379AbjK0Cgo (ORCPT ); Sun, 26 Nov 2023 21:36:44 -0500 Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.115]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A2A2692 for ; Sun, 26 Nov 2023 18:36:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1701052610; x=1732588610; h=from:to:cc:subject:in-reply-to:references:date: message-id:mime-version; bh=Vdreomub8NHFmoat9JWzIcBhL7kgSS2yHmpZZrgfHJA=; b=jNEUHckxVpqJomvGJjONKHOtBzuRF7uq4p2p89YtpCkkySkjOuNm8m/P r/KxxKdNYoOnO5AoypBED5FJo9RWZMXqw8GQXIjJqIME+hqDAIPrbwK/4 7XwaOkHk4JX34A4bFOezkcJv5iVzBE9TO/Z0MLHhypF57kzN+vusW6vQc HYAg4BOEKTu5AY69NzKiU9krXY8prcMMi4OFe312Wrq9N+8P55I4UkA9J YKJAgKnIq+yvTzAL18diodm6dH2Nw7p1WF0D8pJCzBvUU52r5NG/ymlFE 2NIOscAFqGcVKjMTTBP28Z4nXbuSHTtxSkhDatCIXfBV9oswXTagKEgiX w==; X-IronPort-AV: E=McAfee;i="6600,9927,10906"; a="392379442" X-IronPort-AV: E=Sophos;i="6.04,229,1695711600"; d="scan'208";a="392379442" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Nov 2023 18:36:50 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10906"; a="941426287" X-IronPort-AV: E=Sophos;i="6.04,229,1695711600"; d="scan'208";a="941426287" Received: from yhuang6-desk2.sh.intel.com (HELO yhuang6-desk2.ccr.corp.intel.com) ([10.238.208.55]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Nov 2023 18:36:47 -0800 From: "Huang, Ying" To: Michal Hocko Cc: Yosry Ahmed , Liu Shixin , Yu Zhao , Andrew Morton , Sachin Sant , Johannes Weiner , Kefeng Wang , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v10] mm: vmscan: try to reclaim swapcache pages if no swap space In-Reply-To: (Michal Hocko's message of "Fri, 24 Nov 2023 17:30:49 +0100") References: <20231121090624.1814733-1-liushixin2@huawei.com> <32fe518a-e962-14ae-badc-719390386db9@huawei.com> <87msv58068.fsf@yhuang6-desk2.ccr.corp.intel.com> Date: Mon, 27 Nov 2023 10:34:46 +0800 Message-ID: <87h6l77wl5.fsf@yhuang6-desk2.ccr.corp.intel.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=ascii X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE 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, 26 Nov 2023 18:37:01 -0800 (PST) Michal Hocko writes: > On Thu 23-11-23 14:15:59, Huang, Ying wrote: >> Michal Hocko writes: > [...] >> > Yes swapcache pages are indeed more complicated but most of the time >> > they just go away as well, no? >> >> When we swapin a page, we will put it in swapcache too. And the page >> can be in that state for long time if there is more than 50% free space >> in the swap device. > > True, but why is that a problem? If you encounter such a swapped in page > on the file LRU then the page should be referened and as such should be > activated, no? This just means that anonymous pages in file LRU aren't temporary or short-term. So we need to consider that. For example, the original method to balance between anonymous pages and file pages need to be re-designed. The anonymous pages are considered hotter than file pages in general. -- Best Regards, Huang, Ying