Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp395596ybi; Wed, 29 May 2019 23:52:34 -0700 (PDT) X-Google-Smtp-Source: APXvYqw8zJwP2JVqT2XIUnIqac/UqLXjM/AGJgk555X0jWSApk7G5zt+5sFvM4Sdh4AMEv81OAMK X-Received: by 2002:a17:90a:dd45:: with SMTP id u5mr1973756pjv.109.1559199154363; Wed, 29 May 2019 23:52:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559199154; cv=none; d=google.com; s=arc-20160816; b=vm3CNIdmsRyWiovnQU7FCnx/iYzzqjCgtTIVhw5noVr68NKIrzbU8CA327n/3cegg7 1OmY+FtaCtN2amaSrvWkiVws50+17AZGpWUmucLzFmMWsONNwHCuD293x10ZOdnnFUnJ KVofZd9T89qNDRy44bGKvvf5NqqBRztpuHKizbajBZWYv5Jcr1dbJyEqHpIJt8MhR3MG leIjl+9NoDpUNjsTo911z8vuN816jUt6oDWPuA8rDCWWoLY2FZ8sa91mCmPCoXw9W2Tl 0sepziOs07FwYrAI1USSQenrBkVfEHrKou6CwMTwDX9fz9vtoGzIG1+RCNcZnnCnH5Yz TsjA== 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; bh=pl46aRszmpdjuU2z6gGkrMXy/xn/vJww6HCwYJJamOU=; b=Gq7T21JmeJ57fF+n1aAqKX3qANlEhOSCx8f6J5HJClOV2wJkhGLaPpLJyMEsLgaZVw lJjNpgFQr0cakLuRUTXBk4KpfydM1IwDQRiXbrsGAFWsgy0NrqZdrcIJr6iq1veYZWgh BDGQQPbeuIHZWjPGwIzrwjbTNdmBQzXODF0tI0LU8QQFIw2CNH4OWpTSDJVSaVUJW9Za 7I12k9HhJJwLXdUC6KR41VqVjkI+f/4dnj/mfCbnDw7EgQM+Tk26Y4LiQFPYdeqYsWMg +1I2LXDa5elO6C5eQYA9xK9c2BvU97kHx2TN13KtDwlCboAmhitACHv9VsW/ZMq7XUqS UG+w== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a15si2713963pfa.85.2019.05.29.23.52.18; Wed, 29 May 2019 23:52:34 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727555AbfE3GvP (ORCPT + 99 others); Thu, 30 May 2019 02:51:15 -0400 Received: from mx2.suse.de ([195.135.220.15]:51150 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725961AbfE3GvP (ORCPT ); Thu, 30 May 2019 02:51:15 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 15D2EACF8; Thu, 30 May 2019 06:51:14 +0000 (UTC) Date: Thu, 30 May 2019 08:51:11 +0200 From: Michal Hocko To: Chris Down 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: <20190530065111.GC6703@dhcp22.suse.cz> References: <20190228213050.GA28211@chrisdown.name> <20190322160307.GA3316@chrisdown.name> <20190530061221.GA6703@dhcp22.suse.cz> <20190530064453.GA110128@chrisdown.name> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190530064453.GA110128@chrisdown.name> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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? > (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 -- Michal Hocko SUSE Labs