Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp24083ybt; Tue, 7 Jul 2020 15:00:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxGqKP5VC9GqQ5sCPiNIla/Mk1Lq1//+2/FtiNJ+a6XQI5rCaDLaF1l5nVVy91FU3TpMb3s X-Received: by 2002:a50:9f8c:: with SMTP id c12mr60347272edf.149.1594159248348; Tue, 07 Jul 2020 15:00:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594159248; cv=none; d=google.com; s=arc-20160816; b=ds1gzm+DZXnie/+6FSIWvmzqEbCnvnhV6nB2l4YvEIRjD6dKR1p+UclnfDh74X6a2c yCrsOjG6TR2pkm4vUD1gyHgT21ptg1GAq8khs0bW5GCKABWxBup5MfiMdoGE/gesTeBs xRmWG6S7zvzmH6G/4wKP6Yf/aev1vmiP2D3/mb3WSOp0aigFUYeYYuNR7i6Y2xIw7/CV 4tJC+0lspOrmb0tR/WBH+5TqRjFDX8Z/LDgZzS/CTTYl7PnxKi2BsC06+xG+saye0r5C gfcWd4ENvP9GeDQiIsJZFEpbAkDD/tqmEL5uLlUVh6EM+7bIDyIZfs1DinLNHVW2LGp/ nqdw== 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=UkjuVJX7qXH4aNelVrfrk3vUbsAK4xxYDBiu8YGtRZ8=; b=uoDMoF5ytJ5K7QSfpaxnM9UESlV1bpEavQlx8FcFuP8R73iWvdMljI7BMVx2hp50Bi 0rl4PIQjiIUgMX1NSv8YW2VfX6DK3eEbaR1r9hLMmpq2kkSrQrUnCN2OOn0J31nANQfY RDS/pcwpzSSZx5s5ZErVvKDeA7BuznNe+MlrjofhQQnqHnFlqxuFMZAGlntGuPiCqmrj 5L9iBh4OcGht3jGzmw66nGDozP26ucVGgkfeb5U8XDX5+csifdh+ovXgdj0nxCwmd0mu 9Rq7THMLHssZl4a8NXLzV9rDxW9xz7eQ+CswPEKf950+ws1ho1zT260KSyGsqxdhcCi6 BSNQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nvidia.com header.s=n1 header.b=CaAH029j; 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 s27si15143633edw.322.2020.07.07.15.00.25; Tue, 07 Jul 2020 15:00:48 -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=CaAH029j; 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 S1728878AbgGGV5U (ORCPT + 99 others); Tue, 7 Jul 2020 17:57:20 -0400 Received: from hqnvemgate24.nvidia.com ([216.228.121.143]:12494 "EHLO hqnvemgate24.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728517AbgGGV5U (ORCPT ); Tue, 7 Jul 2020 17:57:20 -0400 Received: from hqpgpgate101.nvidia.com (Not Verified[216.228.121.13]) by hqnvemgate24.nvidia.com (using TLS: TLSv1.2, DES-CBC3-SHA) id ; Tue, 07 Jul 2020 14:55:33 -0700 Received: from hqmail.nvidia.com ([172.20.161.6]) by hqpgpgate101.nvidia.com (PGP Universal service); Tue, 07 Jul 2020 14:57:19 -0700 X-PGP-Universal: processed; by hqpgpgate101.nvidia.com on Tue, 07 Jul 2020 14:57:19 -0700 Received: from [10.2.50.36] (10.124.1.5) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Tue, 7 Jul 2020 21:57:18 +0000 Subject: Re: [PATCH V3] mm/vmstat: Add events for THP migration without split To: Andrew Morton , Anshuman Khandual CC: , Daniel Jordan , "Hugh Dickins" , Matthew Wilcox , Zi Yan , Naoya Horiguchi , References: <1594080415-27924-1-git-send-email-anshuman.khandual@arm.com> <20200707130406.21ce3d61a4cce25831abb2d1@linux-foundation.org> From: John Hubbard Message-ID: Date: Tue, 7 Jul 2020 14:57:18 -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: <20200707130406.21ce3d61a4cce25831abb2d1@linux-foundation.org> X-Originating-IP: [10.124.1.5] X-ClientProxiedBy: HQMAIL111.nvidia.com (172.20.187.18) 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=1594158933; bh=UkjuVJX7qXH4aNelVrfrk3vUbsAK4xxYDBiu8YGtRZ8=; 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=CaAH029jU/ZygbHUlEeyaPeQXOxoPlgNNwtuI50UlNXAm6hjhNSjwIpfiVPUGchMl iO/RuP4kZ/ABSyY7LCnlVUGN7otdsM1kAFeDVqNfmbzcn0G0PGPFtxpLssBWYdOxsc yw8J6TeVnmAe9Jl1Ch1ATKJuEgWuwhosNiGg9p9Ac1i7kFSjtdBH+cDyyQWVsVSlXw brIN7QyXVi5EzYO4bfEqYnBFl7IR7rcmJWdaU6E2DQgsnaa3Ci2/N/Gb2Q0knguFO/ FL2S+jfmg19kC0ZIathlvEr7PIiJRLL7oStSYeg2bGkrRJSNZfFXBAfYpOjLJRx9ej HBIQ7khdtkhMA== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2020-07-07 13:04, Andrew Morton wrote: > 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. Taking a peek now. > >> ... >> >> - 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? No, they are not. And there are a couple more pre-existing cases as well, right above what can be seen here (this patch just follows the local pattern) that should also be removed. thanks, -- John Hubbard NVIDIA