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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 180BFC4167B for ; Mon, 27 Nov 2023 02:36:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229850AbjK0Cgp (ORCPT ); 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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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