Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1332535ybt; Tue, 7 Jul 2020 13:07:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxFvYQd1gFSjey155zHGkHXQSt6E649hBcQebZi907Ds+w6/yY7Jgag+job59CpzFaczMJb X-Received: by 2002:a50:8a62:: with SMTP id i89mr49501875edi.324.1594152430649; Tue, 07 Jul 2020 13:07:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594152430; cv=none; d=google.com; s=arc-20160816; b=bAqiUEAlskPCzSFd4eIxpbW+cPoPqAYpYTYbTBZcJWC4zuS+pr2Ej/ZOikGNTCUrdd Kq+YNNWLTjWjRPXm+1Egz/ntroWub9A2eCmtfjGpFita9avL5vFk34q+rbwdTdv6JKSN nTxOKeb/zfoS+FnYOI5plKdcdNCA+AO8k7Dt8YIboS8tkJlsHBWy92q2BdAGDJLy7i+A CDeVhTY77raze88F20UpcsU44gvd/J93cAOkzQUFix5QiFqeS7jdDzqWGMeTrSpnX16F Vf4biOeTWvVVYJZnmUENcnbBny/4EKQceIorvPXunTmEpkM2fK57t7cU17SircslJ1oV y7Qg== 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:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=KLvNxJEPa5CXZlLEH+5wh+KkTi/jezl2mf6GwMFlR1I=; b=W/gE1jPAuuBE8Pd4j/aYEySnaDrwBIbAhm+HFy4rAH1K2KfplL79crEZof+yz1oOBo ClgT3mzqh0hFMTyVtihOyJqXnYSZvIgaIBwAAhtlskkKXPujLOQ2xjwtU6pg4PDiKSO7 zQKvxDPhgg4CIrgI9t9GAIITyjf+lsAWMzelI+P2S4SPpmw1ddIYBkNfbeNNXTuVguPZ pr6FFvGE++ccNqAyHwPwvN6uz6u0+yugdhTEp6iIqdv/S0AJZbLl6UgleDAB+Wy66phH O5byNol7hxLsSwTkbKS2jMjcDwT0gT0dQHV56LryttLpNqRpqAwAoUIjl+YR7ebgrq6z ROtQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ZMH8B4e4; 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 ss22si16782455ejb.530.2020.07.07.13.06.46; Tue, 07 Jul 2020 13:07:10 -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=@kernel.org header.s=default header.b=ZMH8B4e4; 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 S1728272AbgGGUEH (ORCPT + 99 others); Tue, 7 Jul 2020 16:04:07 -0400 Received: from mail.kernel.org ([198.145.29.99]:40046 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727895AbgGGUEH (ORCPT ); Tue, 7 Jul 2020 16:04:07 -0400 Received: from localhost.localdomain (c-73-231-172-41.hsd1.ca.comcast.net [73.231.172.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 7E2C5206F6; Tue, 7 Jul 2020 20:04:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1594152246; bh=lOqxPHD1G7v4ptCDcrU8Zzd0/sIT1tjdxKx6H0SH6CE=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=ZMH8B4e4BRy7pNzi9c8aXzN6seq1gBHeil+eQ9hiIVQ8URQja30LSG6juVf3BboAK eqmvjEeVsslRYG1GyeqNTPPdk6ri3P0pNFuC3bsDHKCp14dL8DekEVflRRCZM/xDRJ VrscB+AV4GSw6wX0kntnBxGxQ/qOh31JOGMkQXzc= Date: Tue, 7 Jul 2020 13:04:06 -0700 From: Andrew Morton To: Anshuman Khandual Cc: linux-mm@kvack.org, Daniel Jordan , Hugh Dickins , Matthew Wilcox , Zi Yan , John Hubbard , Naoya Horiguchi , linux-kernel@vger.kernel.org Subject: Re: [PATCH V3] mm/vmstat: Add events for THP migration without split Message-Id: <20200707130406.21ce3d61a4cce25831abb2d1@linux-foundation.org> In-Reply-To: <1594080415-27924-1-git-send-email-anshuman.khandual@arm.com> References: <1594080415-27924-1-git-send-email-anshuman.khandual@arm.com> X-Mailer: Sylpheed 3.5.1 (GTK+ 2.24.31; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 7 Jul 2020 05:36:55 +0530 Anshuman Khandual wrote: > Add following new vmstat events which will help in validating THP migration > without split. Statistics reported through these new VM events will help in > performance debugging. > > 1. THP_MIGRATION_SUCCESS > 2. THP_MIGRATION_FAILURE > 3. THP_MIGRATION_SPLIT > > In addition, these new events also update normal page migration statistics > appropriately via PGMIGRATE_SUCCESS and PGMIGRATE_FAILURE. While here, this > updates current trace event 'mm_migrate_pages' to accommodate now available > THP statistics. Patch looks straightforward enough. It would be nice to see some confirmation from others that these metrics are a desirable thing to export. > ... > > - trace_mm_migrate_pages(nr_succeeded, nr_failed, mode, reason); > + if (nr_thp_succeeded) > + count_vm_events(THP_MIGRATION_SUCCESS, nr_thp_succeeded); > + if (nr_thp_failed) > + count_vm_events(THP_MIGRATION_FAILURE, nr_thp_failed); > + if (nr_thp_split) > + count_vm_events(THP_MIGRATION_SPLIT, nr_thp_split); Are these "if"s worthwhile to have? > + trace_mm_migrate_pages(nr_succeeded, nr_failed, nr_thp_succeeded, > + nr_thp_failed, nr_thp_split, mode, reason);