From mboxrd@z Thu Jan 1 00:00:00 1970 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 63A88D10399 for ; Fri, 25 Oct 2024 01:16:07 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id D50226B008C; Thu, 24 Oct 2024 21:16:06 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id D00236B0092; Thu, 24 Oct 2024 21:16:06 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id BC8176B0093; Thu, 24 Oct 2024 21:16:06 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id A1A9D6B008C for ; Thu, 24 Oct 2024 21:16:06 -0400 (EDT) Received: from smtpin11.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id 6D23C40233 for ; Fri, 25 Oct 2024 01:15:55 +0000 (UTC) X-FDA: 82710357954.11.E695E37 Received: from out-173.mta0.migadu.com (out-173.mta0.migadu.com [91.218.175.173]) by imf08.hostedemail.com (Postfix) with ESMTP id 0924E160023 for ; Fri, 25 Oct 2024 01:15:50 +0000 (UTC) Authentication-Results: imf08.hostedemail.com; dkim=pass header.d=linux.dev header.s=key1 header.b=qgNrtW3S; spf=pass (imf08.hostedemail.com: domain of shakeel.butt@linux.dev designates 91.218.175.173 as permitted sender) smtp.mailfrom=shakeel.butt@linux.dev; dmarc=pass (policy=none) header.from=linux.dev ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1729818810; 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-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=nxGzqzSvBxam38nAAy8n3GTlcEwIEbCe+o8PfZM5Tuk=; b=1gCqK/IpiSuuhWTeHnJAjqlrEklsmm5v4iT8EXjZbP+zyvm4b+ndAwRyd8CagcP30+7PpN 5ydMJSpg7hzfRevpHEUy0AFskz3amQvYoo2XnnCQT8z/Zb2W2l7SNBRx7uwSlZJrxzU/ja fY/IJ3GqBb44hdBEhjHpGAxp/yMZ0UI= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1729818810; a=rsa-sha256; cv=none; b=Rm5rt+GDqBsBt9eo9JL3/557pSISapvrV0Qu8ID6ucCgmycRTexwgnwLNeOfQnxOP/TShZ hgguIfUm9Gc2PoJ7fU1STipkqo/oAzteP60j4Bacrmoz6aYBbbbnyyxEB9Gn6RSaz9rjHe w1PaYPWezgA5eqibFJ8SgS3/RLQx0nw= ARC-Authentication-Results: i=1; imf08.hostedemail.com; dkim=pass header.d=linux.dev header.s=key1 header.b=qgNrtW3S; spf=pass (imf08.hostedemail.com: domain of shakeel.butt@linux.dev designates 91.218.175.173 as permitted sender) smtp.mailfrom=shakeel.butt@linux.dev; dmarc=pass (policy=none) header.from=linux.dev Date: Thu, 24 Oct 2024 18:15:56 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1729818961; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=nxGzqzSvBxam38nAAy8n3GTlcEwIEbCe+o8PfZM5Tuk=; b=qgNrtW3SxMsxkDnK0Izgk5oqlOwWMaaUt7JJnlNQz1EP9QjRMKl+21SWEMb1bvlxH7isY1 qJvrYuLwSiltSgT+mE4Kq6YqSNWrvzKlJPopKIhMN3xEWabSTk3SgoQw+CO0Cm4+dFMPoN s8wYLUt5YBx7dpPXEMaS8GTH7Pwy+2Q= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Shakeel Butt To: Yosry Ahmed Cc: JP Kobryn , hannes@cmpxchg.org, akpm@linux-foundation.org, rostedt@goodmis.org, linux-mm@kvack.org, cgroups@vger.kernel.org Subject: Re: [PATCH 2/2] memcg: use memcg flush tracepoint Message-ID: References: <20241025002511.129899-1-inwardvessel@gmail.com> <20241025002511.129899-3-inwardvessel@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Migadu-Flow: FLOW_OUT X-Rspam-User: X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: 0924E160023 X-Stat-Signature: o8q4p59prik8wqmkf7f9hgm4uqtyd4mc X-HE-Tag: 1729818950-320737 X-HE-Meta: U2FsdGVkX1+GKS5qiSfdp9PZUqJw9y1zyd9lX09o+B9dY6y/GxQ0XwiVqZz0eDywmTKX5mxkY/WhdEtGH1XzHNhycF2wfRn1y/seDblloYXvZmxj1/RGIM8hS/ce7FLVQ5qrSmrvNjpBunsUhuZ0el8c6hiGkQWIRHz3Lpcq5rSxhXNSYRPHTPAR9rcLEsofBJYyO2CJZCDxjDz4LogzazKdZE7gNE1HMNusU5hnpX03mZYMkTGxyJ8msXkMScbPTG1LIjbDy5tBSK8uYdmVWrjWy0iGXMICSqpTuZCw+hgy3Ec4vMJ+oQyw++lcroieI/afZ2+NdTuFZ/z+t5BYP+D6dTgX7u1hcJWCNJ1fLPP1UpPuEVifzgtGc0p3yWD0xIvAz+FOXA89rlulcgAiyR2nfNiARugah8MeIiS7hvDfl8XFqE5cQIm00xBeRSb2wzy1iZ3vGUbk3VcZrw0LV9axVdwbFKVNk9bNJ1kjckbF4P2v1TG3DL38yC0bQw5UooqF4EiZMsCYsLLbGeoYPe7C5Z7Djk46RKULl0ySOu/6HCH0DcEePtKnwglTqQD0c7VjgfVKp73X1BdSnOj3Z1Av31gLH4wyLhfJyErBSBwMmF0BcqFX6DECCNdEa4UYNlfbCaBJ4CEFOEBeJm24DFoBz37Sa8yEOuBodWh2VwD/wqJvSgkXFAhA/2u3816f2U8GgZ8zyXY/rQ819t93ItR8sZhLRyLJUX/xrt2h0wg4Ut50E27Yb+ZOw0qNDAbUQfAaobCjDtrV1Eqt6lLq2ez295OjgF2+G+hzx8bVesy8s6VonHr5+X0JQMPtPPW2Ot07Ypm+wfWd5jLV5PFShUv+/mXjjOCWXgdS+sb0HzihUXb2B7YYy8t2fswNomzTFELp0zy70jNwb5AwkM04t/+eq5JQCGS1ukiKy4fPs3MIJgcNxQexH3+/DrC31BFD5VxDpKjWp1D+EMl1YAo oLw1DPhB J4AB7u/y9sVIVS2kzGjvrRwwbnKnnpvvcRyvmSCwH1FgmXQwq7ZbljFfJLXS1ucBD+MiDDpSOwRBhKsdEGQG5OQMd/Y1GZbx/mVB9chPyR2xbAXYK+48+frFMAKDPrZrADerYXYzR2u2jt06zm1zRa+5JeWgag00kJwTy4gMICiunDuDTYHGl2YTHXRa4HkBv9gHY X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: On Thu, Oct 24, 2024 at 05:57:25PM GMT, Yosry Ahmed wrote: > On Thu, Oct 24, 2024 at 5:26 PM JP Kobryn wrote: > > > > Make use of the flush tracepoint within memcontrol. > > > > Signed-off-by: JP Kobryn > > Is the intention to use tools like bpftrace to analyze where we flush > the most? In this case, why can't we just attach to the fentry of > do_flush_stats() and use the stack trace to find the path? > > We can also attach to mem_cgroup_flush_stats(), and the difference in > counts between the two will be the number of skipped flushes. > All these functions can get inlined and then we can not really attach easily. We can somehow find the offset in the inlined places and try to use kprobe but it is prohibitive when have to do for multiple kernels built with fdo/bolt. Please note that tracepoints are not really API, so we can remove them in future if we see no usage for them. Thanks for the review, Shakeel