Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp1264850ybg; Thu, 4 Jun 2020 05:32:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyaDDtvLYDSkooV0hWK9tsUyeDLL7uWQjgHb4+gU5Npegy+eAA7vbF5bQgT/s3aEtDpqB3t X-Received: by 2002:a17:906:22d0:: with SMTP id q16mr3574214eja.455.1591273973273; Thu, 04 Jun 2020 05:32:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591273973; cv=none; d=google.com; s=arc-20160816; b=oxK4VfcqbJdkr0Lrh+wuu0Iokcl+mzzFH36dshtBcTgJuu2dWkk0zcjuxZWBZf9fuP alo6MiKWbl/3span0JQ3+zlFQUS3Blba1gJwRXyyrSpxMROK64nxWeCB0Utkf10s1PDZ AlMy2/3qD8pqweY7UiRQBsKAbnKufhfkHVI0dbe+NwJPaHhz4LZBEuQIW69Noah1Pw8u No45JEpeY0TRIQ1UjDMwm7UPx04ykd1qHV6zGJTe6X7RL6NRjrI2K8D9LUS8xF8egz7R 4zE92nxzc8biQ0xAS8rVY94wKt7acJHN5HdoyUSsUIg4ypEUrmDEfSxnNWMxAf6sizbV OKhw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=p9QVJ3Lo99pFeR+OabRjGu19usxqVkhLhkbiQm7crNs=; b=Ccy+Q8IOWY1ragQF4UgVoXqjFQvImZP0XanFgfssrzs0V8wZm3OFkbs3KvJ3mP65VY oIVhC91qIuijDyT2eKkYfXqXOz8SVGbamHocTJPPitgS+OaBTB5bYN0Y+mJIlj8ak6fh xGk2G8noE5KiiOyHMMJNFaGJugIGDBsQP8bUuU4HcBhIc9LsBeDowiAJFld0DKit4LHC GtUYZwAyhLCNt4JtQeIGWYxIwv1momGxRzIGEOh39+VPtIRZWG/1wlTthLo1uyPM1lx7 j2YJcuCga3Pj3juMKT2JwrZEa3/Qczp+ZqDd+Ha+2emqEWwCiHrWmLEVWk3yVx3zPwB4 WnSw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b="B3nrk1q/"; 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 m11si1600743edp.600.2020.06.04.05.32.29; Thu, 04 Jun 2020 05:32:53 -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=fail header.i=@infradead.org header.s=bombadil.20170209 header.b="B3nrk1q/"; 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 S1727048AbgFDLej (ORCPT + 99 others); Thu, 4 Jun 2020 07:34:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54506 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726228AbgFDLei (ORCPT ); Thu, 4 Jun 2020 07:34:38 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A83F9C03E96D for ; Thu, 4 Jun 2020 04:34:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=p9QVJ3Lo99pFeR+OabRjGu19usxqVkhLhkbiQm7crNs=; b=B3nrk1q/BmdstT3t5wnGI3zTWY tslgFuh09KlXol7r4KPhS+L7hcK70HzQYrBrhvdH2vyQ0daCFVaCboq6yAnEdmMXSFdQi7NwvzJCH T1oYdqY2d5eAq7jk0rHfVhJ/YvQYvkPc6SPxkNpqP1DD8U+mKywiD+zfTdiKmxypLNY8veiRphyV1 Kkqhi5F4LhI+2B9hd10HCMQfs1ZnDwNTKMMUIET7Y5b6amsrkbQ74gbj+xh+TGxH403LtbDwEK3IG KV4cw5N0B24J0XEV042U2tMpKM3KdlWehu1lY1ejILkifS276EmZdsN4g3jgjbGk+gKFF2TGM1Rx5 cPSnc3ig==; Received: from willy by bombadil.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1jgo8b-0001F0-VY; Thu, 04 Jun 2020 11:34:21 +0000 Date: Thu, 4 Jun 2020 04:34:21 -0700 From: Matthew Wilcox To: Anshuman Khandual Cc: linux-mm@kvack.org, hughd@google.com, daniel.m.jordan@oracle.com, Naoya Horiguchi , Zi Yan , John Hubbard , Andrew Morton , linux-kernel@vger.kernel.org Subject: Re: [PATCH V2] mm/vmstat: Add events for THP migration without split Message-ID: <20200604113421.GU19604@bombadil.infradead.org> References: <1591243245-23052-1-git-send-email-anshuman.khandual@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1591243245-23052-1-git-send-email-anshuman.khandual@arm.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jun 04, 2020 at 09:30:45AM +0530, Anshuman Khandual wrote: > Add the following new VM events which will help in validating THP migration > without split. Statistics reported through these new events will help in > performance debugging. > > 1. THP_MIGRATION_SUCCESS > 2. THP_MIGRATION_FAILURE > > THP_MIGRATION_FAILURE in particular represents an event when a THP could > not be migrated as a single entity following an allocation failure and > ended up getting split into constituent normal pages before being retried. > This event, along with PGMIGRATE_SUCCESS and PGMIGRATE_FAIL will help in > quantifying and analyzing THP migration events including both success and > failure cases. > +Quantifying Migration > +===================== > +Following events can be used to quantify page migration. > + > +- PGMIGRATE_SUCCESS > +- PGMIGRATE_FAIL > +- THP_MIGRATION_SUCCESS > +- THP_MIGRATION_FAILURE > + > +THP_MIGRATION_FAILURE in particular represents an event when a THP could not be > +migrated as a single entity following an allocation failure and ended up getting > +split into constituent normal pages before being retried. This event, along with > +PGMIGRATE_SUCCESS and PGMIGRATE_FAIL will help in quantifying and analyzing THP > +migration events including both success and failure cases. First, I'd suggest running this paragraph through 'fmt'. That way you don't have to care about line lengths. Second, this paragraph doesn't really explain what I need to know to understand the meaning of these numbers. When Linux attempts to migrate a THP, one of three things can happen: - It is migrated as a single THP - It is migrated, but had to be split - Migration fails How do I turn these four numbers into an understanding of how often each of those three situations happen? And why do we need four numbers to report three situations? Or is there something else that can happen? If so, I'd like that explained here too ;-)