Received: by 10.192.165.156 with SMTP id m28csp1650837imm; Thu, 12 Apr 2018 00:44:43 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/w5zXDnyCJnnnDNuCeMOZ9qK0808WsNZMJ8cpYk+hRDtVhuhDodoJ2ymVByOkMcLjgEtmr X-Received: by 2002:a17:902:bc4b:: with SMTP id t11-v6mr8543944plz.343.1523519083940; Thu, 12 Apr 2018 00:44:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523519083; cv=none; d=google.com; s=arc-20160816; b=N5xByo+hGGBcNyYHVS6pT/tQ4ypBdTNgeoX6UHMdx755JGiftUrjChtmPWtcoMThE8 7csHpESnXUePoVlh1b6n6OQAdFhRHmooI48at+CWBz+SkpNX7SEgVw7RmiUARiIaLvP+ VIpniHE/4f0yPK36RrU3C+35iLkxQuqgUO86y2T2JHESrHmDn5q3Y+CB8wUhw/j24M79 5HSVYSOaoKOJyc/ayl50BFi1xPCBkDr1J5wP6zwIUgy71DbOWb5wQ4hzMCZ7jIiUa4KX W83rcH+8ccsrWQ1sSQKhWmIqRCPFLvSm/H25uVltCijgi14zm4ylcURkEHkOeSM3+29F 1L6w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-id:content-language:accept-language:in-reply-to:references :message-id:date:thread-index:thread-topic:subject:cc:to:from :arc-authentication-results; bh=+ykK9FU95aLy7KiXwBfZM+eT2uHbay1ZIpKVeJpv6c8=; b=GHhhEA/+KSAubcNrlKh9M95qlwQf/jc8EORKUQtGG5dZFnhpsKxJw6IHw1Lts7vXNs lsBMIv7bJmaLcnnpK4D15Uu8gd5iaoHa8Mkr3sH3NK4CUDIoAXhtMrPP4OirE3PTpgVa G4pmQ2GNKYLvoRR/ULEegfqA1L63KVxaZchABAarU8NsjnyER2Jkz6w9aDzEoPnXXq3l fu9Zs/IakjS5ziQrSPcLclvoiomjO4Dldx0FDAuql7VDKj3c/nu92fucdWlXk0CDjRN7 wOLa72r5xc0Ca2xAx66WoWpaTgRS2y1y0WylJG0Wf0Ncn+Xwc4kXtoWu4NlXcDmfg/KL qVGQ== ARC-Authentication-Results: i=1; mx.google.com; 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 o12-v6si200888plk.264.2018.04.12.00.44.06; Thu, 12 Apr 2018 00:44:43 -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; 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 S1751856AbeDLHl1 convert rfc822-to-8bit (ORCPT + 99 others); Thu, 12 Apr 2018 03:41:27 -0400 Received: from tyo162.gate.nec.co.jp ([114.179.232.162]:54540 "EHLO tyo162.gate.nec.co.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750743AbeDLHl0 (ORCPT ); Thu, 12 Apr 2018 03:41:26 -0400 Received: from mailgate01.nec.co.jp ([114.179.233.122]) by tyo162.gate.nec.co.jp (8.15.1/8.15.1) with ESMTPS id w3C7f6m8003912 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 12 Apr 2018 16:41:06 +0900 Received: from mailsv01.nec.co.jp (mailgate-v.nec.co.jp [10.204.236.94]) by mailgate01.nec.co.jp (8.15.1/8.15.1) with ESMTP id w3C7f6bY020013; Thu, 12 Apr 2018 16:41:06 +0900 Received: from mail03.kamome.nec.co.jp (mail03.kamome.nec.co.jp [10.25.43.7]) by mailsv01.nec.co.jp (8.15.1/8.15.1) with ESMTP id w3C7bWnb025679; Thu, 12 Apr 2018 16:41:06 +0900 Received: from bpxc99gp.gisp.nec.co.jp ([10.38.151.151] [10.38.151.151]) by mail02.kamome.nec.co.jp with ESMTP id BT-MMP-2354002; Thu, 12 Apr 2018 16:40:42 +0900 Received: from BPXM23GP.gisp.nec.co.jp ([10.38.151.215]) by BPXC23GP.gisp.nec.co.jp ([10.38.151.151]) with mapi id 14.03.0319.002; Thu, 12 Apr 2018 16:40:42 +0900 From: Naoya Horiguchi To: Michal Hocko CC: "linux-mm@kvack.org" , Zi Yan , "Kirill A. Shutemov" , Andrew Morton , Vlastimil Babka , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH v1 0/2] mm: migrate: vm event counter for hugepage migration Thread-Topic: [PATCH v1 0/2] mm: migrate: vm event counter for hugepage migration Thread-Index: AQHT0WxxyRxBwyDghE6+dkLRphReNaP8EpCAgAAW0wA= Date: Thu, 12 Apr 2018 07:40:41 +0000 Message-ID: <20180412074039.GA3340@hori1.linux.bs1.fc.nec.co.jp> References: <1523434167-19995-1-git-send-email-n-horiguchi@ah.jp.nec.com> <20180412061859.GR23400@dhcp22.suse.cz> In-Reply-To: <20180412061859.GR23400@dhcp22.suse.cz> Accept-Language: en-US, ja-JP Content-Language: ja-JP X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.128.101.30] Content-Type: text/plain; charset="iso-2022-jp" Content-ID: <26566DB56A5F954CB0641A6E02F3BC84@gisp.nec.co.jp> Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-TM-AS-MML: disable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Apr 12, 2018 at 08:18:59AM +0200, Michal Hocko wrote: > On Wed 11-04-18 17:09:25, Naoya Horiguchi wrote: > > Hi everyone, > > > > I wrote patches introducing separate vm event counters for hugepage migration > > (both for hugetlb and thp.) > > Hugepage migration is different from normal page migration in event frequency > > and/or how likely it succeeds, so maintaining statistics for them in mixed > > counters might not be helpful both for develors and users. > > This is quite a lot of code to be added se we should better document > what it is intended for. Sure I understand your reasonaning about huge > pages are more likely to fail but is this really worth a separate > counter? Do you have an example of how this would be useful? Our customers periodically collect some log info to understand what happened after system failures happen. Then if we have separate counters for hugepage migration and the values show some anomaly, that might help admins and developers understand the issue more quickly. We have other ways to get this info like checking /proc/pid/pagemap and /proc/kpageflags, but they are costly and most users decide not to collect them in periodical logging. > > If we are there then what about different huge page sizes (for hugetlb)? > Do we need per-hstate stats? Yes, per-hstate counters are better. And existing hugetlb counters htlb_buddy_alloc_* are also affected by this point. > > In other words, is this really worth it? Actually, I'm not sure at this point. Thanks, Naoya Horiguchi > > > include/linux/vm_event_item.h | 7 +++ > > mm/migrate.c | 103 +++++++++++++++++++++++++++++++++++------- > > mm/vmstat.c | 8 ++++ > > 3 files changed, 102 insertions(+), 16 deletions(-) > > -- > Michal Hocko > SUSE Labs >