Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp3335778pxa; Tue, 18 Aug 2020 12:31:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzAyjFjo/k1IZ9MIdLYXIBDXuTcfl6BHM6PL9EyIWOmkf/DdcVBsIinWZuGsz6qPDBmpVhf X-Received: by 2002:a17:906:2e51:: with SMTP id r17mr825895eji.308.1597779091341; Tue, 18 Aug 2020 12:31:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597779091; cv=none; d=google.com; s=arc-20160816; b=00c39/x6+yyKrGdeqMwYuryJpGzmBIbiZv1ceBrZKChKthMgoqDd2cFkU75eaWDRxl sKDIiXLrackcpSC6XoL3AF2/nKsqB82YI12Y5in0jaYdFYz8Di3Zxn3AsQCTr1mTS0FB GZ+X881jNwtZDZiWkQxnzGIhcRmphxB5t2avlrPX9DzKkhPAykEu0i0wxkZB6rlQOgBY K2yZaTmrDxejeYbdk/o/bYjRkBs68rHa6b4gFZoRWc7IM10I2rzli5eaXZBA5bWT1pvD 60ufxrIZ7b446/zVb9N/t30KU5JntgcLT7V54Cd1hnP1u2yG7RQxgiyjgiBPymE3l1Sg Eqdw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:organization:from:references:cc:to:subject :dkim-signature; bh=TzOEgoxnjJc+44XQtv3kAPBEJXFL3VlSz++wwm59Khc=; b=eChIn5zJPuz8BGmi0SfgI6vbQmoRLybMl5t/6MoS5QyEbs8U0OVd4B8pEtxAQoBIgK nKrtKPEux0SHj0Ru7tjWZJMepGVtwQ9PHcryvegeZ9LmNFXtS8QZcc1Gvm3TTjsQg+TH E9SKjzcWJNRIcJ9299xoQCaTSIoSSU2Vtrsb9+iwmrncSaXMLNU8XWW6CcrZSoUzWFaq 2oOcKpBlXV0RG+4EhbLI6EEfiIzVZSicwSiDWTQp+u4zvd8GilyfCG1aVFDRysns5Ic9 47xGmHgfp5UwwgaD8WqslX2mhNoDGxaIqOevxwquFMZIouldCJKM3yMIYB3EieZz9dLC 1iUQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=bQZrn8st; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n2si13573441edv.257.2020.08.18.12.31.07; Tue, 18 Aug 2020 12:31:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=bQZrn8st; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726723AbgHRTaP (ORCPT + 99 others); Tue, 18 Aug 2020 15:30:15 -0400 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:23332 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726632AbgHRTaM (ORCPT ); Tue, 18 Aug 2020 15:30:12 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1597779011; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=TzOEgoxnjJc+44XQtv3kAPBEJXFL3VlSz++wwm59Khc=; b=bQZrn8stH9h3pMfBCJVUXeTQnSdzdkfWOcXZo73QR9MsSPF5UZfMBOxXC6dGXZ/4wuPKx5 ipUUwtKSgh5JJ5u0aPZn85IohTCf9cOI2LNktbTLgO+fM97MsgDzDThMVczURFaQ8RYMHB KnAPmWo9VUV1025q6meM9xnQ7kH5dbw= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-318-Y-bE-SXNM8Om9V_jtabrsA-1; Tue, 18 Aug 2020 15:30:09 -0400 X-MC-Unique: Y-bE-SXNM8Om9V_jtabrsA-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 6DCDC18686D7; Tue, 18 Aug 2020 19:30:07 +0000 (UTC) Received: from llong.remote.csb (ovpn-112-51.rdu2.redhat.com [10.10.112.51]) by smtp.corp.redhat.com (Postfix) with ESMTP id 046407DFD4; Tue, 18 Aug 2020 19:30:02 +0000 (UTC) Subject: Re: [RFC PATCH 0/8] memcg: Enable fine-grained per process memory control To: Chris Down , peterz@infradead.org Cc: Andrew Morton , Johannes Weiner , Michal Hocko , Vladimir Davydov , Jonathan Corbet , Alexey Dobriyan , Ingo Molnar , Juri Lelli , Vincent Guittot , linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, linux-fsdevel@vger.kernel.org, cgroups@vger.kernel.org, linux-mm@kvack.org References: <20200817140831.30260-1-longman@redhat.com> <20200818091453.GL2674@hirez.programming.kicks-ass.net> <20200818092737.GA148695@chrisdown.name> From: Waiman Long Organization: Red Hat Message-ID: Date: Tue, 18 Aug 2020 15:30:02 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 MIME-Version: 1.0 In-Reply-To: <20200818092737.GA148695@chrisdown.name> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 8/18/20 5:27 AM, Chris Down wrote: > peterz@infradead.org writes: >> On Mon, Aug 17, 2020 at 10:08:23AM -0400, Waiman Long wrote: >>> Memory controller can be used to control and limit the amount of >>> physical memory used by a task. When a limit is set in "memory.high" in >>> a v2 non-root memory cgroup, the memory controller will try to reclaim >>> memory if the limit has been exceeded. Normally, that will be enough >>> to keep the physical memory consumption of tasks in the memory cgroup >>> to be around or below the "memory.high" limit. >>> >>> Sometimes, memory reclaim may not be able to recover memory in a rate >>> that can catch up to the physical memory allocation rate. In this case, >>> the physical memory consumption will keep on increasing. >> >> Then slow down the allocator? That's what we do for dirty pages too, we >> slow down the dirtier when we run against the limits. > > We already do that since v5.4. I'm wondering whether Waiman's customer > is just running with a too-old kernel without 0e4b01df865 ("mm, memcg: > throttle allocators when failing reclaim over memory.high") backported. > The fact is that we don't have that in RHEL8 yet and cgroup v2 is still not the default at the moment. I am planning to backport the throttling patches to RHEL and hopefully can switch to use cgroup v2 soon. Cheers, Longman