Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp1268756rdh; Fri, 24 Nov 2023 08:33:48 -0800 (PST) X-Google-Smtp-Source: AGHT+IGblTDovP7HZSMbGMvvMvWCK11VST3HFDvHa7JxGQ5KRVUxidYvabg888WzbVWhqX4lGZ3G X-Received: by 2002:a17:902:968f:b0:1cc:446c:770c with SMTP id n15-20020a170902968f00b001cc446c770cmr1025237plp.33.1700843627601; Fri, 24 Nov 2023 08:33:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700843627; cv=none; d=google.com; s=arc-20160816; b=iS4VUP9K6laCqTiCjaYxK+00XvYOLY07LSstqSkJB1udyR20gZPks9hx/rZfyidNcJ YLi7l+lLt28zN5KnKZrL2D1JHSA7b1pXby/FyRIZRp/nmhauMbdahZNl/6LnX0xGKSjy SFjcLLrGxgZ9ZBXTsfUDh1MWFbAMx66WulEuJOUcufe9IqSB0s3Q9UcK/Ug2eKvgKMkp Dlw6+f4GLtYd5C3P7VYIvhmIVEpG8a++SLDyqL9G8WjEz/uPqdHV9YEHDyaeOXF99ES3 kLHXLx6F47ypNR0Jlhhwb2b7F2IvyQN8yu2VYIYsFH85YM6AzYnPfyKnhsFWDVQeLQdv EUaQ== 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:dkim-signature; bh=N2E9xKXVJXiXiZeMZ6ZTNOzlCXC20DQVQxf99ZeOw5A=; fh=k4lQAAFbN0e4YvZV81IMKjuRMz61aFxf/iJ67sWVNlk=; b=YreKGKuQ6osKXheXKjBEbxJjw9QWeZdQU4oZlQuF066SRdhS4G/IpTHM64SrnV21NQ 7asyG6PIWWXAC7wGeauZrpgIQOjVOlpJDmkRaecKrY25MSz/WlyYgByAvsnP76hu/SbK LV/8WxIVjj6sldpqvbsufnSC/7P1R046WmJBvZOJk5R1KWhZ9Xchc7sgAY14AT+RLKvO 43Z+VnLRAn/PUvLWLaN5amEi839Y14XST42y96plYJBCUGZCSMBHdMXP6skzNZokA0D6 dK9HjZW8t8fqTKVFqur25obm+2u9V2gjdI7gpBOJsIXUgFnLiW/8En5olhQu4kdrH6fo HrUw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=Rh+hyci6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id lv6-20020a1709032a8600b001cc55215729si3989070plb.363.2023.11.24.08.33.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Nov 2023 08:33:47 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=Rh+hyci6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (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 lipwig.vger.email (Postfix) with ESMTP id 9555B805B2EC; Fri, 24 Nov 2023 08:31:09 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230104AbjKXQar (ORCPT + 99 others); Fri, 24 Nov 2023 11:30:47 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44434 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229741AbjKXQaq (ORCPT ); Fri, 24 Nov 2023 11:30:46 -0500 Received: from smtp-out1.suse.de (smtp-out1.suse.de [IPv6:2a07:de40:b251:101:10:150:64:1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ED09719A3 for ; Fri, 24 Nov 2023 08:30:51 -0800 (PST) Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [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-out1.suse.de (Postfix) with ESMTPS id 789CD21B68; Fri, 24 Nov 2023 16:30:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1700843450; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=N2E9xKXVJXiXiZeMZ6ZTNOzlCXC20DQVQxf99ZeOw5A=; b=Rh+hyci6Ju+rXK0CAxSO7ua4ILoHzwgfrq4O9y3ailEltj1Qo+7Hx3PLsCib4s5RInhm1q U03QuXSU3zI8RBDQ2vw+5mdBlGPUmTJiHHr3UZ4SygKnqSmi+Shqos7coUwiPATrPQx1sH rB/luNfpj+uZFAVpecwXh/D8EcLc2Qs= 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 4C9BB13A98; Fri, 24 Nov 2023 16:30:50 +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 qniwD7rPYGVDbwAAD6G6ig (envelope-from ); Fri, 24 Nov 2023 16:30:50 +0000 Date: Fri, 24 Nov 2023 17:30:49 +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: <20231121090624.1814733-1-liushixin2@huawei.com> <32fe518a-e962-14ae-badc-719390386db9@huawei.com> <87msv58068.fsf@yhuang6-desk2.ccr.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87msv58068.fsf@yhuang6-desk2.ccr.corp.intel.com> Authentication-Results: smtp-out1.suse.de; none X-Spam-Score: 6.90 X-Spamd-Result: default: False [6.90 / 50.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_SPAM_SHORT(3.00)[0.999]; MIME_GOOD(-0.10)[text/plain]; RCVD_COUNT_THREE(0.00)[3]; DKIM_SIGNED(0.00)[suse.com:s=susede1]; NEURAL_SPAM_LONG(3.50)[1.000]; RCPT_COUNT_SEVEN(0.00)[10]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.com:email]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; MID_RHS_NOT_FQDN(0.50)[]; RCVD_TLS_ALL(0.00)[]; BAYES_HAM(-0.00)[14.65%] X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,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 lipwig.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 (lipwig.vger.email [0.0.0.0]); Fri, 24 Nov 2023 08:31:09 -0800 (PST) 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? -- Michal Hocko SUSE Labs