From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CAE78C433DF for ; Tue, 18 Aug 2020 19:27:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A43A92075E for ; Tue, 18 Aug 2020 19:27:37 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="AhuqMZwj" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726705AbgHRT1d (ORCPT ); Tue, 18 Aug 2020 15:27:33 -0400 Received: from us-smtp-2.mimecast.com ([207.211.31.81]:28494 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726585AbgHRT1b (ORCPT ); Tue, 18 Aug 2020 15:27:31 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1597778850; 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=EYREHDLi/OwVaks7d7Yd3+mLedE3CgJg65cYrNwwqcA=; b=AhuqMZwjHMXxwIJLh2/xk46SPDY0TnodDuFG3LkQhEeE8xa4mG1jtLxCFpOQdaJ6sCUNwR Vh7sebKCp+3mf99lrHZc9RSJItQB+jLbfofWTEOVq00TAss4hKcxbNcn02P4klILVMQ4go +Y/TWvpLffwQrg8UUTw/b4bdVLjJfsg= 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-221-hQS0I0WjOQSRP7dtma0PCA-1; Tue, 18 Aug 2020 15:27:28 -0400 X-MC-Unique: hQS0I0WjOQSRP7dtma0PCA-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 9F6421DDF1; Tue, 18 Aug 2020 19:27:25 +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 870857D91B; Tue, 18 Aug 2020 19:27:23 +0000 (UTC) Subject: Re: [RFC PATCH 0/8] memcg: Enable fine-grained per process memory control To: 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> From: Waiman Long Organization: Red Hat Message-ID: <3a4d858c-0605-c5fc-4a9e-f05cf221d6ac@redhat.com> Date: Tue, 18 Aug 2020 15:27:21 -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: <20200818091453.GL2674@hirez.programming.kicks-ass.net> 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:14 AM, peterz@infradead.org wrote: > 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. > I missed that there are already allocator throttling done in upstream code. So I will need to reexamine if this patch is necessary or not. Thanks, Longman