Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp1917324ybb; Thu, 2 Apr 2020 09:39:39 -0700 (PDT) X-Google-Smtp-Source: APiQypIEsdkTcDpJH6zEAhYlKdYkE4sk7iNlOOuVY8IlSIK54bns9xffWulW0bX9sDiOqnT5W/UV X-Received: by 2002:aca:af97:: with SMTP id y145mr2830464oie.24.1585845579734; Thu, 02 Apr 2020 09:39:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585845579; cv=none; d=google.com; s=arc-20160816; b=Zg82NQcvTYPih+L54YJdViXeMKUem3sc2oJJ1R6WtDmg6cUkt5terUM1TDwI7oBdgW GJ8UXrDA015oaLbj+pTIICKYIqCaQJ47Zt8edtLnHOdyO7p5VxOyLeAblZQ+F0CDUtC/ 9gY9l2j5b44axaH4B1Y6Gg6+Zdir5eSeKtb6rbCyHAMYVhdUrz5V83iyH2iAQYDRUkck 0cSJdU72RmtIgD7BV3ReCt4XNrnejmzbJl65UcGf6ZUS4d+aaCQYKXNOAFLCsXgmOqex kokbgKuR/P2YX+4q4fYKaHgOK+WefsipF8R63LQtOEFQVoOIfseLHeWSJdvy4NMuuxEI gBAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=X4md8GfFb/AZLlmWivRcEwSCP4uBimc7oKbXY4Cuzbs=; b=SLIClx4ueAOe6O4UY3DnqtCRVGxdCB3a6SsI//p/0m+DPoW905VkAYm26B8n8BkOk9 0NXjS6acO9RPIDdMNvuzii9zQ3eMkE65DVcY2R6rkEvMCFaiYjpxW5f1skfetTwJr97h 82igFEbw18tZcITfE6Gq9WKLcsoot3wgMfJ9UdACWlNjVf5OsXL5mecwbAzKmpultKVA q+V3L5FsQDykjT1AuVvps32Lw23zPTQEMGl32TNA2hCNHjumdZZGAu9NJqYcaCUH7mYJ mrcqkhkmT1Egb+1rFO1j+oYBn9ER6vxEd0ZilwTsqymrQky0A7VqI6iX1yGhL7PWt3/d +Vew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cmpxchg-org.20150623.gappssmtp.com header.s=20150623 header.b="L/SnQjBf"; 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=cmpxchg.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y15si2373568otk.125.2020.04.02.09.39.24; Thu, 02 Apr 2020 09:39:37 -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=@cmpxchg-org.20150623.gappssmtp.com header.s=20150623 header.b="L/SnQjBf"; 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=cmpxchg.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388986AbgDBPSz (ORCPT + 99 others); Thu, 2 Apr 2020 11:18:55 -0400 Received: from mail-qv1-f66.google.com ([209.85.219.66]:46042 "EHLO mail-qv1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388234AbgDBPSz (ORCPT ); Thu, 2 Apr 2020 11:18:55 -0400 Received: by mail-qv1-f66.google.com with SMTP id g4so1803854qvo.12 for ; Thu, 02 Apr 2020 08:18:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cmpxchg-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=X4md8GfFb/AZLlmWivRcEwSCP4uBimc7oKbXY4Cuzbs=; b=L/SnQjBfnp5fEn4nBLMR6OIrZCUsqaFG32VM3D8P0P8Lj/uoYnjkRyEnuYvXsJsAKt c4igzrWSnvwBSj3E7mr0QbuhFJhboCmmv66EkfRKM8dykWur9UCs7QjwYmhFzRp4O+A4 SnrLBfG8ir/Oio7mvh4OgFCEi2cahY9VIyMpFSkHRdm41lB0/v0GSq1mKWVd2TiCyBlN hI6cIgvd6bBViEDgjTfBgb3PQnim/I28LCR10Uk8FN4kj7u9VdBwqKzsszZNJndU/ap/ B/jD43fEcMR1E7yUPLdB4B9rCGNhvxza6rn5dvPkZt/C61cv9D6z0rzi3GwPV+Lp5T9D VM4g== 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; bh=X4md8GfFb/AZLlmWivRcEwSCP4uBimc7oKbXY4Cuzbs=; b=aQvs/YWdpojqaN/2HmDaTUBUN1zIfocdGbamqWGV9rxsTKU6zWgjDj9Xew86EJRjVg GZjvXUACIEUmetTCVuBDfii01aGJZAjDM40c2LVlvJK2dtyN0s3bY5nwSbmbitOSZ48g KjbyhGRMt+8ITeRXZFFKGDeSPsTb3aS4VdB6p3qr08AD2uZFREYx2CZurNqrbQvf8ywf h5fFwzwirsgr36GR1jYCgTx1X4zyFQoYQ4uACGk5unLwwGSR5YcYceaPFur8SFOqiAoa XbZK7UorAgONNjQ1gLdHHbCN5oZBbZLlF0o1m55Ce5GrgX5eMdmVJ7pCqp4qcDjFgU+p yoAQ== X-Gm-Message-State: AGi0PuaDgA2wlB9+FSewYTq2oqDPYsIJBk/u/J9RHrGH/AyiAGdbR1gN z1IEwF3znNT0WhiYXnrfqEcKXL4jrF0= X-Received: by 2002:ad4:55cd:: with SMTP id bt13mr3597389qvb.111.1585840733984; Thu, 02 Apr 2020 08:18:53 -0700 (PDT) Received: from localhost ([2620:10d:c091:480::11c9]) by smtp.gmail.com with ESMTPSA id z66sm3721863qkb.94.2020.04.02.08.18.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Apr 2020 08:18:53 -0700 (PDT) Date: Thu, 2 Apr 2020 11:18:52 -0400 From: Johannes Weiner To: Chris Down Cc: Andrew Morton , Tejun Heo , linux-mm@kvack.org, cgroups@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-team@fb.com Subject: Re: [PATCH] mm, memcg: Bypass high reclaim iteration for cgroup hierarchy root Message-ID: <20200402151852.GD2089@cmpxchg.org> References: <20200312164137.GA1753625@chrisdown.name> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200312164137.GA1753625@chrisdown.name> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Mar 12, 2020 at 04:41:37PM +0000, Chris Down wrote: > The root of the hierarchy cannot have high set, so we will never reclaim > based on it. This makes that clearer and avoids another entry. > > Signed-off-by: Chris Down > Cc: Andrew Morton > Cc: Johannes Weiner > Cc: Tejun Heo > Cc: linux-mm@kvack.org > Cc: cgroups@vger.kernel.org > Cc: linux-kernel@vger.kernel.org > Cc: kernel-team@fb.com This makes sense, memory.high doesn't exist on the root. And the mem_cgroup_is_root() check, a simple pointer comparison, is cheaper than reading the page_counter atomic and memcg->high (which we already know to be PAGE_COUNTER_MAX). Acked-by: Johannes Weiner