Received: by 10.192.165.156 with SMTP id m28csp430734imm; Wed, 11 Apr 2018 01:14:51 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+OfWiJwsJo0lcjTG/I+QlGlbPEtwRQx896sLe8JxRvovKjaaOYVczFGu5xNoBPqT4H4Svg X-Received: by 2002:a17:902:5581:: with SMTP id g1-v6mr3975010pli.351.1523434491119; Wed, 11 Apr 2018 01:14:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523434491; cv=none; d=google.com; s=arc-20160816; b=NvrtdvjGcyvnqdFHdqgKQFy1fiXN9DdxsaNzVYQltpRspy6F3h96hOj1yiFm4VrwcO Mm/VPBybpYZ6CgKVpj4UgppzjcCkQhkSr2g4DbDlGgA2j0RBMG3ItxTMZ8UcKbhDdlR4 OW+vLrn2yXjWePecAgq6kO6NxzyVv2CoLNdZSChlurQpW51AlvXNd2ua+x0M3734Yhom Uyoa684P5KdzoxpM7BUhlO+pRee2iuybZpBR5S83KRj0xuKnBPNCva/vfCUl/Jx+DIef JNwYWmdjuwEeBV+n+o1RMyEPBD3wWW3vAPky5vD7EUamdudktOmX/uw0KGIVawiFB9ef ZfTQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=f6RJcgJSACqJf/ExQdkpkxM9Ivs1IPxvI0L8GBIX9Dw=; b=EtoYazIOhU8zzTpbuSYLMU9caVGD7GR1206Za+Ojs5ZrRiRGVIeOjw6deczMwVbihz RN3RtxqbAoI/p9o4RrKsDaB6eV4ePX0CTL2bgLRdGRl+UcuWOkSNrC/GdRM3WUTYnr48 uDkVolxrv6rmV+RjkRa47nGuZ36s/LyT2/7FAsHpMvizFjMGmuRLmzdFLtfDPjlc0d7i zf3X9AEMCw/lGzjpEdOlg6bD0zFVJ3HiB9SS9g0rPT4xkc/Q5WLPwSeytEV7eItcX1d0 aFjgvXrOxMf6HB6e9dcBlGDvg+sII51j5tfU1zRjIkrIk+iMvkqjyCJfv/I3w99Lqz8r 1PSg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=kwTyxks/; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w19-v6si628274plq.156.2018.04.11.01.14.14; Wed, 11 Apr 2018 01:14:51 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=kwTyxks/; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752668AbeDKIKB (ORCPT + 99 others); Wed, 11 Apr 2018 04:10:01 -0400 Received: from mail-pg0-f67.google.com ([74.125.83.67]:45730 "EHLO mail-pg0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752522AbeDKIJn (ORCPT ); Wed, 11 Apr 2018 04:09:43 -0400 Received: by mail-pg0-f67.google.com with SMTP id y63so420206pgy.12 for ; Wed, 11 Apr 2018 01:09:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=f6RJcgJSACqJf/ExQdkpkxM9Ivs1IPxvI0L8GBIX9Dw=; b=kwTyxks/513Y1tAJk7YSopvU4RLjR1F63X1X7b4uWWRc5yEllAdKs+CPA89/KF4OV8 EcPTxbaRKfCEWqiJ3BNCw6LMwtSnT4jk4yo+Q4FsHrRFt4okoXLLdTRf9Mbi2mfpK4cz xFJESRma/ok2U5CPCKFVLQCMzSJ/dUm1cF3X9fLPVQVv0PB6Y08aPEQW+HJjI1rXLd94 Gggvih8NWc04KtrXZYjB4RiO3sURh8XdncCI0tGQFeC5WQ20xQ0BZ5qDxWB7DX9VU28H xVmPG9XROxGlK92kQpATZs9OMUaDGApnM8cwCBKsy2zhhyJdZ9jsyLwSLl4VdASzn1ll P2bg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=f6RJcgJSACqJf/ExQdkpkxM9Ivs1IPxvI0L8GBIX9Dw=; b=tVUqr0TZ33Jv2H7TCtDuT31nEwta7c7UdcxcaVulxWnN2PpzmjpemN5KRfv7VRghWk TWTuTe5gMewhP5u88eClJnGB2g7EHcDG2YcaBKeGxULDhdxg19SHsR79Jx36jmxJ/W7+ CDCG3yzl0fObB35/yysZj6Eq/A7AHz5qwUN8QZj5MTWqfuNsXdUNL0bU9TRw7+MOX5f4 +bD2xK4fn3ROGwRYH/fCrdJ+bA5lVs2r+AFOyDBC9R9xxk+5e0SA50J7SdtqGITizFIH hyN1gFnmdODe4DuopmpUj+G1pX1CVT5kPXme6H9SidXRH6qIbCgezp0mQRVtOmOEWqOY sA2Q== X-Gm-Message-State: ALQs6tA2kz569HhRwSKVXXQlkPC7Wtn0EjM7nb80xjQNCXtGP0wBnLES Ct2Rgd/Vz8LPDMKC4k1tUw== X-Received: by 10.167.131.217 with SMTP id j25mr3106633pfn.5.1523434183359; Wed, 11 Apr 2018 01:09:43 -0700 (PDT) Received: from www9186uo.sakura.ne.jp (www9186uo.sakura.ne.jp. [153.121.56.200]) by smtp.gmail.com with ESMTPSA id b13sm1568311pfi.169.2018.04.11.01.09.41 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 11 Apr 2018 01:09:42 -0700 (PDT) From: Naoya Horiguchi To: linux-mm@kvack.org Cc: Michal Hocko , Zi Yan , "Kirill A. Shutemov" , Andrew Morton , Vlastimil Babka , linux-kernel@vger.kernel.org Subject: [PATCH v1 2/2] mm: migrate: add vm event counters hugetlb_migrate_(success|fail) Date: Wed, 11 Apr 2018 17:09:27 +0900 Message-Id: <1523434167-19995-3-git-send-email-n-horiguchi@ah.jp.nec.com> X-Mailer: git-send-email 2.7.0 In-Reply-To: <1523434167-19995-1-git-send-email-n-horiguchi@ah.jp.nec.com> References: <1523434167-19995-1-git-send-email-n-horiguchi@ah.jp.nec.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From the same motivation as the previous patch, this patch is suggesting to add separate counters for hugetlb migration. Signed-off-by: Naoya Horiguchi --- include/linux/vm_event_item.h | 3 +++ mm/migrate.c | 10 ++++++++++ mm/vmstat.c | 4 ++++ 3 files changed, 17 insertions(+) diff --git v4.16-mmotm-2018-04-10-17-02/include/linux/vm_event_item.h v4.16-mmotm-2018-04-10-17-02_patched/include/linux/vm_event_item.h index fa2d2e0..24966ae 100644 --- v4.16-mmotm-2018-04-10-17-02/include/linux/vm_event_item.h +++ v4.16-mmotm-2018-04-10-17-02_patched/include/linux/vm_event_item.h @@ -62,6 +62,9 @@ enum vm_event_item { PGPGIN, PGPGOUT, PSWPIN, PSWPOUT, #endif #ifdef CONFIG_HUGETLB_PAGE HTLB_BUDDY_PGALLOC, HTLB_BUDDY_PGALLOC_FAIL, +#ifdef CONFIG_MIGRATION + HTLB_MIGRATE_SUCCESS, HTLB_MIGRATE_FAIL, +#endif #endif UNEVICTABLE_PGCULLED, /* culled to noreclaim list */ UNEVICTABLE_PGSCANNED, /* scanned for reclaimability */ diff --git v4.16-mmotm-2018-04-10-17-02/mm/migrate.c v4.16-mmotm-2018-04-10-17-02_patched/mm/migrate.c index 46ff23a..279b143 100644 --- v4.16-mmotm-2018-04-10-17-02/mm/migrate.c +++ v4.16-mmotm-2018-04-10-17-02_patched/mm/migrate.c @@ -1357,6 +1357,9 @@ enum migrate_result_type { enum migrate_page_type { MIGRATE_PAGE_NORMAL, +#ifdef CONFIG_HUGETLB_PAGE + MIGRATE_PAGE_HUGETLB, +#endif #ifdef CONFIG_TRANSPARENT_HUGEPAGE MIGRATE_PAGE_THP, #endif @@ -1368,6 +1371,9 @@ static struct migrate_event { int failed; } migrate_events[] = { { PGMIGRATE_SUCCESS, PGMIGRATE_FAIL }, +#ifdef CONFIG_HUGETLB_PAGE + { HTLB_MIGRATE_SUCCESS, HTLB_MIGRATE_FAIL }, +#endif #ifdef CONFIG_TRANSPARENT_HUGEPAGE { THP_MIGRATE_SUCCESS, THP_MIGRATE_FAIL }, #endif @@ -1375,6 +1381,10 @@ static struct migrate_event { static inline enum migrate_page_type get_type(struct page *page) { +#ifdef CONFIG_HUGETLB_PAGE + if (PageHuge(page)) + return MIGRATE_PAGE_HUGETLB; +#endif #ifdef CONFIG_TRANSPARENT_HUGEPAGE if (PageTransHuge(page)) return MIGRATE_PAGE_THP; diff --git v4.16-mmotm-2018-04-10-17-02/mm/vmstat.c v4.16-mmotm-2018-04-10-17-02_patched/mm/vmstat.c index 57e9cc3..27a005f 100644 --- v4.16-mmotm-2018-04-10-17-02/mm/vmstat.c +++ v4.16-mmotm-2018-04-10-17-02_patched/mm/vmstat.c @@ -1236,6 +1236,10 @@ const char * const vmstat_text[] = { #ifdef CONFIG_HUGETLB_PAGE "htlb_buddy_alloc_success", "htlb_buddy_alloc_fail", +#ifdef CONFIG_MIGRATION + "htlb_migrate_success", + "htlb_migrate_fail", +#endif #endif "unevictable_pgs_culled", "unevictable_pgs_scanned", -- 2.7.0