Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp391803ybi; Wed, 29 May 2019 23:47:30 -0700 (PDT) X-Google-Smtp-Source: APXvYqxdovmXpDmJ/Ag4fO+vVg0oXwOVEJtoNeDIcNCGBygSCw0gLCzSydMwn7fxfD1jrDTuPt9F X-Received: by 2002:a62:aa15:: with SMTP id e21mr2276566pff.140.1559198850613; Wed, 29 May 2019 23:47:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559198850; cv=none; d=google.com; s=arc-20160816; b=AOmfdM4NhZe1yDJjetBlhuVYhXqh4WXptNzYCamk2u41Kku1AvJbNsAVc4+HDeeBkt rIaG6An88EDxiCnUKGd6XW3jDSANMVDAk8VNPUKfy+TQJtHEQAy1q+IQbVlSO+H3PYVt c58rpJWTliKMFj5OYEFP7cZqxrLePsIluWBaJSsw0/l4Ufg0N5oZNZX/8FoJg819xEP+ 0+KPm/pVSelvvS/w+3zhky5uAYCMPkxQuw3VJV2DBjkNONe90RbTX+yn3/p4qkx0NiJi EaEpfUIBu8Ce9OjixPKJLCRVneuEkdJMfaCpzuhcIWjGm/1F1MSTf70LS0emarbNZtd1 ydxA== 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=OtJUoXoSDr8VsqZMlQCV4tuhz5lMclRWprZBC+48UZI=; b=Tpkr8Y97AoCsnS6+eaBHfF6n5CU9cgKpZBZUaOV4r1hWbihhYVHN7ZzpHvaiAgelSv ddDFIOrON0jpfnCYhxiOqtgsJOk6wn0DkmG/kxcgTaS9MrBNyilkzixKwehka1iWk6/L m8qgbQ2SiRbhTZuGjhYR6FsPt/cQN6ksKLcLI6wmFVYDYq2I20XgusC462eH3+5dMQ89 bkacg5suuxqQCqt2uoDjfkZnQlOPviucwhrKdba0DbqT0st/9LsB9spcP0etoNm9sZS4 r0Y6ZFxh9qQm8Vy2WmMfe9Xx4kAhMfuWpK/hHe4sIsl//OLY4jIpE4kAUHuVVgik0CbZ 7QPw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chrisdown.name header.s=google header.b=XUEorjCr; 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 o188si2385750pgo.489.2019.05.29.23.47.15; Wed, 29 May 2019 23:47:30 -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=XUEorjCr; 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 S1727460AbfE3Go4 (ORCPT + 99 others); Thu, 30 May 2019 02:44:56 -0400 Received: from mail-pf1-f196.google.com ([209.85.210.196]:34040 "EHLO mail-pf1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727273AbfE3Goz (ORCPT ); Thu, 30 May 2019 02:44:55 -0400 Received: by mail-pf1-f196.google.com with SMTP id c14so902673pfi.1 for ; Wed, 29 May 2019 23:44:55 -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=OtJUoXoSDr8VsqZMlQCV4tuhz5lMclRWprZBC+48UZI=; b=XUEorjCrLN9OrKuTIaR8sqQcataBFWGo19e2lBEQq/O74XS3Rv/gHEewD1Xhxg87dF Li12khbvVst/JlwygCiwvAhusNa3tSQFd4Sci5NEM5LIDG4i1O/IuqU4NCA4JrjyTjI5 Z8e+mv6BlLgw2Wij6fVvKbwpyso+4TBaM01wI= 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=OtJUoXoSDr8VsqZMlQCV4tuhz5lMclRWprZBC+48UZI=; b=PiHEcUw/sRuwk7tJk80AmrejDYwHwhOWpK64b/HkeMRIHm7FXproDtCMTWp8Eyq8WS HVKwwTCHi2qXS2LzBtetFrP7n0iLmll/VYFoh/1siqbA9362hWAHnWx/Ulbmh/xM8/Og ABGuoDe0ckvx9oO9x45n1LVIPwrHA3pPf4gfc2X8Fa05k1n0C2wgWeQN3EAO0QFF3tSO sDj+oe6k15VwF3NJPcWrYKiUPsGqS8xPQJoYFUrqDCIQVHF3i97rj7BMt8kWy9RKghC6 noIXL1fpfR6f08UB01y6BOl0S9sKHprcdPDxzoKYBwcObiELa1JV9e9BPNPt7bT0XsZd zPTA== X-Gm-Message-State: APjAAAX2ED7hf5559uLjU8KeZB8vbH/4DvUeSfZVlwZTRia1hN4T/mMj 1HK62NRmejsS55d8ctzNELpC5Q== X-Received: by 2002:a17:90a:8089:: with SMTP id c9mr2007919pjn.68.1559198694988; Wed, 29 May 2019 23:44:54 -0700 (PDT) Received: from localhost ([12.15.241.26]) by smtp.gmail.com with ESMTPSA id x1sm1242193pgq.13.2019.05.29.23.44.54 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Wed, 29 May 2019 23:44:54 -0700 (PDT) Date: Wed, 29 May 2019 23:44:53 -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: <20190530064453.GA110128@chrisdown.name> References: <20190228213050.GA28211@chrisdown.name> <20190322160307.GA3316@chrisdown.name> <20190530061221.GA6703@dhcp22.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <20190530061221.GA6703@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: >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. (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.)