Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1638217pxb; Fri, 26 Feb 2021 17:02:26 -0800 (PST) X-Google-Smtp-Source: ABdhPJy7jI6cnaKFC9tfWteG61/X0JUxJ/n+DZEo9mv13c/Y8tNWFBB4MPIsa45mIBte64XgC7Mm X-Received: by 2002:a50:ee16:: with SMTP id g22mr6441286eds.235.1614387745994; Fri, 26 Feb 2021 17:02:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614387745; cv=none; d=google.com; s=arc-20160816; b=DJfuxX+KOdoWNLfLYZneWOCLtPnrpe0/gy6fvJrPZWMtgwJaMJbdTRSHcIy0nbHry1 xfaOqDaNZxPgsCwRe9ztGZhhuSqv2zTNT6bSMLUoQvni2iAXdDMnKPEe6qKbmY/QsRoR KgNFuMAV/mqxEmiDaNhqBZtOUQTGW4Sz4AWzaa+JNF2MPVC4/0Wa9PN3z97Du4fH42O5 y50VGT0471Qesj5J26CfEcifbLqPobmw4McUFpQpSVa+G3vDXArnO0OB14rPmKxJZhrM edhINVzHazc+x6+5v8Pp9n0Tsh/n+bd8o99gx56nxLGfDp9ZTgT5s+lJs4cM1KyECSi5 gA7g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:ironport-sdr:ironport-sdr; bh=2kSZaNcg/vRowGwC8JMUK75GShxgJbeLd3fb5AnPZ/Y=; b=ylC1sspwOtIL9zwd6POC2hHP6IMVtFQFwALYTj6vT5zjOq9jrwjmsu69ocrJKKXIPW 9409O7tYxZwWLOwVyuFRm1WlbHVqY9xWB4QiXaaGr1EBNPqGBzJoPG6CQyUNXxYTIVtS Zblyu4qItvjh07mGP6jKAoz8dnKLr0xntLtKL9Oc1HOy/vymrHpvhYbeWulA4YAYS+fz A2WpbTiiekGFDozbx5RXLzbiHk2v9984M8yX3GyrNtZnxRW3xZmm7Xtf62uLkzunYfz+ kYhstmzMU9YZ6eLd2tu8u6lPVSf9zz6JwunQQEjR8u4c+WGsKRfbi2acUXjbO4xeFWMV bVVg== ARC-Authentication-Results: i=1; mx.google.com; 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=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id va27si6915404ejb.548.2021.02.26.17.02.03; Fri, 26 Feb 2021 17:02:25 -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; 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=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230090AbhB0A6R (ORCPT + 99 others); Fri, 26 Feb 2021 19:58:17 -0500 Received: from mga14.intel.com ([192.55.52.115]:34606 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229863AbhB0A6R (ORCPT ); Fri, 26 Feb 2021 19:58:17 -0500 IronPort-SDR: R9HHtZKp2Ee0WknCguH9utQOmOqPD0Bv/8fldCtNZZbd455FZq15KANag6MHd1QBhDZKYd8VxX rSk/N2A1ChGg== X-IronPort-AV: E=McAfee;i="6000,8403,9907"; a="185348032" X-IronPort-AV: E=Sophos;i="5.81,210,1610438400"; d="scan'208";a="185348032" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Feb 2021 16:56:29 -0800 IronPort-SDR: gsUOB9ZTOZYp/ns1WJT9bxRzgmff3p+kS3YpgPsI5tSgngoDM1o3s3cwHqZfjZ4aEv/4PvaL40 qsVKiq5yeGLQ== X-IronPort-AV: E=Sophos;i="5.81,210,1610438400"; d="scan'208";a="584781614" Received: from schen9-mobl.amr.corp.intel.com ([10.251.14.198]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Feb 2021 16:56:28 -0800 Subject: Re: [PATCH v2 2/3] mm: Force update of mem cgroup soft limit tree on usage excess To: Michal Hocko Cc: Andrew Morton , Johannes Weiner , Vladimir Davydov , Dave Hansen , Ying Huang , linux-mm@kvack.org, cgroups@vger.kernel.org, linux-kernel@vger.kernel.org References: <06f1f92f1f7d4e57c4e20c97f435252c16c60a27.1613584277.git.tim.c.chen@linux.intel.com> <884d7559-e118-3773-351d-84c02642ca96@linux.intel.com> From: Tim Chen Message-ID: <781634ee-ffb9-598d-fdb6-0ae6067448b7@linux.intel.com> Date: Fri, 26 Feb 2021 16:56:28 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. Tim