From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f50.google.com (mail-wm1-f50.google.com [209.85.128.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 974E63DC4BC for ; Mon, 27 Jul 2026 08:19:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.50 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785140398; cv=none; b=nUlNn6fWM6X0q6iJpNzQx5Opb+tfoY4GHd9+NYwmq2MPBhkvLIHdsYO6d6N+QtnObfwpcf/u4WxOZ2M9wGNe4eKOxLZSib09UGMuCZJRYGHGveIdC3lyVb6iMPmfW2ZR7ZxI930m80OMx+OXGJ3xPlftL1HRy+H8y5oZFeM1kho= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785140398; c=relaxed/simple; bh=8idN3NhwHjJd1FQIsR38P+mGFevJwBW5zZmyefv/lzo=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=BZokPniFYph00VwSnyJZIxwpvukc6MejozCVemVSLXa364Jv1s9AN7apt9Y7tp7L7Xl1ADmdCK74/Nu+Z9UaLQsc/vIda6uQix8N7oPP5ooN6IuegmxHIOckCSjL4cbANIM96PRI1M3DiTI+CW60Qo2yengAh6pFJ3Zje5cOBSQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com; spf=pass smtp.mailfrom=suse.com; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b=SRuPwbMR; arc=none smtp.client-ip=209.85.128.50 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b="SRuPwbMR" Received: by mail-wm1-f50.google.com with SMTP id 5b1f17b1804b1-4955de8797cso14505855e9.3 for ; Mon, 27 Jul 2026 01:19:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1785140395; x=1785745195; darn=vger.kernel.org; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:from:to:cc:subject :date:message-id:reply-to:content-type; bh=3ADtoclqK+MoHDwfgYPV0XT59G0S5UqppnClfzEaKuk=; b=SRuPwbMRtSioD9baJov7o99vMij0MEolVe7JRpXPRlKHCsXFETmnGpBH3c/SANLeHK vE1+/DaZpuKUVo3WqbqVTDdH/tM9dXyMtbfX7HvVfU54v7byK0vSm+wypZRVGqzO66Ct QX5SPSDoCCCeIqqfyumcew69UJX69ApdiVT/mKTqSMwhJDqzFY/q0esCAsFQxsDouYjG cGUVgfUPeFHaBCLNdFOIS5GTWAQaAvEP+zaFYkPi8v7BCPTxxxUeJaG9N6L2YBL7CyWy DSCM1T5pBoJrzCkD3JDJY1GMpG20o4LDYXgr8/jrjMC7cb5A0bm6ZhmvvqePf8u2GuDQ zTFQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1785140395; x=1785745195; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=3ADtoclqK+MoHDwfgYPV0XT59G0S5UqppnClfzEaKuk=; b=ddEWtnutf0DU4qh5bcOesD44mm0931bXihUTq3HYZPNKU/6C3UmZcsLz39p4VrHZiq zEI7xCx+pHawIvs993anM5Ub/vFaKZ8wGM2fTiCsOCnGvxevA1YqZ8u1ua9lTbrrWl5O CDmGOS2GbzWpMueopucpWt/bpnP8rCqha+WWEAzQBSYWaLYWYb2gsxytLn7oCJ5/Qp9v 4Zl4T5oevInNM+QdAuNOSqYJIbMqbTv3LKydcyXTgDoHcgRweCw9s8308+HusSd+edl0 WBZzl2q9uwbMkzXayNr36SH63+p1FDx6MwK4whrs1bS8fCqpMADvnBhFeIP+OYNFsXE+ 5chg== X-Forwarded-Encrypted: i=1; AHgh+Rpv6OTXyLrhTHoIQuD5y37W+M+r1wdjRVEDSGCErQVMw7YFq2+Xs2iXQ54RKq5zfAo9bu0p4we/L81PzFw=@vger.kernel.org X-Gm-Message-State: AOJu0Yz1g1yjYLgMpSdq9U9c4NrAcwxpEP/O1/DeXd9LZgnyP+0h2fz9 4xStV9L/PkN3lWZ2ozwojQT/RMjlFdOt8neC430LLIXNs1R33dxxR736P3vqxqcyiz8= X-Gm-Gg: AR+sD10zSfFnXKZvBYy6fPx62iqBel2eF5SYhcofyuiltxTP2RBbjNiQHCBunOUXb/R e/iPrmme6+AccM7bDLp5vh+msTB0zZ4JRb6CcMZVcqS73uwp8AS9ebioyGmr2SE6enjSsJAd8Lv LK1LgryAPFiZpmhr+8KSW1UPhGyb4Q+KKm7DV756GPC+4OfPBj36eKiQ0kJYY8IHhDdc95PEeAB JTZBvW+OFwxaZ2r3rcDkEUDnHf3L0k0U6ccjucrVi6yAt68M9lypWxrZkJTycAO+Sf7r0TKTqMb NyrmiS/+qqtDYkHMIdpgpw0gmyp9OxoibpO/ZWBPGKYSFsMFrCN0BjbZ/z7sMum4LpcZ5aDHPjf TJ0F59fsUS85okKtNWZdcNSI4ydaFoVp62PS/5n3k8oh5qaHSPFjyf0c2TW2ymInzLiUX9TKUJt N/cgzkY6TmaU+TpLvuqm7UMIGNijFutWnygvE2Pxz4ikcZC8vsIKqcD+aGHUmfuf9KrygJ X-Received: by 2002:a05:600c:3113:b0:495:4811:7998 with SMTP id 5b1f17b1804b1-496b57013f0mr92292875e9.17.1785140394639; Mon, 27 Jul 2026 01:19:54 -0700 (PDT) Received: from localhost (109-81-83-7.rct.o2.cz. [109.81.83.7]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-496b4866ddbsm237975535e9.7.2026.07.27.01.19.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Jul 2026 01:19:54 -0700 (PDT) Date: Mon, 27 Jul 2026 10:19:53 +0200 From: Michal Hocko To: Ridong Cc: Andrew Morton , Johannes Weiner , David Hildenbrand , Qi Zheng , Shakeel Butt , Lorenzo Stoakes , Kairui Song , Barry Song , Axel Rasmussen , Yuanchu Xie , Wei Xu , Zhongkun He , Muchun Song , Davidlohr Bueso , Roman Gushchin , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Ridong Chen Subject: Re: [PATCH -v4 1/4] mm/vmscan: fix anon-only reclaim evicting file pages when swappiness=max Message-ID: References: <20260724033435.2573323-1-ridong.chen@linux.dev> <20260724033435.2573323-2-ridong.chen@linux.dev> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260724033435.2573323-2-ridong.chen@linux.dev> On Fri 24-07-26 11:34:32, Ridong wrote: > From: Ridong Chen > > As Qi mentioned [1], when swappiness=max (SWAPPINESS_ANON_ONLY) is set, > the reclaim logic is expected to reclaim anonymous pages exclusively. > However, due to the current ordering of checks in get_scan_count(), > file pages may still be evicted if can_reclaim_anon_pages() returns > false, which contradicts the semantics of SWAPPINESS_ANON_ONLY. But if can_reclaim_anon_pages tells us that anonymous pages are not reclaimable then it makes no sense to try that, no? What do you expect to see? An OOM killer? -- Michal Hocko SUSE Labs