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=-5.4 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=unavailable 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 04D6FC433DF for ; Thu, 9 Jul 2020 20:15:25 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 953EB20720 for ; Thu, 9 Jul 2020 20:15:24 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=nvidia.com header.i=@nvidia.com header.b="jVNHBz9s" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 953EB20720 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=nvidia.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id C0B256B0003; Thu, 9 Jul 2020 16:15:23 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id BBC756B0005; Thu, 9 Jul 2020 16:15:23 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id AAB6E6B0006; Thu, 9 Jul 2020 16:15:23 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0050.hostedemail.com [216.40.44.50]) by kanga.kvack.org (Postfix) with ESMTP id 928A26B0003 for ; Thu, 9 Jul 2020 16:15:23 -0400 (EDT) Received: from smtpin01.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 3D8BE1E01 for ; Thu, 9 Jul 2020 20:15:23 +0000 (UTC) X-FDA: 77019642126.01.smell48_53062f126ec8 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin01.hostedemail.com (Postfix) with ESMTP id 05EFE20003176E73 for ; Thu, 9 Jul 2020 20:15:22 +0000 (UTC) X-HE-Tag: smell48_53062f126ec8 X-Filterd-Recvd-Size: 5681 Received: from hqnvemgate25.nvidia.com (hqnvemgate25.nvidia.com [216.228.121.64]) by imf01.hostedemail.com (Postfix) with ESMTP for ; Thu, 9 Jul 2020 20:15:22 +0000 (UTC) Received: from hqpgpgate101.nvidia.com (Not Verified[216.228.121.13]) by hqnvemgate25.nvidia.com (using TLS: TLSv1.2, DES-CBC3-SHA) id ; Thu, 09 Jul 2020 13:14:25 -0700 Received: from hqmail.nvidia.com ([172.20.161.6]) by hqpgpgate101.nvidia.com (PGP Universal service); Thu, 09 Jul 2020 13:15:20 -0700 X-PGP-Universal: processed; by hqpgpgate101.nvidia.com on Thu, 09 Jul 2020 13:15:20 -0700 Received: from [10.2.51.208] (172.20.13.39) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Thu, 9 Jul 2020 20:15:15 +0000 Subject: Re: [PATCH V4] mm/vmstat: Add events for THP migration without split To: Zi Yan , Randy Dunlap , "Anshuman Khandual" , Andrew Morton CC: , Jonathan Corbet , Steven Rostedt , Ingo Molnar , Daniel Jordan , Hugh Dickins , Matthew Wilcox , Naoya Horiguchi , , References: <1594287583-16568-1-git-send-email-anshuman.khandual@arm.com> <27CD781D-48F0-4019-934F-78994BAEC656@nvidia.com> <97219d3b-96e1-4371-59ea-d038f37a672a@infradead.org> From: John Hubbard Message-ID: <5968b2ca-98cd-cede-0716-9d44af630dce@nvidia.com> Date: Thu, 9 Jul 2020 13:15:15 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: X-Originating-IP: [172.20.13.39] X-ClientProxiedBy: HQMAIL107.nvidia.com (172.20.187.13) To HQMAIL107.nvidia.com (172.20.187.13) Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1594325665; bh=64de6mj32knug1ycAsIEPDw/tob+o4DwaofLTy/EY8c=; h=X-PGP-Universal:Subject:To:CC:References:From:Message-ID:Date: User-Agent:MIME-Version:In-Reply-To:X-Originating-IP: X-ClientProxiedBy:Content-Type:Content-Language: Content-Transfer-Encoding; b=jVNHBz9sSrgErZeEEZoiG/rvQlgR6ly4c3320YPwhznMocgqLizDOnxgOyQklSy10 b3ACumHDt9VEpuCs513lLiaQnITNl0JKaSP/2a97gjCnslDAl8JFJvtixWnyNCoqkE v/2u7EI/JznYXKxRapFzkl3Px9sTyTcEiqOTqdiYyf9rNNjFVuZfd6Putu0XYGG6DW CYf2iEnnEEz4VBIegeuKoY38uNJPH5WfvlEFeOSay0UAZe0LcRM3b+neXqiY/fkmKh bdvqvYld+GiqI2/gfAatyN8uYzQ2sowNQM7l1/Z9+XVJjJuH/M4dx40Y+lvOTIWIjn fkXJCX1DKbmOA== X-Rspamd-Queue-Id: 05EFE20003176E73 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam02 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 2020-07-09 10:42, Zi Yan wrote: ... > diff --git a/Documentation/vm/page_migration.rst b/Documentation/vm/page_migration.rst > index e65d49f3cf86..68883ac485fa 100644 > --- a/Documentation/vm/page_migration.rst > +++ b/Documentation/vm/page_migration.rst > @@ -253,24 +253,32 @@ which are function pointers of struct address_space_operations. > PG_isolated is alias with PG_reclaim flag so driver shouldn't use the flag > for own purpose. > > -Quantifying Migration > +Monitoring Migration > ===================== > -Following events can be used to quantify page migration. > - > -1. PGMIGRATE_SUCCESS /* Normal page migration success */ > -2. PGMIGRATE_FAIL /* Normal page migration failure */ > -3. THP_MIGRATION_SUCCESS /* Transparent huge page migration success */ > -4. THP_MIGRATION_FAILURE /* Transparent huge page migration failure */ > -5. THP_MIGRATION_SPLIT /* Transparent huge page got split, retried */ > - > -THP_MIGRATION_SUCCESS is when THP is migrated successfully without getting > -split into it's subpages. THP_MIGRATION_FAILURE is when THP could neither > -be migrated nor be split. THP_MIGRATION_SPLIT is when THP could not > -just be migrated as is but instead get split into it's subpages and later > -retried as normal pages. THP events would also update normal page migration > -statistics PGMIGRATE_SUCCESS and PGMIGRATE_FAILURE. These events will help > -in quantifying and analyzing various THP migration events including both > -success and failure cases. > + > +The following events (counters) can be used to monitor page migration. > + > +1. PGMIGRATE_SUCCESS: Normal page migration success. Each count means that a > + page was migrated. If the page was a non-THP page, then this counter is > + increased by one. If the page was a THP, then this counter is increased by > + the number of THP subpages. For example, migration of a single 2MB THP that > + has 4KB-size base pages (subpages) will cause this counter to increase by > + 512. > + > +2. PGMIGRATE_FAIL: Normal page migration failure. Same counting rules as for > + _SUCCESS, above: this will be increased by the number of subpages, if it was > + a THP. > + > +3. THP_MIGRATION_SUCCESS: A THP was migrated without being split. > + > +4. THP_MIGRATION_FAIL: A THP could not be migrated nor it could be split. > + > +5. THP_MIGRATION_SPLIT: A THP was migrated, but not as such: first, the THP had > + to be split. After splitting, a migration retry was used for it's sub-pages. Just a documentation nit: "its sub-pages", not "it's sub-pages". thanks, -- John Hubbard NVIDIA