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 46EBAC433EF for ; Tue, 11 Jan 2022 06:58:10 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 7BEBA6B0072; Tue, 11 Jan 2022 01:58:09 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 747966B0073; Tue, 11 Jan 2022 01:58:09 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 5E83F6B0074; Tue, 11 Jan 2022 01:58:09 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0029.hostedemail.com [216.40.44.29]) by kanga.kvack.org (Postfix) with ESMTP id 4B2436B0072 for ; Tue, 11 Jan 2022 01:58:09 -0500 (EST) Received: from smtpin19.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id F1CEA824C421 for ; Tue, 11 Jan 2022 06:58:08 +0000 (UTC) X-FDA: 79017101856.19.B90A202 Received: from out2.migadu.com (out2.migadu.com [188.165.223.204]) by imf17.hostedemail.com (Postfix) with ESMTP id 57BDA40006 for ; Tue, 11 Jan 2022 06:58:08 +0000 (UTC) Date: Tue, 11 Jan 2022 15:57:56 +0900 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1641884285; 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: in-reply-to:in-reply-to:references:references; bh=kWv0f5f+fPdDGe3k1xHWjG81ExIIKRuEoGoQtrB/3SI=; b=vvfPxJwWak84H/tM+eJWeI6hGtEjOgXqwK+Z0G1lvxct/n/ZXjZgWTazzHW6Mt98LnNvWo cyYcq2iwyuCO3XgRH/N7IdUTeY3xyplPKF6B3GHZW37RJcK7t6kmT1LUdQp6lVphnX1b1s fvMffVZcgT/erW1ffzUxVE1yrZSgWQw= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Naoya Horiguchi To: Anshuman Khandual Cc: linux-mm@kvack.org, Steven Rostedt , Ingo Molnar , Andrew Morton , Zi Yan , Naoya Horiguchi , John Hubbard , Matthew Wilcox , linux-kernel@vger.kernel.org Subject: Re: [PATCH] mm/migration: Add trace events for THP migrations Message-ID: <20220111065756.GA808887@u2004> References: <1641531575-28524-1-git-send-email-anshuman.khandual@arm.com> <20220111015822.GA799985@u2004> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: linux.dev X-Rspamd-Queue-Id: 57BDA40006 X-Stat-Signature: d6qoy4e6dhf5y6zeqnznwou1utkbou3a Authentication-Results: imf17.hostedemail.com; dkim=pass header.d=linux.dev header.s=key1 header.b=vvfPxJwW; spf=pass (imf17.hostedemail.com: domain of naoya.horiguchi@linux.dev designates 188.165.223.204 as permitted sender) smtp.mailfrom=naoya.horiguchi@linux.dev; dmarc=pass (policy=none) header.from=linux.dev X-Rspamd-Server: rspam07 X-HE-Tag: 1641884288-773789 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 Tue, Jan 11, 2022 at 10:31:21AM +0530, Anshuman Khandual wrote: > > > On 1/11/22 7:28 AM, Naoya Horiguchi wrote: > > Hi Anshuman, > > > > On Fri, Jan 07, 2022 at 10:29:35AM +0530, Anshuman Khandual wrote: > >> This adds two trace events for PMD based THP migration without split. These > >> events closely follow the implementation details like setting and removing > >> of PMD migration entries, which are essential operations for THP migration. > > > > I often want to check which individual pages are migrated to which places > > (or not migrated) for testing, so these new tracepoints could help me. > > Maybe these can be much greater if they can handle other types of page > > migration for raw pages and hugetlb pages. Is it hard to cover all such > > page migration events? > > Are you suggesting to cover all migration entry transitions for normal > and HugeTLB pages as well ? Yes if you like the idea. I think that some events listed below can be grouped into one tracepoint event with showing args like pgsize or read/write flags (or implementation detail is up to you). > > migrate_pages() > unmap_and_move_huge_page() > try_to_migrate() > make_writable_migration_entry() <--- > make_readable_migration_entry() <--- > remove_migration_ptes() <--- > unmap_and_move() > __unmap_and_move() > try_to_migrate() > make_writable_migration_entry() <--- > make_readable_migration_entry() <--- > remove_migration_ptes() <--- Thanks, Naoya Horiguchi