Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp4669438pxu; Wed, 21 Oct 2020 02:09:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy7ccHFvS1h0mfyl3Uf9qpuFdjzQC6lNgwYL5CE/x6W2SqVXi9g5PE2pTLsSx3ygZpqbenb X-Received: by 2002:a17:907:9ef:: with SMTP id ce15mr2510189ejc.430.1603271379929; Wed, 21 Oct 2020 02:09:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603271379; cv=none; d=google.com; s=arc-20160816; b=Pz68oP+zyLPlab1RwUlk7wQdHWC/LvcN7l0W/w56MSsQY1CvPPBSaAW9G5BYksvJty s1PIiBPUZEg7W79DiOv8xRCsKum22+/AJZfXPTgs7eV6tduzLatQcOHmNk1nHZbhetgd 8OQzlGgYt3nwlv4LD2NfHuNb1oOjPfMDOaNfd74D5sLsYvvr6XFrCRIXDKKaToWKoznx 8bGOSy9E+gH+Ax41KKHMOFYQTZpY0E96uk9a09qrE3OCkd5mh1OavNWlqKMuV8G4oMah 0y+svedXdbufiMAnbLsnRu1dTqtb1NuPeyvSm1msgAhcP5wjrcWBzZUax7W0BVcalETf 2pFg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=M85fSv8BahcDlCF9UJ6M+uu0ObrHdHEDxKjhsgKNBhM=; b=fuYxERsx2+BTssYfLFqy+ttojZXrsOoQnNaHYChrGEWeAMrlsi28Aaq/qyGEAjr5ZX Hy7vXp867XaM4MDWdRn3T0uANovpanmi4tydHW72e3CTF3zF/CxgLZ1bcvvdyKqgJtFn sS8iHMoCeZBDTl6GIrcl5zDUv5Ivf7Ro/LbjbT1HimnDYf82tA1EnetCSInuMvi3g8MK CzG7/Aov4S2zsjUzx6G9FnHchFF+1wrOBfhByxZJ8EepAtR53tprNUyDpefUZYj+PwMV /YgYoAJkXtZvbfLkFV26UpxEwyoHHYqJA5dEX/+bYUnK3JnUcFw/3SI6oNXTvqe8BuUp zsLw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cmpxchg-org.20150623.gappssmtp.com header.s=20150623 header.b=ZPhxZ0k7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id o22si960476ejj.86.2020.10.21.02.09.17; Wed, 21 Oct 2020 02:09:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@cmpxchg-org.20150623.gappssmtp.com header.s=20150623 header.b=ZPhxZ0k7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S2389086AbgJTSUC (ORCPT + 99 others); Tue, 20 Oct 2020 14:20:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47878 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728449AbgJTSUC (ORCPT ); Tue, 20 Oct 2020 14:20:02 -0400 Received: from mail-qt1-x842.google.com (mail-qt1-x842.google.com [IPv6:2607:f8b0:4864:20::842]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A97D7C0613CE for ; Tue, 20 Oct 2020 11:20:00 -0700 (PDT) Received: by mail-qt1-x842.google.com with SMTP id h12so1903041qtu.1 for ; Tue, 20 Oct 2020 11:20:00 -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=M85fSv8BahcDlCF9UJ6M+uu0ObrHdHEDxKjhsgKNBhM=; b=ZPhxZ0k738FNf0pe63JAjf7fr2+0N1EA6+c9mgp2fQePMiVd/CJlxck0574RVWRq68 V3z/IBkT6SQ8vyg8exe/E/JIKmHWMH3h3h52e02ldSJWUS9awkfRj869O5+09AXFzpb1 2AsaBczZz9XDGMRQwKbmummZMojEqAbBUP0RRQhLSSmqn9mjuxlxSk8aOgnQ/xPCa2Mq jAm93wjtbYii0VyHCUk0RZzEcgvzB1Mzcp9e/r/cH1CiSO0yQ4PPScQpDzkBSYxIsbeP /VBBYhTELV9A05uyqJffdxQcf1Hn72c1md2LW+IcFStT6dyZs69j9CZNa6Unslh9pRAT F4og== 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=M85fSv8BahcDlCF9UJ6M+uu0ObrHdHEDxKjhsgKNBhM=; b=pUSuDh/0hrQ8cnEOLeppXcKOBDIcR414DZeLVR5U+ZBagsK/bpl0VXiSBKJQDqbS8u UCOyU0hzWVn4OmtJEhrS7bckNL/WrGq5iloKy9iX7Mdvig94+RDAT9LuWlA7qbxKJYlH YKrjAIqUqdQXjqwdWMsOAwNN73rgQJkk/cKgC8AV3B7Dzl4bVWuoc2RTPSkkT4WLD87m gSNGUPnBkfH2JbanbJ2XTkKuqrg9GIifF1EH2jxt1avVP8o80kb6v0UmC6/ui91QFdxx 81A4xz7Lkp3KRvpJ5ELiCaFY7Zm994btmu5VWQPrIKFkNjUFQ91+aCx6qqhY8iJZiJlV ceBw== X-Gm-Message-State: AOAM533GnPuAvHEiJDyW4Kl9W+vQgTN+CcYFFxEkh74OFzRJNwSaSVT7 f8Odzh1w7RsMYiFWRI9jjpepsg== X-Received: by 2002:ac8:3f9a:: with SMTP id d26mr3766872qtk.246.1603217999891; Tue, 20 Oct 2020 11:19:59 -0700 (PDT) Received: from localhost ([2620:10d:c091:480::1:c52c]) by smtp.gmail.com with ESMTPSA id p23sm1139882qkm.126.2020.10.20.11.19.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Oct 2020 11:19:59 -0700 (PDT) Date: Tue, 20 Oct 2020 14:18:22 -0400 From: Johannes Weiner To: Roman Gushchin Cc: Michal =?iso-8859-1?Q?Koutn=FD?= , Richard Palethorpe , ltp@lists.linux.it, Andrew Morton , Shakeel Butt , Christoph Lameter , Michal Hocko , Tejun Heo , Vlastimil Babka , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Michal Hocko Subject: Re: [RFC PATCH] mm: memcg/slab: Stop reparented obj_cgroups from charging root Message-ID: <20201020181822.GA397401@cmpxchg.org> References: <20201014190749.24607-1-rpalethorpe@suse.com> <20201016094702.GA95052@blackbook> <20201016145308.GA312010@cmpxchg.org> <20201016171502.GA102311@blackbook> <20201019222845.GA64774@carbon.dhcp.thefacebook.com> <20201020162714.GC46039@blackbook> <20201020170717.GA153102@carbon.DHCP.thefacebook.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201020170717.GA153102@carbon.DHCP.thefacebook.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Oct 20, 2020 at 10:07:17AM -0700, Roman Gushchin wrote: > If we want these counter to function properly, then we should go into the opposite > direction and remove the special handling of the root memory cgroup in many places. I suspect this is also by far the most robust solution from a code and maintenance POV. I don't recall the page counter at the root level having been a concern in recent years, even though it's widely used in production environments. It's lockless and cache compact. It's also per-cpu batched, which means it isn't actually part of the memcg hotpath.