Received: by 2002:ab2:3141:0:b0:1ed:23cc:44d1 with SMTP id i1csp224370lqg; Fri, 1 Mar 2024 03:26:57 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWw6UtpPdwyV+PCbXoHqlEupRlKJiwPNjFZbDqfNDWObHX/1y34sPCB9PJptQe27GL+3AJDaD3u5mRCDHujU0c9T5w18wOqwbRo1pdVAw== X-Google-Smtp-Source: AGHT+IFuGrlHchUoalN0SDtz4cxe8LvRvqfd8LK3f/+0pjnvmyBxtedxVi6TzJHi/NiZDCF5iVTZ X-Received: by 2002:a05:6a20:2d0a:b0:1a0:e157:9c9d with SMTP id g10-20020a056a202d0a00b001a0e1579c9dmr1361174pzl.51.1709292416969; Fri, 01 Mar 2024 03:26:56 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709292416; cv=pass; d=google.com; s=arc-20160816; b=fHPjPtWHh+QO9hW9DrG6JqM4veIWR40RnmxQ8h/mSiuczAyYCabvG2GAtysiOfRi7Y 2guQsqUJpSFQ/4MyDMh/1ym4WgcOviWHxcZE7ilTRwt0Z0mQ8s7n5Q/Oe999EMyEVRmk mVdBoUvsDHR44/Q1xNn4oG5fP7Uoj2Ruhwh9EifgChT25KL5gDhiq3Zzvl99+sPeuIMY d6ii8W+66yl/Vd7FgNv31+BHZzhInjWfxkpTA0QJhljGFmM2LtZROfc4jLkBpmooRvhT SezRhso0+4oF2gwHjN9WCkT0Ypn7G+MEYkedrmnkJabTj2XLH9pK3w8vZ4U0gGcTT1+X jKkg== 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=fsfWcsIVOLL42JQcnPKF9lSl7NrBLx3pSAISowecf7g=; fh=qqLexEN1Wjg1KYwHNIARBl6ph4ZWHWWiEpsrBiavgKo=; b=ivWmIsNRp+IJhmhVh6e1VAg7s8KN2ZdLOFrQaDL4r4RmXR4PrBvuyT5ED8Zkv10h0J 0/b5VtdO+1FqvilXdtxVR0XOj7ArxNAGJGgJZeEAafTaV2RqR4zVpbB7M7s4ad3TjA2s EYk1zrJhAhb87qr7iSK+9L210xEKSPCoJ6L0ivBMVEa+F2Mhr/jS+KdIuji0TArXNPoB 5v+8RYKyb9mLOsONMXZdYg3fVvxV7daYgXyTUm+uKUu/y24Qya7ez9PM3gDtd1uD92Gh +sx3VoZuKZYszD4/keO0PkDQ5S39e642kblyRO/6iH7/lXfN+j+/GPNe0z41ch/hzzM/ C2TQ==; 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-88336-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-88336-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id s12-20020a170902988c00b001dccc017491si3104918plp.140.2024.03.01.03.26.56 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Mar 2024 03:26:56 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-88336-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=sina.com); spf=pass (google.com: domain of linux-kernel+bounces-88336-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-88336-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 216EEB229BB for ; Fri, 1 Mar 2024 11:26:40 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id F3F056CBE1; Fri, 1 Mar 2024 11:26:31 +0000 (UTC) Received: from mail115-100.sinamail.sina.com.cn (mail115-100.sinamail.sina.com.cn [218.30.115.100]) (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 DBC476BB4E for ; Fri, 1 Mar 2024 11:26:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=218.30.115.100 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709292391; cv=none; b=p8beTNg6byqJzKnkuiQdrPo81XL7m9KtgknwG/rrHnCPZIFZNmz4FU02+eweuDFCe+2RHunj1EbyDu0IUjqMkC88NEXaUwL0DpR1TG99Nst9kOD9Gqh8VDVx5b2etSjx2/8FSpmJE7icscgfbfOCHjk0Co5v9+Mdg1hq9wLW0u0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709292391; c=relaxed/simple; bh=nbVwHvjmHH4KDCGPaevXUB6jSz5bGZKRg15ibfjJG0o=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=MtZJsN6uNOZxRaqULhbKTryVQQ85UigYrI0gAF57Q2VDOBj4taeoyHtQJIid7Qo1Bwdb9XRgkfRNQ3gd6l4ZzGUUgFfGHPCXH03alo/OGUtsWDnfqFQXcYc0zUXGiiQOYdarVjV1SvofnU+PbvMZn+co2FUCA4XB9yht5MBEFWM= 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=218.30.115.100 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)([113.118.67.15]) by sina.com (172.16.235.24) with ESMTP id 65E1BB37000026BE; Fri, 1 Mar 2024 19:25:46 +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: 51075845089115 X-SMAIL-UIID: EBE7EC53C58A480281876D9622824AFE-20240301-192546-1 From: Hillf Danton To: Axel Rasmussen Cc: chris@chrisdown.name, hannes@cmpxchg.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, yuzhao@google.com Subject: Re: MGLRU premature memcg OOM on slow writes Date: Fri, 1 Mar 2024 19:25:35 +0800 Message-Id: <20240301112535.1609-1-hdanton@sina.com> In-Reply-To: <20240229235134.2447718-1-axelrasmussen@google.com> 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 On Thu, 29 Feb 2024 15:51:33 -0800 Axel Rasmussen > > Yosry pointed out [1], where MGLRU used to call this but stopped doing that. It > makes sense to me at least that doing writeback every time we age is too > aggressive, but doing it in evict_folios() makes some sense to me, basically to > copy the behavior the non-MGLRU path (shrink_inactive_list()) has. > > I can send a patch which tries to implement this next week. In the meantime, Yu, Better after working out why flusher failed to do the job, given background writeback and balance_dirty_pages_ratelimited(). If pushing kswapd on the back makes any sense, what prevents you from pushing flusher instead, given they are two different things by define? > please let me know if what I've said here makes no sense for some reason. :) > > [1]: https://lore.kernel.org/lkml/YzSiWq9UEER5LKup@google.com/