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 F0752C4167B for ; Tue, 28 Nov 2023 10:16:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233978AbjK1KQD (ORCPT ); Tue, 28 Nov 2023 05:16:03 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34534 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230371AbjK1KQA (ORCPT ); Tue, 28 Nov 2023 05:16:00 -0500 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 26C7CDE for ; Tue, 28 Nov 2023 02:16:07 -0800 (PST) Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 950931F74C; Tue, 28 Nov 2023 10:16:05 +0000 (UTC) Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 69BB51343E; Tue, 28 Nov 2023 10:16:05 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id n6+UFeW9ZWW0bQAAD6G6ig (envelope-from ); Tue, 28 Nov 2023 10:16:05 +0000 Date: Tue, 28 Nov 2023 11:16:04 +0100 From: Michal Hocko To: "Huang, Ying" 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 Message-ID: References: <87msv58068.fsf@yhuang6-desk2.ccr.corp.intel.com> <87h6l77wl5.fsf@yhuang6-desk2.ccr.corp.intel.com> <87r0ka64v9.fsf@yhuang6-desk2.ccr.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87r0ka64v9.fsf@yhuang6-desk2.ccr.corp.intel.com> X-Rspamd-Server: rspamd1 Authentication-Results: smtp-out2.suse.de; none X-Rspamd-Queue-Id: 950931F74C X-Spamd-Result: default: False [-4.00 / 50.00]; REPLY(-4.00)[] Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue 28-11-23 09:31:06, Huang, Ying wrote: > Michal Hocko writes: [...] > > Right. On the other hand we could be more aggressive when dropping the > > swapcache. Is there any actual reason why we cannot try to folio_free_swap > > even when mem_cgroup_swap_full == F? > > If there are plenty free space in swap device, why not take advantage of > it? Maybe a stupid question but what is the advantage of keeping around in the swap cache? -- Michal Hocko SUSE Labs