From patchwork Sat Oct 26 00:48:24 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: JP Kobryn X-Patchwork-Id: 13851999 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 198EED149F8 for ; Sat, 26 Oct 2024 00:48:38 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 5FA766B00AB; Fri, 25 Oct 2024 20:48:38 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 5A9966B00AC; Fri, 25 Oct 2024 20:48:38 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 471E96B00B0; Fri, 25 Oct 2024 20:48:38 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id 2AC936B00AB for ; Fri, 25 Oct 2024 20:48:38 -0400 (EDT) Received: from smtpin23.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id A186F14138E for ; Sat, 26 Oct 2024 00:48:16 +0000 (UTC) X-FDA: 82713917286.23.E5A4715 Received: from mail-pj1-f53.google.com (mail-pj1-f53.google.com [209.85.216.53]) by imf22.hostedemail.com (Postfix) with ESMTP id 22B99C0021 for ; Sat, 26 Oct 2024 00:48:10 +0000 (UTC) Authentication-Results: imf22.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=iBZ5JZYJ; spf=pass (imf22.hostedemail.com: domain of inwardvessel@gmail.com designates 209.85.216.53 as permitted sender) smtp.mailfrom=inwardvessel@gmail.com; dmarc=pass (policy=none) header.from=gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1729903560; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:references:dkim-signature; bh=/m6Vv8AwalfQLibkYgB/kravCl5ywXx4WdWAUR3/mNs=; b=lfQvvLENYvaIAD4D6a/fF7y0QYCwCDIpcSp5Mwxneq6RjFW7EQ11PXLTkrQF5RVfu3haka FjwNCLo3GUfDzOtJFjuVpHUqZhP3EfvnqpizqVtxIMZzKJg7uBtwne5FhjMYNIfScd4dkc Gpzirmh93WsrmoEuqdvoT74Vfzn4mTQ= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1729903560; a=rsa-sha256; cv=none; b=1cBrbgAesmjbedT5PSiYzFzyqYWx1p2fMzCFBqDaf4ErmZifaJZuovc/0x7i6nqqDAMwer 44x8kTV2Mbg5EIqygQ/OZMeKRAANCBcAsYm1Gih15RMu29Whm3SGrQHIZ4N7Jx+tAGkkoz ARy9iAqFNlkj6CayvYPj7ukNUXOlQsg= ARC-Authentication-Results: i=1; imf22.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=iBZ5JZYJ; spf=pass (imf22.hostedemail.com: domain of inwardvessel@gmail.com designates 209.85.216.53 as permitted sender) smtp.mailfrom=inwardvessel@gmail.com; dmarc=pass (policy=none) header.from=gmail.com Received: by mail-pj1-f53.google.com with SMTP id 98e67ed59e1d1-2e2cc469c62so1871125a91.2 for ; Fri, 25 Oct 2024 17:48:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1729903715; x=1730508515; darn=kvack.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=/m6Vv8AwalfQLibkYgB/kravCl5ywXx4WdWAUR3/mNs=; b=iBZ5JZYJ0jrNSQehyLYnFxnL5fg9B6T/thjGYe24JYdiYJtTzR8OsSbcIh3zcP/epr fhOu1ygDPE2PJZwHDBIhZWAlRmyCYdrbGnfqoqobUuvEpKBwLhegBc4I6NhWcCsviEFV eKlGH1Q6Ouo7WCiGUHnRp3mkh2Vstca9QFJOPeSnWFH5sUJxmYS7eabHu0U3klf16sZs 1OGdKh7lctuyH/P2ecoNOWYZ1Q4K0EKzxbmkeOKnw4L0o+PJTy1ri0cwHX+OsYlbeUo7 3RhCHnVd8Yz8sh6P0PkCOMzYFfiX8s+MggXrZ6gyOrSbfYAdcAbAxIC5nI/ka78GV/Ou J4Fg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729903715; x=1730508515; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=/m6Vv8AwalfQLibkYgB/kravCl5ywXx4WdWAUR3/mNs=; b=EKuzNF9ABQY4wKenM0rQyAlNrAnSF+9ZVnU4qTHlNBg+z8dENTLEWjxZlglD5mooV9 tKxI9X/OOR6D7d+Ppc6FLaHUed3PIduGEOGorOzqVnapcDPECRWw/jaX3xTEHqdcGuBa Dg0SHHFJD69gnMkYvVnsUHFXtlnRQ+0pNaLSizcmv7kgfGLBNgVii8TdJMhaYl6lB+0P xduPpPoXLxXzrOeURxgpT05DlEAIO0xTEGRN+/UOGbNTDNo8SvBgpHz3P0iAWBGqdTaT xLqx9Vf/c9QfVPhrxUhaUWQMlyl56zXYw5i+qBfwsILl/W9r2P1TuczdgFOgzZyeDOCl fYYQ== X-Gm-Message-State: AOJu0YyoGbQO9RLiadfzEzSOk4GjKRUj+jeHOGu2tUYwubMdiadk1nIw WmowHENp/ES3D+IXUI9BfUFEQc8p9RYij0Y4Mn9VaPscr32IphJ6 X-Google-Smtp-Source: AGHT+IFzSnuI9+m8TtVj40VZtktnFq63E06IKbZ6g92J1/kCvXWoJuT0IbxmhnXck19cwpQWJd/5zQ== X-Received: by 2002:a17:90b:344:b0:2e2:973b:f8e7 with SMTP id 98e67ed59e1d1-2e8f11bad49mr1467421a91.38.1729903714766; Fri, 25 Oct 2024 17:48:34 -0700 (PDT) Received: from saturn.. (c-67-188-127-15.hsd1.ca.comcast.net. [67.188.127.15]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2e77e48ad66sm4249738a91.4.2024.10.25.17.48.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Oct 2024 17:48:34 -0700 (PDT) From: JP Kobryn To: shakeel.butt@linux.dev, hannes@cmpxchg.org, yosryahmed@google.com, akpm@linux-foundation.org, rostedt@goodmis.org Cc: linux-mm@kvack.org, cgroups@vger.kernel.org Subject: [PATCH 0/2 v2] memcg: tracepoint for flushing stats Date: Fri, 25 Oct 2024 17:48:24 -0700 Message-ID: <20241026004826.55351-1-inwardvessel@gmail.com> X-Mailer: git-send-email 2.47.0 MIME-Version: 1.0 X-Rspam-User: X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: 22B99C0021 X-Stat-Signature: e7efbjz8p3oqm9yrbj1bxixanasyu5g6 X-HE-Tag: 1729903690-72523 X-HE-Meta: U2FsdGVkX1+cSzqvRxCO2PUgeoLatWPe3/GP5e6mR8Urd15A0pHToJfgAtrGVEabxgWh5IaRJyZqKGV20NODtbBvV88irGNU1E7Yrxf9oxr9oDs/fCdxs7NFbnoV9E/z+Odfd3T/W1g9wFX2cGv04FjEp8Oj27wX3pOngR9NjZnxOhQ4q7ijNj77n0ShkkkEi3NCc3zfG0vDSF9Xk20Kul6p4/7MOZ/Yvxhp5kWkYv3iuTNKAEVBKnVWVY1+a/ytUTD8kLTTyD9d4zDL65vL205wAIVZMsgXnezhCpMs3owJf5y23Q1Klc3OmJ6u2j7IyAkZold4eHLyWP+PifRfPgbPCulsRgr8HiWr/kXg5JZsCOHtUz6OaBRo7BIsFlZP03xLjFOIMon8kONCHVrqUeGYyOuFTHZ8hfW98E9+gIdtaR5SVLfL5ee6xz4ygDWCpIEDq3hbegiKQ8E3BLWdjZug5UJDbhXKYhi1dCchnA3C183VlrQWlaiiv+HUUfe1vnh+X4/YMMphuj/QBFHiWoptjO/CmBADFOG2eL7HdaTw/BrzYKaTu7aN+xw55ehKnsJOQ+5K85fm0k1hOema6FFJO8t7lZjIW+qwDHJLxhU/+PiIC+lpgo61/1yFMUDHZBzy/XvOXO1AB4eXxQahp9WbISokzVfi9y1MOhnCmBzBCf0R0remlV+r2VdlWmjLCzYpTwgnFJSPjRIipujn6WBDxyi/EfxRnuDXZmVwJSL4wQGDIat3EiGleqW0RZSUC81GC6nd2KY9DfY3xe5BGsUmfMnAbmEAGkgodyV450xBc2dYPweRanJ7kqUMuX/CycGjik/Ic0KoywT1c8/5XXfjdcjmgn6pYoxJ2UIf9ZcFU2GR+wiknzlpOazm7TsDQKJaERC+x2rEGNrQInJoaNxjfkVJ+Q/rtItx6Yu/zmA7NfTsBQacL/L86vT43aM0DcRgE3qjBV2VVBchaEs s1q4VnGF E19kpcrH/Qt4FbjegCtDiErDCUjbdR9QfoFhTUTNzvPnmeEAVP5oTO+yH4d1soocKXgnB8J63KLEq4TwrretKJlaJsjbCiR7welyjMLrgfwFgY4MtFKkGH72v+ktHE0i/jgnDnROyksE5DYa23GM9bLV5nh8xGEiM8SnnSKutQTh5REWcGGGdPTmNVa+4PbIbBW1JEMQeSRa2MqMeXlbgEZKHdYUTQc0CcSw2fIUfmL1K6bP6ANPWfrXy3LlPotD7YV2aIE3V3WS0ZRw2R3Qm6fpA0kkjHB9y3zglT5Iu9g9JBmYSN3y3rm+yZiRFySVQYd62wCEanqTxHYYFYbGEiZiMyuaOQvbTXfiv X-Bogosity: Ham, tests=bogofilter, spamicity=0.008859, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: This tracepoint gives visibility on how often the flushing of memcg stats occurs and contains info on whether it was forced, skipped, and the value of stats updated. It can help with understanding how readers are affected by having to perform the flush, and the effectiveness of the flush by inspecting the number of stats updated. Paired with the recently added tracepoints for tracing rstat updates, it can also help show correlation where stats exceed thresholds frequently. JP Kobryn (2): add memcg flush tracepoint event use memcg flush tracepoint include/trace/events/memcg.h | 25 +++++++++++++++++++++++++ mm/memcontrol.c | 22 +++++++++++++--------- 2 files changed, 38 insertions(+), 9 deletions(-)