Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp1232411ybi; Thu, 30 May 2019 13:54:46 -0700 (PDT) X-Google-Smtp-Source: APXvYqwgrfPeccpr8HNGSkDh0py7V0YNZzmanWIp3Xd7gB6IsNZZPB+gq/zbSWqnyC2A+tVQSuOI X-Received: by 2002:a17:90a:8902:: with SMTP id u2mr5174608pjn.96.1559249686664; Thu, 30 May 2019 13:54:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559249686; cv=none; d=google.com; s=arc-20160816; b=xcN6g+XcoxjBi+NzOMUV5t7cXgAW+CMCGD2izspMQnYT6mNGNbsoMPjUsnwBej8UW+ e3XnKS61ZgYXBcdwxHRRADriOYOKt0KVtywTc0uGBkL2sC/9Tgr3KExGkqr8YAu2wOxJ S0UXUihh8HoOCoujmbGoIvIxDFcael7jfUftJcEUstxISs/ZLFcT37m8bt2xMBCRlqnK XA8TeTNRNeZG3QGmBfa4BqIkfc1nZouIOPqYhRcokFj+yNYYW7If0s9STm+V5SuiJq6X T47MMHzwkThDNfFa9KXYRgMqGlycjWZftjpDp1ekp5Ap9N5xCdIiAKqhBlb8XuLjnmCl DRyw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=6xW2J8Id+5nx2KJz7k0sgVn959SqhmXLM/78ZxNyQrM=; b=QU+s5VP3x5TiiYQUBw6SbRsdyB2IutzE7HSA4XjOtINXPLv1h69IeQhWp27EjoThKv 1YgB+goovwYJAdtP0d/8H60pR9hsG2vB7gZ3saw783+lQ9v+oA3wMsWnjgy1pbT888Na 7+q+/50jY2t3S3wxhUUxiX8YrXVpZy2qcU7GzH6K70QoyZ0RfzHBpvw1kN1bW/NsuZgj MmmOzRJG6nqW84KD7MXZ9284217CUTwBurSRteRZQiH6BKrA+RwtPuw5e8R7/4DHZ3s+ GWCxvY/4G6ddQ2ONDg3aZVl6AYXeaqpuHqVa3JMp/vL9WwFWzAHuWl/71ApDN2QyhLGm ru/Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chrisdown.name header.s=google header.b=P7oOZgl3; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chrisdown.name Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u133si4455491pfc.72.2019.05.30.13.54.31; Thu, 30 May 2019 13:54:46 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@chrisdown.name header.s=google header.b=P7oOZgl3; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chrisdown.name Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726483AbfE3UwO (ORCPT + 99 others); Thu, 30 May 2019 16:52:14 -0400 Received: from mail-pf1-f195.google.com ([209.85.210.195]:40386 "EHLO mail-pf1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726045AbfE3UwO (ORCPT ); Thu, 30 May 2019 16:52:14 -0400 Received: by mail-pf1-f195.google.com with SMTP id u17so4703195pfn.7 for ; Thu, 30 May 2019 13:52:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chrisdown.name; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=6xW2J8Id+5nx2KJz7k0sgVn959SqhmXLM/78ZxNyQrM=; b=P7oOZgl3CtO57JCewH/kKTPTub5g44+HbkPoxMUgXSg+G+mYhHLm56nrj0Ca0w4uXe 1y5o+9cwnqcke09kZKrZ07g+cQivOFM52Jn56eiI9G38mT2W5A58AY/pnXbpMkHnaf6b YmGt4GV5AsM5rEH9QzxxTZrA7C0HqUi7G0YlE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=6xW2J8Id+5nx2KJz7k0sgVn959SqhmXLM/78ZxNyQrM=; b=PVF/Q9f0NbqoU369Ap0OkfYwl8bJB38Oxeay6NgWI4gcVnD5NezUo5fWaKQ9TPm96h 1uiJX7DMvVuXCNwqniVVBZ785AgOTcJwCLWI9xvQzAzmpF85ek5jdetdwY7qsD76FW/J xMTWL9cDa4pOuJgA5HhjtqCjiwznZQXm/yJW6ia03rLG9/CfqTu+KDSrPN3K9gsc+HUH xZHi6lTA1+cxg7hPj+ZFeYK/EiGKzEDG7XfPDWkAeuLzAGR5Ac48Ac1f8yo+AUL00wEw CwjAk1u20+lRSBSaCctDmUct8/rLbDMVY3XWcXQOz1+jqQ0WX+W+lvyoKdCNvqgBNDOv 5L0Q== X-Gm-Message-State: APjAAAUvq1AGTw2Af70Bgcm6xzNtYG8Kv1SOQTWtNdnh3l3PC3T2yLOX pIdaAVJl9Dfy/eKmI2iwNhugfw== X-Received: by 2002:a63:4006:: with SMTP id n6mr5564930pga.424.1559249533347; Thu, 30 May 2019 13:52:13 -0700 (PDT) Received: from localhost ([2620:10d:c090:200::ca0f]) by smtp.gmail.com with ESMTPSA id b3sm4127765pfr.146.2019.05.30.13.52.11 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Thu, 30 May 2019 13:52:12 -0700 (PDT) Date: Thu, 30 May 2019 13:52:10 -0700 From: Chris Down To: Michal Hocko Cc: Andrew Morton , Johannes Weiner , Tejun Heo , Roman Gushchin , Dennis Zhou , linux-kernel@vger.kernel.org, cgroups@vger.kernel.org, linux-mm@kvack.org, kernel-team@fb.com Subject: Re: [PATCH REBASED] mm, memcg: Make scan aggression always exclude protection Message-ID: <20190530205210.GA165912@chrisdown.name> References: <20190228213050.GA28211@chrisdown.name> <20190322160307.GA3316@chrisdown.name> <20190530061221.GA6703@dhcp22.suse.cz> <20190530064453.GA110128@chrisdown.name> <20190530065111.GC6703@dhcp22.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <20190530065111.GC6703@dhcp22.suse.cz> User-Agent: Mutt/1.12.0 (2019-05-25) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Michal Hocko writes: >On Wed 29-05-19 23:44:53, Chris Down wrote: >> Michal Hocko writes: >> > Maybe I am missing something so correct me if I am wrong but the new >> > calculation actually means that we always allow to scan even min >> > protected memcgs right? >> >> We check if the memcg is min protected as a precondition for coming into >> this function at all, so this generally isn't possible. See the >> mem_cgroup_protected MEMCG_PROT_MIN check in shrink_node. > >OK, that is the part I was missing, I got confused by checking the min >limit as well here. Thanks for the clarification. A comment would be >handy or do we really need to consider min at all? You mean as part of the reclaim pressure calculation? Yeah, we still need it, because we might only set memory.min, but not set memory.low. >> (Of course, it's possible we race with going within protection thresholds >> again, but this patch doesn't make that any better or worse than the >> previous situation.) > >Yeah. > >With the above clarified. The code the resulting code is much easier to >follow and the overal logic makes sense to me. > >Acked-by: Michal Hocko Thanks for your thorough review! :-)