Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp214483ybk; Thu, 14 May 2020 21:42:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyOuF4KplBdDsnHFOZ286YatBtcx7jqr9FgrW00NAs0b/Vmg5A0XQ+7vnMnj+fXwNwmLWD8 X-Received: by 2002:aa7:cf92:: with SMTP id z18mr1192530edx.13.1589517768469; Thu, 14 May 2020 21:42:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589517768; cv=none; d=google.com; s=arc-20160816; b=mZPK1rInSXkekes78fajsgjgByeE1pFx+6gE1PcrpwH05rXSkA5k60+fLxUb90mFef LezNofI0RjHAfaDtqoMJ+OTp7BPiXkZgCRUSXnEsu/mZ76bJVujW4ju4oB6807v8NgR4 nhhPq2ZkvF4Y+I9rTHCvKu8g3Iloc3ikNGtC9yWsXR0RGXKTMKololA+P872xMzXYT0V s82sT4ggge2mMQJQfLSzrKUqwmjDgK/UjDSvLYxSgftNCdKGwRN6+R2DGAfxX3UItwB2 tp2Ni3a4Z69v4mSa0s2yL2peA39x1eArlxrIODcXVvPE9SWlx4L/rVazriT32I+Bh2Ml QNpw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=Hwk2/99znjfhRle7qBMSjtBHT652bBvdygaigIFVAvw=; b=Be7mD3LGPcbSyydGhk64U6EILUWEGrEJEk05ocSxf4gZC2LCju/5kNpTp43mmghoCw aLNI8sfApLenwv+/8fmqL3qeE2VKXiEpPI2lygivVzzxRw/OGEpXssGHjtMWEU2uE+Pu m5kWhePJB9EzI5/Rq/QCAK6IQ3SBHrXLHD+EZhE5oWJBUkEouA6a0ACrkDfgh21GP6XP tYnvCTpus8uomQnqnOSyxjbMcxYORbxzY6q+zLLeUzNaD5HMG9w/69cuXjhSYuCI+0q3 nSj2rMQ7euYpSCjyu9X60XovBsL2/i9GSaj1VWonWlFmgOFB89YI5emmLd2pEEE1qIqp LEfg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d24si476116edy.387.2020.05.14.21.42.25; Thu, 14 May 2020 21:42:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725957AbgEOEEa (ORCPT + 99 others); Fri, 15 May 2020 00:04:30 -0400 Received: from foss.arm.com ([217.140.110.172]:48226 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725616AbgEOEEa (ORCPT ); Fri, 15 May 2020 00:04:30 -0400 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 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.