Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1700217ybt; Thu, 9 Jul 2020 13:16:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzvO2LTuMFpa57leb4nnHeOVwLvmg6iGEFAC/cZAuKZfNekyzZmtkIxF2bbiyxvwGOMepK4 X-Received: by 2002:a17:907:2654:: with SMTP id ar20mr54936606ejc.62.1594325788211; Thu, 09 Jul 2020 13:16:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594325788; cv=none; d=google.com; s=arc-20160816; b=QL4dSbJwYnZFtgUucOrykpTxQGeFr1mRURdexpilLggu77OxqAIy94RfxfNET0hVEF YBk4G5uborQM/3FrdUHcUJRy9I12C+jQE8TjoFKurOe5R7siJO5Nt0TjMm8SbbnQwMvF smRVaa3210XKEy2+ysZJOwdX4sKoRetAYnY6zc3Ycio0ejHIB6E6oHOqEhdIb8ePU/m2 kcjwDV14LLqzmNYra+tqHmdIsPO/mhcO7F0RdJGHNLZX2MGlxOHzEZw9ZPN/L+4lz3Q8 PQjDibT/jVK1qcG56jd+SNFb1/iKqgvRnPIGk6SIixLoONVecUbRSQJQhUwp4cnAuulc rBNQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:dkim-signature:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=64de6mj32knug1ycAsIEPDw/tob+o4DwaofLTy/EY8c=; b=Jej5X9VjoL0uAkf0PWaKkBJAzMMM2JiNKk7RMHsZxco1GEBvP42PLBBZ9LkxlA1K0S E/W8EBNXKAShHDUr8mIW/xKU2UILYD08z1R2FNamArzyZWhdmPCYpq2S/NZ0PgZLh9pa hmGSltmGSAD5XbeR4striiatJWNKSbHRwqrJl1NqeZzUNhqBi4pwK4pe1neufneZkZlG rGbVeoFT/M4nEGILT1+sc61iVYjFnGQQJCMenyHBYoALcXEi9qTZCci1Qhxwj7Rffj/+ /AOrl/LzBQOBktgdhQlxsI47aqkkeerk1RVmzH8lxAsoyqbyIPq5TSIy2QbTZFzaml2Q 5HqQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nvidia.com header.s=n1 header.b=jVNHBz9s; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nvidia.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o12si2558976ejh.340.2020.07.09.13.16.02; Thu, 09 Jul 2020 13:16:28 -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; dkim=pass header.i=@nvidia.com header.s=n1 header.b=jVNHBz9s; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nvidia.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726306AbgGIUPV (ORCPT + 99 others); Thu, 9 Jul 2020 16:15:21 -0400 Received: from hqnvemgate25.nvidia.com ([216.228.121.64]:3053 "EHLO hqnvemgate25.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726183AbgGIUPV (ORCPT ); Thu, 9 Jul 2020 16:15:21 -0400 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== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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