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 93633C54EBE for ; Thu, 12 Jan 2023 22:30:46 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id C869D8E0003; Thu, 12 Jan 2023 17:30:45 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id C36EB8E0002; Thu, 12 Jan 2023 17:30:45 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id AFF348E0003; Thu, 12 Jan 2023 17:30:45 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id A12B18E0002 for ; Thu, 12 Jan 2023 17:30:45 -0500 (EST) Received: from smtpin22.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 6718A16070E for ; Thu, 12 Jan 2023 22:30:45 +0000 (UTC) X-FDA: 80347592850.22.8124A52 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by imf07.hostedemail.com (Postfix) with ESMTP id D4F9F4001B for ; Thu, 12 Jan 2023 22:30:43 +0000 (UTC) Authentication-Results: imf07.hostedemail.com; dkim=none; dmarc=none; spf=pass (imf07.hostedemail.com: domain of "SRS0=ApYb=5J=goodmis.org=rostedt@kernel.org" designates 145.40.68.75 as permitted sender) smtp.mailfrom="SRS0=ApYb=5J=goodmis.org=rostedt@kernel.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1673562644; 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; bh=y7iN0UStQTY1h1+Lqr0pbqKG2VQ89NQe6qLdMhLD7vM=; b=cxZIDfg8zNVNCSoESDWsmnRO7jK9Wjh9edTX2vF8HE/JGyoCbNLwNnECq97l8JC+PTK+h3 KT8OITKeovAN8zxw9JYUgn0SQq/Yh7k0Ev59Sw5EEPqDLA58HGDlCl3NnvzuTn9CuBWiOL GOAH8sBYKNWwmynG5ffzxf1NFsBpsxU= ARC-Authentication-Results: i=1; imf07.hostedemail.com; dkim=none; dmarc=none; spf=pass (imf07.hostedemail.com: domain of "SRS0=ApYb=5J=goodmis.org=rostedt@kernel.org" designates 145.40.68.75 as permitted sender) smtp.mailfrom="SRS0=ApYb=5J=goodmis.org=rostedt@kernel.org" ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1673562644; a=rsa-sha256; cv=none; b=fYGF06hnnoIVr12NLqaOnLfK5+J4poyqgF7B31RjIEJzxM9ICGpnM6csNC8+jBP9Oa2Xjy W9vZEBodHM+d11Gr3igBRXfMFcmDb57hz3dEOQrMrjnPPgevFHrUQNu06GBJrYwzvKE0jb Cd3jUBU+VC+Tb0aoEfZ5xiMXkwEv5Lg= Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id EA762B81FAF; Thu, 12 Jan 2023 22:30:41 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B26E1C433EF; Thu, 12 Jan 2023 22:30:39 +0000 (UTC) Date: Thu, 12 Jan 2023 17:30:36 -0500 From: Steven Rostedt To: Matthew Wilcox Cc: lsf-pc@lists.linux-foundation.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, bpf@vger.kernel.org, Joel Fernandes , Brian Norris , Ching-lin Yu Subject: Re: [LSF/MM/BPF TOPIC] tracing mapped pages for quicker boot performance Message-ID: <20230112173036.01677fa7@gandalf.local.home> In-Reply-To: References: <20230112132153.38d52708@gandalf.local.home> <20230112171759.70132384@gandalf.local.home> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: D4F9F4001B X-Stat-Signature: hyr68h3y1pnkstn3cshfy7o1fbwutg7d X-Rspam-User: X-Rspamd-Server: rspam08 X-HE-Tag: 1673562643-739660 X-HE-Meta: U2FsdGVkX1+6cuRo15T/MPit0T/BfyyiNk2ZeIaYqg92zFucRv54tuqOLoujCXL+xmc7IFOkT7JlIaR8z73ek4DWlLN7hOzpzGo9hF7ydCfWLHqJv506Co+qqvntKBL0J5UIR8E105kqN377StpPAKdGfflUVfHx783TbEryoOVBo7Su+eNGUltCE4j1Bx7bJK81OV7Lx7QHFFPRjdY/975CJq3Kitm+8N1gZXquZk76ur3lrh6aMYIVkbqUe8ktq7fh5g865ikj6c3IDaPQym6GLuhb3dPnQCLR8v5XVuW1gE7Ngl+Q/S44R3ppHh1tr3N8ikgIKB/Mk+cyH7iLVPFcwzB0m0rS33qQVTv52UVhgsNJNzedeoNkuzJU3ZmVbZj+VGalBFk4VvOxjdN9nhVM8oSfFg3NTS/h6gkolcqPBnQWrfS2qOryt8K6FUxDPUHOSe0Z/h92xbH6o6CFsuiPqNKF8H7cS36zZYAz2RJ8C6vyorKh3tXxVN3qZ2zsT3C96y+tZRE1JJKOmfLNrJPCyLqyfgsLDdbeL5A1C6LVa2oIp3ZaAPAATO2zmCoGNK28EnQOqMXtK7IJ+cT3smKNCQrp5OB+AYUjCdBwLeaCykHD0Jb7pC0oobTXvA4G3+puAewlQ/lPAHvYYI0CM3md5NXSF2ZW2TYBRBKikL6LKpww3zQOdJlne4zNs82aO24SDWLgUX/opj2gtw9x/7Vs5Z5mtYFr9gpWJ1SwS04I/VVSGykJQQAtrvHpbz/p8vzmX4UmVvx5Fd1SmgWcHMpxB1Bl8AXrfwl4yt+N8AnanNTEe4fA0jHWDsN5MgiZgSJV/fpObo/1kLT4qC/avddmikddt2EWkyqzXONSoP/bGsrH6DdxJCIJVee7v9m/m3dXR2pOf819oUxk6ajX3bOAOOxGPK6F8E7qT+g9SXv7rf0Z0BK1MDLOfWjxhukkJUgAZ25FE6MPIR1hqVd ZBuAzr46 Q/eImAGGPWpxO1g/xMIGT1yWbTEy0RF7l7e+mSPX/aLNyL/TatM7dNGgFJTLzgeLvQK9u6ABYnZrO/AKqmW6LxmK2zYfjap8mxMQ+ 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: On Thu, 12 Jan 2023 22:24:53 +0000 Matthew Wilcox wrote: > > Great! How do I translate this to files? Do I just do a full scan on the > > entire device to find which file maps to an inode? And I'm guessing that > > the ofs is the offset into the file? > > 'ofs' is, yes. That should have been called 'pos'. > > And as you know, inodes can have multiple names in the filesystem. > I imagine you'd want to trace open() to see which names are being > opened; you can fstat the fd to build the ino->name lookup. I'm not sure which file that points to the inode matters. I'm guessing that if I have two files that are hard-linked together, and I run the readahead() system call on one of them, it will speed up a read of the other one. Or am I mistaken? If I'm not mistaken, then just finding any file that is mapped to the inode is sufficient. The purpose of this is to speed up boot by having portions of the files being read already in the page cache when they are needed. -- Steve