From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mta20.hihonor.com (mta20.honor.com [81.70.206.69]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5C951432E96 for ; Tue, 28 Jul 2026 12:27:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=81.70.206.69 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785241648; cv=none; b=PUIRDBhUlxTXWl5exLSz11zizUiKJt5JxTGmdC+QOy7vgKgsLMbFR0JHwnN3ga+0u0gAkoHFRq75o6tZaQPbM3Bew/cYrHuOcpQOSceBhmwXXdYuaEm+vFXmov621thMRUR+ImBDATpiA7ljjDessRu+2BZ55vMOZU9sFXdZ12Q= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785241648; c=relaxed/simple; bh=+Xt7IX6SsAI7PYuZ1YycG71MCH2TA338YIH6sVSPAG8=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=b6mILSbcrhjgQZve/MwGK2RlhzuCEDPY/0EfQIBMSAegg12SFhwRxkqC3MDCTdhMP/vpxvGp6xTX5ricF8e2njELIlgcEvLsvE8siEaM5WiZzemKsC+r8xUYZUo79Mp80VfKhe/cHG34Hs0e42UtclqZg8l0IFWKb1TE31af50Q= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=honor.com; spf=pass smtp.mailfrom=honor.com; arc=none smtp.client-ip=81.70.206.69 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=honor.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=honor.com Received: from TW004-1.hihonor.com (unknown [10.77.232.85]) by mta20.hihonor.com (SkyGuard) with ESMTPS id 4h8ZV13LQrzYpYtD; Tue, 28 Jul 2026 20:27:21 +0800 (CST) Received: from TA012-1.hihonor.com (10.77.199.132) by TW004-1.hihonor.com (10.77.232.85) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.43; Tue, 28 Jul 2026 20:27:21 +0800 Received: from localhost.localdomain (10.144.5.36) by TA012-1.hihonor.com (10.77.199.132) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.45; Tue, 28 Jul 2026 20:27:19 +0800 From: Zicheng Wang To: , , CC: Zicheng Wang , , , , , , , , , , , , , , , , Subject: Re: [RFC PATCH v2 4/5] mm: mglru: run aging when pages are severely imbalanced across gens Date: Tue, 28 Jul 2026 20:27:19 +0800 Message-ID: <20260728122719.3688430-1-wangzicheng@honor.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: TW006-1.hihonor.com (10.77.215.153) To TA012-1.hihonor.com (10.77.199.132) Hi Barry, > The original code is a bit odd, as it compares a single young > generation and a single old generation against the total, rather than > comparing all young generations with all old generations. > > By comparing all young generations against all old generations, we no > longer depend on the exact value of MIN_NR_GENS. The idea is to > emulate inactive_is_low(). Makes sense, the inactive_is_low() framing fits. One gap: inactive_is_low()'s ratio is dynamic calculated. int_sqrt(10*1024) = 101 (ages only when inactive drops below ~1%), while patch 4/5's fixed 4 ages once old falls under 20% of young. It seems there will be considerable cost on big memcgs, or should the ratio scale with size? Looking forward to the perf data. Thanks, Zicheng