Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp1099392img; Fri, 22 Mar 2019 15:52:00 -0700 (PDT) X-Google-Smtp-Source: APXvYqxqppKEy7cs2jL+wzEk+Iv+7yXo64JZgrp1HCKrU0yENkqjt4ZEHwntIYPLccsIzRTCzCTK X-Received: by 2002:a17:902:a5c9:: with SMTP id t9mr11706396plq.196.1553295120665; Fri, 22 Mar 2019 15:52:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553295120; cv=none; d=google.com; s=arc-20160816; b=f2YWTFZqRhMxN8v91TBLS69o0nPwLCBQqXWhuqk0xgvV9Z0Bbm8zKDPCZkFEYgFPCg kw1xPMjwY1v7aOxD3XL2iGJTFyMup+5Ph0akTM2Tz4+1fe9Ynexrsc5JaCKsJNoRu1NP JQtGpcsd5Q6t5skgvusgy9SGKfanEPDtVIkJawfJ9jY/a2QR8UdLu+F6PUGXm6ofV7hF j+5DMUiWy5UYPAKZDuGtUXgREwENXjTrrBVlcxsOiXa8EF0fnE2JfkSXe+7PoW05bwAH +u18wzyVMKbTwc8iJjST7FI1iNI7s7okgkFYAgKAHpNJfD4M5nboYmOyjYpJ+Q65OOSz XF8w== 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=losYwk/KnyYBXmqLLyIEJufi/8wg0iZYh/lFm2rrato=; b=drGmqL2jL2vXTTS4Dpx2a97U4WviA2eBp0QBW8/meTLbeiRaS1z+FfiEABmEO/LBog tl7TRQfCBI8C2Y3ag0Lk9K6WLRXlpR+USnjbqlcRpM5ZzdsQcDD9cBmJVFIr430VKhDV fA/JPTTactLvCDgsu2WBmEz/wzQD0sh/6pmT54R/tysjbyWjTTgOyskdrMHeu0jo6oSx xQWexjDbrMk/pBqxpDpE8jxlfKWPbajnQTYeDWL7OKAtkw/vqfI/Z5hxH0h/o8yHVCWW Fkmb7lba7jIWPeGhizW7KktgPjT1WxbNS8NaFqnxQZq+VduW/kfakyerW2KNRVuXaAYh 7Afg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chrisdown.name header.s=google header.b=vrapgFdT; 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 w16si8175869ply.103.2019.03.22.15.51.44; Fri, 22 Mar 2019 15:52:00 -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=vrapgFdT; 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 S1728168AbfCVWvI (ORCPT + 99 others); Fri, 22 Mar 2019 18:51:08 -0400 Received: from mail-wm1-f68.google.com ([209.85.128.68]:53378 "EHLO mail-wm1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726205AbfCVWvI (ORCPT ); Fri, 22 Mar 2019 18:51:08 -0400 Received: by mail-wm1-f68.google.com with SMTP id q16so3596196wmj.3 for ; Fri, 22 Mar 2019 15:51:06 -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=losYwk/KnyYBXmqLLyIEJufi/8wg0iZYh/lFm2rrato=; b=vrapgFdTIfpT8XWFnIH1/GLXnuTAw40ZeVke3Yc0Z7QMZ5/Lb0zs8qCSPqghWJK9Qs GpkaCsqzi3mLS8zOASlqm0nzs2tmmRmILYWDayt/SwE2+swwnX0taFqcD+9XuGJvSE8G OfR8xGLbN93EsKI3jxWaNQkOCWDePK32gNlLQ= 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=losYwk/KnyYBXmqLLyIEJufi/8wg0iZYh/lFm2rrato=; b=lydptkeD1l+aDslUXB8ONf5INDpUx44Rjui+ioAHyA6sWjs++c7nMBBbfE/Z8Nnm6k gnItXmO0qJMPCm5bPH76Yj/7hllHoiuhGLdLbRPqiRoRoV1NGvYz8nnxlZlAc9nWrQeN /2ys+TCiufg8djcwJppdMyXjOZzBfOE1bA1ihnCPHk4iIuXqCkUtTHWPfy9aZBGENhFW r0C2wBZHKfjcg236gJpUzwILAKSAvfldoPqv/tjXplaEsHc/f1lFjqQBuWCrWoL11BMv ZhleR6f+gXEhmfm09kkKe5HUY+YM1b/jrydRRdnMoUU5h0fAtR/oEIJYqGSBT+EBZQMN XdsA== X-Gm-Message-State: APjAAAU99FuL5hLbDq/ruzTQyAAV3BF8gXFA+RGNTGd01In6EXAhSYvp 5srQ+9P1KOSj+ToCElZ8t0i5TQ== X-Received: by 2002:a1c:ef1a:: with SMTP id n26mr4421627wmh.104.1553295066245; Fri, 22 Mar 2019 15:51:06 -0700 (PDT) Received: from localhost ([89.36.66.5]) by smtp.gmail.com with ESMTPSA id a82sm9301106wmf.11.2019.03.22.15.51.05 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Fri, 22 Mar 2019 15:51:05 -0700 (PDT) Date: Fri, 22 Mar 2019 22:51:05 +0000 From: Chris Down To: Roman Gushchin Cc: Andrew Morton , Johannes Weiner , Michal Hocko , Tejun Heo , Dennis Zhou , "linux-kernel@vger.kernel.org" , "cgroups@vger.kernel.org" , "linux-mm@kvack.org" , Kernel Team Subject: Re: [PATCH REBASED] mm, memcg: Make scan aggression always exclude protection Message-ID: <20190322225105.GA21729@chrisdown.name> References: <20190228213050.GA28211@chrisdown.name> <20190322160307.GA3316@chrisdown.name> <20190322222907.GA17496@tower.DHCP.thefacebook.com> <20190322224922.GA7729@tower.DHCP.thefacebook.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <20190322224922.GA7729@tower.DHCP.thefacebook.com> User-Agent: Mutt/1.11.4 (2019-03-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Roman Gushchin writes: >However, we can race with the emin/elow update and end up with negative scan, >especially if cgroup_size is about the effective protection size Yeah, it's possible but unlikely, hence the TOCTOU check. :-)