Received: by 2002:ab2:710b:0:b0:1ef:a325:1205 with SMTP id z11csp1629961lql; Wed, 13 Mar 2024 04:00:27 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVabrviJ+OXsCmqDVX324F2clZEePtvRN5x00GuCsL1puh8QePHP+M/palGPoDShXVmoOEkhlmDcgA08qRSZq86NFaO6+G7vt6LgsLE4w== X-Google-Smtp-Source: AGHT+IHDTk+zDyMbxW+wTmBu8BclXBku9iUWCusB1Nui2riqYYPgr5R3MIeDN0ONZhOaGn69N3px X-Received: by 2002:a50:931a:0:b0:564:4a18:45f1 with SMTP id m26-20020a50931a000000b005644a1845f1mr5049333eda.17.1710327627439; Wed, 13 Mar 2024 04:00:27 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710327627; cv=pass; d=google.com; s=arc-20160816; b=Q+H8gVWvOaX+4X9GsZr5X5tHDFLMLBa9uyDDHaz+o5d82qLGgm4oTP763E6XC7ilJ9 OjnHcqX5Fn6z8+9daGFddSoOYTTdX7vMsYIm3fpDKbVnEsPIc2CaFHvsMMJrSUqiYod/ HUariziWOArL3Db6bXXHOSTazUvkB2Vhj+uNq4xbFMtWCsq/ey2kiznjAYGv/fPvp5FN O27zhRzHdkjC4QVzH4X2HlCrE2br0cmpqnDB8VcRVDA2T8J4AKHOZUkxBToGMvXf5s1N NC/2qj8M2vFQPG8ftIVX3KVeN3gztPZ/ML2sTIvIv58lwgOhpk4iU6wgYH4q/LA5Ujq8 WYKw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from; bh=vUAyzHAUT/L/3w2veAwM81inKGN1JXUXcLkAWipbJjc=; fh=AGqYVOUof6ag5owYPLEKOu7LuwoWFHVfB9M5YO1K790=; b=EHWizZGaex7e/C36T2J4pOtLXdxfEsbMkk3Ed884KX+vbtMtbNE6vu1UoMDqG1XQ3l 66AaOYh08gOOq1ZhVhumXQ8DHKi13XaiLMNAfnxCL94CyaYJAKOiAUjGC2ryJiKKtig0 jyMzkbuJ49faquxBhLPAEvkXxh23FjMIPkw+hjUogJ/2QN+x6dA8uxTP48X0H2oOtYUG DyJNYsUAofUIiHCEy4tqiGmmJEcf/FOvW1RRtKTNVVtLg32hqeGTeWGWiuag5AAA2vLL DAfoiQ/Mtdrrd2ULhXmxUL2MkVvfVKzeCTV+9Qi6npfCAAOFmrJv850ctccK/O7YrI1N BDkQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=sina.com); spf=pass (google.com: domain of linux-kernel+bounces-101379-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-101379-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id ev24-20020a056402541800b005670e6bf8b1si4338222edb.686.2024.03.13.04.00.27 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Mar 2024 04:00:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-101379-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=sina.com); spf=pass (google.com: domain of linux-kernel+bounces-101379-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-101379-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 146051F21DD7 for ; Wed, 13 Mar 2024 11:00:27 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4E0643DBBE; Wed, 13 Mar 2024 11:00:18 +0000 (UTC) Received: from mail78-58.sinamail.sina.com.cn (mail78-58.sinamail.sina.com.cn [219.142.78.58]) (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 DD2473E470 for ; Wed, 13 Mar 2024 11:00:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=219.142.78.58 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710327617; cv=none; b=Ed/jgKQAubAbHQ9Z8ei9ADONUQUg+UCUv3urJTBt4XqyyQZYE4hDktudBAjJbF5c7u6nigqYjt7hdP88DW7zVRdaVbZvzBp31ThI1A8LtTgbt3fv8HgxDuBP9pkBORnZPmVRCQzRKCIcR6WjgQDzL6IlrwRaHcsPCu5EeKk60JU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710327617; c=relaxed/simple; bh=7ZrgMjq9EJG/HOQXQol5+NoWKKlBPFaqhHJffNQBK1U=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=IQ48/C7aqQr/jcpPo4oTly9lo7rNhj91ozvqcthWfPraaMO1T10ApN/1+qjbNHCRkTD8Q7G+g3/otWw80CF9LD1CuIsW/zssiFqda0FLAl84gA0xk2G8Hh3yt0n1j6kkdTp8CIiLZcvgS4D4Jl+dV/V20QqeA+IuhWQ3ojo4wSo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=sina.com; spf=pass smtp.mailfrom=sina.com; arc=none smtp.client-ip=219.142.78.58 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=sina.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sina.com X-SMAIL-HELO: localhost.localdomain Received: from unknown (HELO localhost.localdomain)([116.24.9.180]) by sina.com (172.16.235.25) with ESMTP id 65F1873100001394; Wed, 13 Mar 2024 19:00:04 +0800 (CST) X-Sender: hdanton@sina.com X-Auth-ID: hdanton@sina.com Authentication-Results: sina.com; spf=none smtp.mailfrom=hdanton@sina.com; dkim=none header.i=none; dmarc=none action=none header.from=hdanton@sina.com X-SMAIL-MID: 16864934210262 X-SMAIL-UIID: 0B8297D186AD46CEB1A98DA75BCB2E4F-20240313-190004-1 From: Hillf Danton To: Johannes Weiner Cc: Yu Zhao , Axel Rasmussen , Chris Down , cgroups@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: Re: MGLRU premature memcg OOM on slow writes Date: Wed, 13 Mar 2024 18:59:53 +0800 Message-Id: <20240313105953.2234-1-hdanton@sina.com> In-Reply-To: <20240312210822.GB65481@cmpxchg.org> References: <20240229235134.2447718-1-axelrasmussen@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit On Tue, 12 Mar 2024 17:08:22 -0400 Johannes Weiner > > Back to the broader question though: if reclaim demand outstrips clean > pages and the only viable candidates are dirty ones (e.g. an > allocation spike in the presence of dirty/writeback pages), there only > seem to be 3 options: > > 1) sleep-wait for writeback > 2) continue scanning, aka busy-wait for writeback + age inversions > 3) find nothing and declare OOM 4) make dirty ratio match your writeback bandwidth [1] [1] Subject: Re: 4.8.8 kernel trigger OOM killer repeatedly when I have lots of RAM that should be free https://lore.kernel.org/lkml/CA+55aFzNe=3e=cDig+vEzZS5jm2c6apPV4s5NKG4eYL4_jxQjQ@mail.gmail.com/