From patchwork Fri Oct 25 00:25:09 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: JP Kobryn X-Patchwork-Id: 13849860 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 1A59AD1038E for ; Fri, 25 Oct 2024 00:26:09 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 863F76B0082; Thu, 24 Oct 2024 20:26:08 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 814606B0083; Thu, 24 Oct 2024 20:26:08 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 6DB846B0085; Thu, 24 Oct 2024 20:26:08 -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 4E71B6B0082 for ; Thu, 24 Oct 2024 20:26:08 -0400 (EDT) Received: from smtpin15.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 2A4F1AB936 for ; Fri, 25 Oct 2024 00:25:30 +0000 (UTC) X-FDA: 82710231912.15.A265576 Received: from mail-pf1-f171.google.com (mail-pf1-f171.google.com [209.85.210.171]) by imf29.hostedemail.com (Postfix) with ESMTP id 73059120006 for ; Fri, 25 Oct 2024 00:25:40 +0000 (UTC) Authentication-Results: imf29.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b="VVLx8/48"; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf29.hostedemail.com: domain of inwardvessel@gmail.com designates 209.85.210.171 as permitted sender) smtp.mailfrom=inwardvessel@gmail.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1729815913; a=rsa-sha256; cv=none; b=cBMm5hdhGNtCf6dea+lPHxYTNCJ32P4EhIwSGYKM3vJF8X44vMByjasLdwOyMS/FDTAVGX /aKHqMvzFQ2Yeseg0hPtUZJiFWypmm2UUdsbxC7mQWSIcmLwHvmIanPuD64vF2tb53I56r U0ilzBNUr+bPDCV+YaA3dVT9jA9veVQ= ARC-Authentication-Results: i=1; imf29.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b="VVLx8/48"; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf29.hostedemail.com: domain of inwardvessel@gmail.com designates 209.85.210.171 as permitted sender) smtp.mailfrom=inwardvessel@gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1729815913; 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=3PJgz9Jmj/D7t9EGN9OuBjc1HkWfB/KHbUE7yCQWc4s=; b=r4DP+2R/V0NU7l5upYZEI74jugffiHSHoZPIjrOLfRuqQxltnfpLE0Wz5B25YDruXzYXrT l4ocU21CKxrgdfBZz/3VilYDdHLbyAwIQzBvESGfpwkkiS/tvhFpwfFkG4dbb2fyNmoZOC GiCC3TB98wPguynKujV5tBarYnPk91Q= Received: by mail-pf1-f171.google.com with SMTP id d2e1a72fcca58-71e49ef3bb9so970780b3a.1 for ; Thu, 24 Oct 2024 17:26:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1729815964; x=1730420764; 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=3PJgz9Jmj/D7t9EGN9OuBjc1HkWfB/KHbUE7yCQWc4s=; b=VVLx8/48/oVeclhpJC9iPCwz6GVka4xFf3ymZRlkWlLuAx1/SEHYvTFJ2GJpDAQdgK frXYY2fROqWT5UuquhdUA1pBMGkCrMdi+LRFFv+zVvedyUEZEGwuiplDyLHk6QqmF1g3 7Amu0j5n71rkX9xjNhjVY0urWc+itexa8iCTpHIaln/Lh6ctj4HG3bSetSOkvf84lC9k WWZWlhiiO7os+Hv1tD5SOfhTqYlYNBcXMuEgTEUQXHQGZe/7kZNzcKcvtsRBHjsDydxh IlwA1QN+oYK3LOi5yH7yUjG6seQV+yXOn8hY8++9bc4RiijSpVa2yP75Ycz/Fh2B1RnP vd1Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729815964; x=1730420764; 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=3PJgz9Jmj/D7t9EGN9OuBjc1HkWfB/KHbUE7yCQWc4s=; b=lpQNGYy1rWtwdKOwJER8CHMbZrDZVw6FT50UOj7TCqaRVoeGViA3rsNFpbAsJ6O2vo uiRSi/x3J9wKEzGeywikIrMI8vaKaHEUU6DmK77GV7B072JuHxHcpB9DUIJ++mr1FwIV SjBQrrJnNcRT/Btll2qiFJkOL+whn4bbSLk0ge+KBTYWZVMV746twqtkbM+kTvekShjh 7vuXfMKZJj+srOX/qHA35psAy3xINjRS+5l49QplvIewyk6GAbWNnlXZTMUt+UrnRqWE u0PZrSxlOo63pzJID00XqzDzXIAHGN5WFuuffdCz/xQfPu0Jb8i4I/UWcn1wXdtIXxcd ETVQ== X-Gm-Message-State: AOJu0YyO3z5xlibNlVE10G5gQmqotGETuAOv5rLq7KbNSCO30qumNrpT oBEyB1yuj/fzhOm1xMFoA0kJYa6IOjvBANNxJfkpSSaMZxdFqY+c X-Google-Smtp-Source: AGHT+IHut0Io/j7owEZ53fDog2k2XL9946DasnUkHS4TNS7nxJl69tKH2Wbylp/q+23jSWkLxNqSQg== X-Received: by 2002:a05:6a00:1888:b0:71e:6f09:c0a8 with SMTP id d2e1a72fcca58-72045436b6cmr7175651b3a.10.1729815964311; Thu, 24 Oct 2024 17:26:04 -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 d2e1a72fcca58-72057a0b707sm21572b3a.128.2024.10.24.17.26.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 24 Oct 2024 17:26:03 -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] memcg: tracepoint for flushing stats Date: Thu, 24 Oct 2024 17:25:09 -0700 Message-ID: <20241025002511.129899-1-inwardvessel@gmail.com> X-Mailer: git-send-email 2.47.0 MIME-Version: 1.0 X-Rspam-User: X-Rspamd-Queue-Id: 73059120006 X-Rspamd-Server: rspam01 X-Stat-Signature: tqtsd4w3yr3is4i5qhy5fiszt7zzcor6 X-HE-Tag: 1729815940-535836 X-HE-Meta: U2FsdGVkX18B8VSSAGWJ0aBZrIQdd0FaodaSNA8V6cVvOgXB+jvKbTypfD/6zzbXyIMhCxa09eRZwzzTnjawaMFsFicuD8bt9cR9jZVHyX6GNp/4B9Xzpmo/RtqgnFhlXczB1Hul/0iUkoqRAYjHZoBzy5o18ZpGGE+zvUfHVvQb/eDFMfTp0S9/U2giJ9Pkl9mcxurE7/TGV3UyyP/UNmZ6KaAGNHgd/IJq+qtEVHWHVhWdFmvU8ueSRrPJogTStKLEud7tXYMmygr5ZH61b0HSSc81Ys1qdE/ienlF1LZMkLho3P76BlV4aSSZuGR/3F8Tj1onwcTWHELyvqSp3pyvLKbITqh4fVcMxFVoCaSAbzQvCJRa4I++2vIDph+eFzwfJGF/eiQVkIicM0Wk0OYRobZB07MF52eo2djvUZeP2h4TVJ8+tdoIupLQxgIM11mgYbS0AAjo2zW0onR3loXiB04WiaAeoKI5q+hJ04ecwdHVHdIkuB//At2Y84LLGwmgNAy+qZMEEE5+O9WgLK89MAT2EQTn15L8MkYxfwhCkPDUxkbEa0Qp1tRPMqYFUM60yUO5S7HX1Rmw3Hb2PMjy7T82Zc4NtCvPJ9jXdlAXj4WJv+vhn15XxA3YhmQDYqINi8UAZ/smvCoxf7lp8vEALSSgjSqDwIklTSKH3foXp+0KA8R6gNAZ8vvaWkzTgMpQOc2e+WCUlSVWxi6dOU2a97QWDzzJegyNcQw6hTZOjN5ziVepStYiZc2+9FSljRrrWUj6KjwMEl+V9hRkbbZroEWPEYYJx4w2WLylvaDwR7zxLlcZ8oP+Fd51b5Zx8lNH+uafxgR+4gNER3YTpJRlyV3kS44q7JjY4FhRpklCIrOuSK80EP8p2SH23o+aKVgIQRRcDst6ReXHroK2OWlLjOuDwBGfPKsb2uyRtW2lEcucHHFS+6uixvMK6YAuTW6BzsnDv3DZESw5+tT ysE8wk0c 4TAy7SmxaQE2Pbe58m2MDty81UcAL01bF9nsrilTvLrLIaqXvA36OmPSIk2H+qgHpoJ0RXXByLDktmV+eXdouIvjRY6kzteoNesKtfBmBEKpxnjE96b+ednLJOHoq/rXc4kaeP7eQtpUazfyCulM75IF5+jnE9S0W4RlwcD0w0Pg4jUsfYmmRVBb99eNEyrxcnkNoPQtqt6Pvu/J5p2ADkMAn7ZrhuqH8qkrGL7ChgGfjjhxHqyauaf+e7moOqKpHH9UQzYpC+lOFHNT+y+PACu/fPOKRYnktEY4s6Ef7FueITC5AGPtrb/bKz5sLkY9g3U4nlfhms6OlFa7Tr+OdilVOBd8q/kDy0Cg7 X-Bogosity: Ham, tests=bogofilter, spamicity=0.068326, 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, along with the reason for the flush. It can help with understanding how readers are affected by having to perform the flush; the event captures the info on whether the flush was skipped or not. The information collected could help in determining the effectiveness of the background work where the flush is scheduled periodically. Paired with the recently added tracepoints for tracing rstat updates, it can also help show correlation where stats exceed thresholds frequently. Note there is one reason called "zswap" that was included to distinguish one special case where a zswap function makes a direct call to do_flush_stats(). JP Kobryn (2): add memcg flush tracepoint event use memcg flush tracepoint include/trace/events/memcg.h | 56 ++++++++++++++++++++++++++++++++++++ mm/memcontrol.c | 7 ++++- 2 files changed, 62 insertions(+), 1 deletion(-)