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 X-Spam-Level: X-Spam-Status: No, score=-2.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 61DEDC433E0 for ; Fri, 15 May 2020 04:04:32 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 15C332065F for ; Fri, 15 May 2020 04:04:31 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 15C332065F Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 976FB8E0008; Fri, 15 May 2020 00:04:31 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 927F88E0005; Fri, 15 May 2020 00:04:31 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 83D348E0008; Fri, 15 May 2020 00:04:31 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0022.hostedemail.com [216.40.44.22]) by kanga.kvack.org (Postfix) with ESMTP id 697198E0005 for ; Fri, 15 May 2020 00:04:31 -0400 (EDT) Received: from smtpin05.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 1D04B181AC9CB for ; Fri, 15 May 2020 04:04:31 +0000 (UTC) X-FDA: 76817611542.05.flame38_447d8973e3816 X-HE-Tag: flame38_447d8973e3816 X-Filterd-Recvd-Size: 3207 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by imf40.hostedemail.com (Postfix) with ESMTP for ; Fri, 15 May 2020 04:04:30 +0000 (UTC) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id A82351042; Thu, 14 May 2020 21:04:29 -0700 (PDT) Received: from [192.168.0.129] (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 96C0F3F305; Thu, 14 May 2020 21:04:27 -0700 (PDT) Subject: Re: [RFC] mm/vmstat: Add events for THP migration without split To: John Hubbard , linux-mm@kvack.org Cc: Andrew Morton , "Kirill A. Shutemov" , Zi Yan , linux-kernel@vger.kernel.org References: <1589257372-29576-1-git-send-email-anshuman.khandual@arm.com> <8be2c517-ba87-400b-dfbe-461bd6065c2d@nvidia.com> From: Anshuman Khandual Message-ID: <9cac0480-210c-28de-259e-c17c88e8c899@arm.com> Date: Fri, 15 May 2020 09:33:54 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <8be2c517-ba87-400b-dfbe-461bd6065c2d@nvidia.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Bogosity: Ham, tests=bogofilter, spamicity=0.000026, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On 05/14/2020 11:59 PM, John Hubbard wrote: > On 2020-05-11 21:22, Anshuman Khandual wrote: >> Add the following new trace events which will help in validating >> migration events involving PMD based THP pages. >> >> 1. THP_PMD_MIGRATION_ENTRY_SET 2. THP_PMD_MIGRATION_ENTRY_REMOVE >> >> There are no clear method to confirm whether a THP migration >> happened with out involving it's split. These trace events along >> with PGMIGRATE_SUCCESS and PGMIGRATE_FAILURE will provide >> additional insights. After this change, >> > > > Hi Anshuman, > > It's very nice to see this work, and I think that reporting a bit > more about THP migration stats is going to make development and > performance debugging a lot more efficient (and pleasant). That is definitely one of the motivations for these events here. > > >> A single 2M THP (2K base page) when migrated >> >> 1. Without split >> >> ................ pgmigrate_success 1 pgmigrate_fail 0 >> ................ thp_pmd_migration_entry_set 1 >> thp_pmd_migration_entry_remove 1 ................ >> > > I do think we should decouple the trace event name(s) just a *little* > more, from the mechanisms used to migrate THPs. In other words, let's > report the number of THP migration successes, and name it > accordingly--rather than "set" and "remove", which are pretty > low-level and furthermore depend on today's exact code. Agreed, the events are low level and follows the implementation very closely. Hence posted as a RFC instead, as I was not very sure about these events. > > Maybe Zi Yan's recommended name is exactly right, in fact: > > THP_PMD_MIGRATION_SUCCESS Will also add another THP_PMD_MIGRATION_FAILURE even in migrate_pages() when a huge page could not be allocated and THP gets split.