Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp4467872pxb; Tue, 2 Mar 2021 16:37:27 -0800 (PST) X-Google-Smtp-Source: ABdhPJwzJJC0kssVfh/9zsqGZzuGGvNOyBzpnqp/0MOE6yeSKcSYK/iv3sTAAYFQ5xpU3c5GCRcb X-Received: by 2002:a17:907:7692:: with SMTP id jv18mr8088064ejc.475.1614731846888; Tue, 02 Mar 2021 16:37:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614731846; cv=none; d=google.com; s=arc-20160816; b=aY5+szGFljjS+RK2o7mBJcSkjKLWMgdkt+DsbRrpT3g2pmpqvQTXz1Vk7nVGi8ZXOq OyzJCZW0PWPnpKxGmIZsIezdzfNgsMY/C+s6p3nDCTfAr149W3FRSOvYiHJFDTwaQeEH No1X17PoFw/xGmiFgIOMs7T46PtX8Ju066D5PLqLqtSkClIkJnx2ASKD+dHuBT56qNvm pqMdc5IEqyftVALCGjVNvcca8prqlGy7M9JqWy7GYOjjGADQO3U9oG4LSG1KZnTZydyQ RR3aFEbwhqTV1NN71mVN5ocHYRQu9ej3mrrg3tvgDKHzOirV/icyyIeUH9N05mVukvwi VNWQ== 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=34KjJW6+smFTvdlwXxTHDLwnzuvbuoymQf/sE3k7JDk=; b=nmF+SdSNpdYvjscOKKoJcXXmqcxYpAc2GZvwvYSWpJ2FLc7Z/sfr3yyiuy6f0CL2Gi W4yedpYlHX6at/AfD/1TZq/YJT7eL32IokVXQJI9qs+mJjhY0GY9gbObHuX8weOrwNKw Ggm6ghXOqexabWOsUuJqWKH6kPCQ0iJrm+rpJA5Ltv0kNhfMNLXoJId0TFcKEUYMbwE7 oHDUzVMwkmUvaC82UhJNkl5kz5YxuNfAA0UHGWAzyPrDUOlr9RSSjA14jtFPRVFRK+56 NbfyogT4j/jnzkb6ijlBHjWpOPQc6ukoUEYZzgofptbQCh9fbOl6eCFA0PIiXLWiKb4r U/Gw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=vU+v0gpx; 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=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=suse.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o9si13910683edw.190.2021.03.02.16.36.57; Tue, 02 Mar 2021 16:37:26 -0800 (PST) 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=@suse.com header.s=susede1 header.b=vU+v0gpx; 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=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=suse.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232540AbhCAHj2 (ORCPT + 99 others); Mon, 1 Mar 2021 02:39:28 -0500 Received: from mx2.suse.de ([195.135.220.15]:36288 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232496AbhCAHjY (ORCPT ); Mon, 1 Mar 2021 02:39:24 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1614584364; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=34KjJW6+smFTvdlwXxTHDLwnzuvbuoymQf/sE3k7JDk=; b=vU+v0gpxQZomsgNvE8gpmxUfse2pH+A/rl+TVwbFGvyrWd8cPG1s4z3QEmjtqqVzhvUOGz CNOgbtrM+9vHwXEKis5Iw6Dx2e/rVoIweBr7mXZ+roPJJXen8HgAP06WQiIoWY0oB3d4Cv uQmB3+xzn6iXB4207y2xgFbDmKCiDR4= Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 9E026AF11; Mon, 1 Mar 2021 07:39:24 +0000 (UTC) Date: Mon, 1 Mar 2021 08:39:23 +0100 From: Michal Hocko To: Tim Chen Cc: Andrew Morton , Johannes Weiner , Vladimir Davydov , Dave Hansen , Ying Huang , linux-mm@kvack.org, cgroups@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 2/3] mm: Force update of mem cgroup soft limit tree on usage excess Message-ID: References: <884d7559-e118-3773-351d-84c02642ca96@linux.intel.com> <781634ee-ffb9-598d-fdb6-0ae6067448b7@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <781634ee-ffb9-598d-fdb6-0ae6067448b7@linux.intel.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri 26-02-21 16:56:28, Tim Chen wrote: > > > On 2/26/21 12:52 AM, Michal Hocko wrote: > > >> > >> Michal, > >> > >> Let's take an extreme case where memcg 1 always generate the > >> first event and memcg 2 generates the rest of 128*8-1 events > >> and the pattern repeat. > > > > I do not follow. Events are per-memcg, aren't they? > > __this_cpu_read(memcg->vmstats_percpu->targets[target]); > > [...] > > __this_cpu_write(memcg->vmstats_percpu->targets[target], next); > > > > You are right. My previous reasoning is incorrect as the sampling is done per memcg. > I'll do some additional debugging on why memcg is not on the tree. OK, thanks for the confirmation. I think we want to do 2 things. Remove the soft limit specific threshold and stay with a single one and recognize THPs. -- Michal Hocko SUSE Labs