Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp5176973imu; Tue, 29 Jan 2019 14:16:56 -0800 (PST) X-Google-Smtp-Source: ALg8bN7095s0tv9NWvvNaPYNxM2hiacxkxsShHetolmVDN+GK35kRgUHydUk55tOU97znYtjDdg+ X-Received: by 2002:a63:b34f:: with SMTP id x15mr25508762pgt.243.1548800215976; Tue, 29 Jan 2019 14:16:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548800215; cv=none; d=google.com; s=arc-20160816; b=u34kQQCjjyrQliBY1dcjsl2eSi5ekFcIbr5nwm07FkJUxDgrf2Qv6U3OjtspWM6U5U RIuW1YiInMEgf9Y5zcyo4LV4HA+/z7P3qIuN2EN4BpzQKIaMavcaphnYwkkVtqxP4Q2B BnUB7mp7OdiyNxywzITAKq/i0KzQABRG5jYtHviNA9acpvDBxWkKl62f0f5G+FxZPqmv NarNESfC2k0QNaIbqEFmvvfOgOyr8pu3PjVu0CpVN5vdp1y8XdMlTkkXGEe9iQ3VTJT3 rYDvgU5lnmkrb7b5DVxNmH/xgy42YhBTGAQAapJUaY4kEfudFynpZas0vROf8bjcFtwR uhBQ== 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=cjPKJoHf3Gll+qk80dZ1zwwaf8+ItgdBe9DjCPAWJDM=; b=oiF6r/6A91bojnQs0ux3EJ0YEqjddum7ZVBxpQwbuStzg1inc3wgsmfDegZo7v1pru V/5VwFGi2u4rCZqpT81X9pxIRjezYHLdEuO1M3b2O7ILVUwOteppaKp5nV4bqWfutnLp 3rgsVZ7claP5ar3il3PC6VpCaEn8isDqZmeOzI/0VNwG8IX34ZxVSKJlPqtuW826IgTn x1+5t9pdVD0fxX+TUwZhO57AFDaHqE9T8WUpE7Kwz1vUAmFDyCgDHpJLM+Zxy8R1gcYc BAbDj093mxOrZ4/IJWYfKk4yodEzNgvAiDFL/JkoTRNz4NvFB5IQ5hXuAHuYqcnjozQX ayOQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cmpxchg-org.20150623.gappssmtp.com header.s=20150623 header.b=Wplr7vFt; 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 d12si7739437pla.351.2019.01.29.14.16.39; Tue, 29 Jan 2019 14:16:55 -0800 (PST) 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=Wplr7vFt; 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 S1729697AbfA2WPw (ORCPT + 99 others); Tue, 29 Jan 2019 17:15:52 -0500 Received: from mail-yw1-f65.google.com ([209.85.161.65]:40608 "EHLO mail-yw1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729556AbfA2WPw (ORCPT ); Tue, 29 Jan 2019 17:15:52 -0500 Received: by mail-yw1-f65.google.com with SMTP id g194so8842470ywe.7 for ; Tue, 29 Jan 2019 14:15:51 -0800 (PST) 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:user-agent; bh=cjPKJoHf3Gll+qk80dZ1zwwaf8+ItgdBe9DjCPAWJDM=; b=Wplr7vFthNztMxNfahA1bdj2lR3+YAdLQRgxzerOl/TRr5R4rFJx8TUrvIk1v7GEmQ kW80/oYXICrRj09V7xe49KhmG2HZE1rJdek1rUmiqrM2TA1ik6ZtsJgqvXoDfbFUOR+S r4jYBxwP6P+szzZp1EYHRu4AAGuOv48jtQZkBrJIuIK+HpL2oLgfyUT6VPMjGkKDonHS muByxxO7QtKKoPg2xVphTkV4PvV79xkf5ySxjt/21cxk5LPq3n5eJ1Ke3iNPGFjjCCDn eVLHYSC/VtVDEYZMxvnvbWN0zOjJl29ex2JcIHoqtd4k3gYMyhNO+XXv3bD3rnJ2e43X LLtA== 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=cjPKJoHf3Gll+qk80dZ1zwwaf8+ItgdBe9DjCPAWJDM=; b=HMjJsDxqmQGQNakievnO1EjuoUcxvI9ctsPCU3WkfvBw4VeSF/dq6IuL+0dSflWlmr aPIe0NMXQ3Q42VQsmXNvBKTyHPVXa1fWZy9o3lPpHX9TDskOgUjWLuAA6bXjMg7ownZY rqgBdigIFM6lEZIr1Vxq73IjaEsffdtLYWBn5SQtBlMwhVgYWxcgMN7mSjHXxfOpiNkb 5YXmIux12jxWcRj7CNHCbPnQudg3EXiq0HjcKm7V5OI2ZSbMol6JH5Sfn/JzS4E81HZD FMssEfcffZg1qVoi22GZGbqL0CZdrrA5c/QUmEtXzK71D3lRz6oDgynBQHPknvBJpjEx Dd1A== X-Gm-Message-State: AJcUukd1LZRwC1HYLAIuPCpgRXz75vRFRMTuObAOOwa5pVV0F9gUPIao bGLTKxNBeaE+LNN9PJA0Ulfi9A== X-Received: by 2002:a81:1282:: with SMTP id 124mr27709051yws.154.1548800151050; Tue, 29 Jan 2019 14:15:51 -0800 (PST) Received: from localhost ([2620:10d:c091:200::4:1d25]) by smtp.gmail.com with ESMTPSA id e189sm14009152ywc.101.2019.01.29.14.15.49 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 29 Jan 2019 14:15:50 -0800 (PST) Date: Tue, 29 Jan 2019 17:15:49 -0500 From: Johannes Weiner To: Chris Down Cc: Andrew Morton , Tejun Heo , Roman Gushchin , linux-kernel@vger.kernel.org, cgroups@vger.kernel.org, linux-mm@kvack.org, kernel-team@fb.com Subject: Re: [PATCH] mm: memcontrol: Expose THP events on a per-memcg basis Message-ID: <20190129221549.GA13066@cmpxchg.org> References: <20190129205852.GA7310@chrisdown.name> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190129205852.GA7310@chrisdown.name> User-Agent: Mutt/1.11.2 (2019-01-07) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jan 29, 2019 at 03:58:52PM -0500, Chris Down wrote: > Currently THP allocation events data is fairly opaque, since you can > only get it system-wide. This patch makes it easier to reason about > transparent hugepage behaviour on a per-memcg basis. > > For anonymous THP-backed pages, we already have MEMCG_RSS_HUGE in v1, > which is used for v1's rss_huge [sic]. This is reused here as it's > fairly involved to untangle NR_ANON_THPS right now to make it > per-memcg, since right now some of this is delegated to rmap before we > have any memcg actually assigned to the page. It's a good idea to rework > that, but let's leave untangling THP allocation for a future patch. > > Signed-off-by: Chris Down > Cc: Andrew Morton > Cc: Johannes Weiner > Cc: Tejun Heo > Cc: Roman Gushchin > Cc: linux-kernel@vger.kernel.org > Cc: cgroups@vger.kernel.org > Cc: linux-mm@kvack.org > Cc: kernel-team@fb.com Looks good to me. It's useful to know if a cgroup is getting the THP coverage and allocation policy it's asking for. Acked-by: Johannes Weiner The fallback numbers could be useful as well, but they're tricky to obtain as there isn't an obvious memcg context. We can do them later.