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 95E27C38A2D for ; Mon, 24 Oct 2022 16:44:56 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id DD49B940008; Mon, 24 Oct 2022 12:44:55 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id D848D940007; Mon, 24 Oct 2022 12:44:55 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C25E4940008; Mon, 24 Oct 2022 12:44:55 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id AF7B0940007 for ; Mon, 24 Oct 2022 12:44:55 -0400 (EDT) Received: from smtpin19.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id 827D8A0535 for ; Mon, 24 Oct 2022 16:44:55 +0000 (UTC) X-FDA: 80056417350.19.A1A0918 Received: from mail-lf1-f42.google.com (mail-lf1-f42.google.com [209.85.167.42]) by imf08.hostedemail.com (Postfix) with ESMTP id D03B4160002 for ; Mon, 24 Oct 2022 16:44:54 +0000 (UTC) Received: by mail-lf1-f42.google.com with SMTP id g12so7161572lfh.3 for ; Mon, 24 Oct 2022 09:44:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=Rsjvrp3iW2kypJVaihgadkCqWB0OZ1nSN1yf4zAR9IQ=; b=YLCExCka/3quqw/y/vbP2KQEbdHCeTUqBI/pm3H4b6QQIZGUfPxjdjaf0wX0ti2M4g vqMwn6zwpDcQBLwivoJoEyzCZrSbFMcG2mWSvihjDpthlnm167NiuPFdSxGYGTnTfzWh ymJwL0BO/H0ifbx6+s0W+8Uwi6uTatMmoKspZWSR4IdGhzuRBMjr/HQxgG8BGJeph6Ic 9y3EdlfuT4BaNAB4S2A3Lt+Ef3c2Zr6sarlxQK70aQ5CB1YoKlbgFEutUFmya3oFEONT GnQmjUFn6w7kgt0YJxswlIUR/yWMUtv0XFYnkESxs4KMqfNIfHpJZ33duPew5eb11HmP rwig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=Rsjvrp3iW2kypJVaihgadkCqWB0OZ1nSN1yf4zAR9IQ=; b=AgjOpB2jSr5AE/yxJDmckC1VLhEtkFv644tZ3B9xs/8zUTwOaRX+UezHRFd00lOjRA Al3rlKV6rqZSgDfO/KC1RbsPoVqW2qjP6sp7OxBijc2ZxPO9PMyyekCOM8VtqYbvr36o wr06xry/DyHocs6yJO8hGz8GuFT2TL8GSrF7H1aQLzLsig68ZOVfiw1kGOkqs/uURxEW ikuPhmks3KYMIx0Af1oVSCDAxsa/HaGtA4k3aLSl8T7cYxGAl1sAMUY5p4IijuZdaXKj u6L8TNWwxh8q6YxQnPtmBg+Vc2a2Pexwneka2AlRkINmUgLz1mOtCzu2ZgUkyI06tbvq AFaA== X-Gm-Message-State: ACrzQf2QCGnkpcN5bLM78d38U40+MdmazLo5c32+H0KqKcFzik6sg17L xPzFUpD5AEGtgm+Vqawtkn4P+NtHn/4FBv/crzDR5A== X-Google-Smtp-Source: AMsMyM7sSpnp3OdyoCGSy/epo9odNWguoqqalz1vsaZgcUVCODKVFmSNmbmuB0NJst44GgZd1Plopgf2ZNo5vrjaa2c= X-Received: by 2002:a05:6512:2282:b0:4a2:7dc5:6630 with SMTP id f2-20020a056512228200b004a27dc56630mr12195159lfu.645.1666629892982; Mon, 24 Oct 2022 09:44:52 -0700 (PDT) MIME-Version: 1.0 References: <20221024150922.129814-1-gautammenghani201@gmail.com> <20221024111621.3ba17e2c@gandalf.local.home> In-Reply-To: <20221024111621.3ba17e2c@gandalf.local.home> From: "Zach O'Keefe" Date: Mon, 24 Oct 2022 09:44:16 -0700 Message-ID: Subject: Re: [PATCH] mm/khugepaged: add tracepoint to collapse_file() To: Steven Rostedt Cc: Gautam Menghani , akpm@linux-foundation.org, mhiramat@kernel.org, shy828301@gmail.com, vbabka@suse.cz, david@redhat.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" ARC-Authentication-Results: i=1; imf08.hostedemail.com; dkim=pass header.d=google.com header.s=20210112 header.b=YLCExCka; spf=pass (imf08.hostedemail.com: domain of zokeefe@google.com designates 209.85.167.42 as permitted sender) smtp.mailfrom=zokeefe@google.com; dmarc=pass (policy=reject) header.from=google.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1666629894; a=rsa-sha256; cv=none; b=6tz8JDQ1I3c97Mx+X2NMtSmv2EJTq6f+TEFtk9Y1TYzk+pga8MqKqG+SWAKSR+esMOQXqC LxjfLsiVQMq3qdb49O5LzYvCdTbvfmJx00x7PqyYr+DU8JxQAH0k12PzI+xyksa15JypSo m5WzbRHgaNDh3xwReTYqe2yUk+GkCho= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1666629894; 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: in-reply-to:in-reply-to:references:references:dkim-signature; bh=Rsjvrp3iW2kypJVaihgadkCqWB0OZ1nSN1yf4zAR9IQ=; b=AwlpBcLPxoFPH9QLnrsaZ+iEGBwZtxBPzk79iApH2tX6BBi7wXApNRrNtbPNWkbsa+Lm/V xVTR4KZc5aiExH9VaGECvfVuaUZDoLuR9cyTBTXazNy4G/7hA5ye26/BtEuvXeOIDEBW3x GgOqWElOk4rvu6bqRzbciAt7gn4GZ/o= X-Rspamd-Queue-Id: D03B4160002 Authentication-Results: imf08.hostedemail.com; dkim=pass header.d=google.com header.s=20210112 header.b=YLCExCka; spf=pass (imf08.hostedemail.com: domain of zokeefe@google.com designates 209.85.167.42 as permitted sender) smtp.mailfrom=zokeefe@google.com; dmarc=pass (policy=reject) header.from=google.com X-Rspamd-Server: rspam02 X-Rspam-User: X-Stat-Signature: 84w7fz89beap5fox3o5tbd1dzys9fsph X-HE-Tag: 1666629894-427368 X-Bogosity: Ham, tests=bogofilter, spamicity=0.017272, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Thanks for your mail, Gautam. > I try to keep dereferences out of the calling path as much as possible > (adds to I$ at the call site). This was probably due to the way I handled trace_mm_khugepaged_scan_file(). Perhaps that can be cleaned up at the same time as this patch, for consistency. Also, no qualms about adding this tracepoint; there are a few scan result codes that overlap between hpage_collapse_scan_file() and those possibly returned in collapse_file() such that, if we only have the one tracepoint in hpage_collapse_scan_file(), it could be ambiguous what callsite the error path stemmed from. Luckily this hasn't been an issue thus far. Lastly, a few other items we might care about capturing: - is_shmem (perhaps the filename is enough to know this - but I know at least once during development I was caught off-guard b/c a mount I thought to be file-backed turned out to be tmpfs (and something I didn't think to question until I had wasted some time on other paths)). - index Best, Zach > Could you just pass in file, and then have: > > __string(filename, file->f_path.dentry->d_iname) > > [..] > > __assign_string(filename, file->f_path.dentry->d_iname); > > > If you are paranoid, you can have the above also be: > > file ? file->f_path.dentry ? file->f_path.dentry->d_iname : "(null)" : "(null)") > > > -- Steve > > > > + nr, result); > > return result;