Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp3732936rdh; Tue, 28 Nov 2023 02:16:19 -0800 (PST) X-Google-Smtp-Source: AGHT+IFPsa82b/pVmJ9YOlyGq0tGlZDvaXJ0nlVGhBaTrumzXfA8LTivqv8KVeLOCx0tMe+ujnUK X-Received: by 2002:a05:6a00:391d:b0:6cd:a145:6703 with SMTP id fh29-20020a056a00391d00b006cda1456703mr2973470pfb.2.1701166579485; Tue, 28 Nov 2023 02:16:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701166579; cv=none; d=google.com; s=arc-20160816; b=fUMaCE6LsqTFiFFIBgaySsWlf5cgD34N0x2l5nN208UrXqmzwjt2UMUVuFo7VVY8Sw A1chDT5rXKvlRR2w9axSZ7LUijbw+OnUUD51DcIoDI1NamnbLcmR6rF/EnQrhlc05kVJ ec6jtnyLORVwXbyUb8gL6q8oztH8ZD2nNIUE93+MkCYZ87rEQ3gl0+AOZBWdWEe7OGOa rQG0MT7sN4HKtb5eJtke95uWL6EReerZFZg87UEJxsMa8IOOJPnPKtcqNGXNftv06TaL IyhhwalR/M5yLHP6Q6fXdCTHXcCjGMsTRJt9vSP/bwoiIcM9PbJvqflLxcUlA/aVDfJD oBEg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=RTjyCNr26YnjaHfUfkRhWXzBbn6MttgwFhsaz1uKH28=; fh=k4lQAAFbN0e4YvZV81IMKjuRMz61aFxf/iJ67sWVNlk=; b=WtvSFcddN42L8BgT6/S1Mvx4HPI+zwd0bX7j+QUiCjrS3dTjXxP570wzHghQTackLy eSQlfb9EnVD4V5WpHrNcbRTQp9/xD/PV4eeeFrRX6iAU8Re6jQ9LDHQcz+AcA04H8FP/ pq9Bh6OBoa6QzD8coGNH8/WUW69behpvm7elCe6Nx3D0xoRoVtLWMp1akENb4LNYNOyf tW5Zw9wqj1QzJiw876KcDxnCEpCpUg80sGR+7U7dxSj8yc6bT728bXGTNaNLXpW/XiPe 52afPpGYcVHeBnnLI1z8IMEhqRwlvcqAYvOIwO7+jlQtCQqHkOT6UZPHt1xQVEDz5VFW JxjQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Return-Path: Received: from groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id i12-20020a63540c000000b005849fe1d3aesi11256787pgb.458.2023.11.28.02.16.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Nov 2023 02:16:19 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 2A1BF809C900; Tue, 28 Nov 2023 02:16:17 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232094AbjK1KQC (ORCPT + 99 others); Tue, 28 Nov 2023 05:16:02 -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-Spam-Level: X-Rspamd-Server: rspamd1 Authentication-Results: smtp-out2.suse.de; none X-Rspamd-Queue-Id: 950931F74C X-Spam-Score: -4.00 X-Spamd-Result: default: False [-4.00 / 50.00]; REPLY(-4.00)[] X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email 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 (groat.vger.email [0.0.0.0]); Tue, 28 Nov 2023 02:16:17 -0800 (PST) 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