From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id C6919C05027 for ; Wed, 8 Feb 2023 18:04:03 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id C53746B0071; Wed, 8 Feb 2023 13:04:02 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id C039C6B0072; Wed, 8 Feb 2023 13:04:02 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id AF25B6B0074; Wed, 8 Feb 2023 13:04:02 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id A03266B0071 for ; Wed, 8 Feb 2023 13:04:02 -0500 (EST) Received: from smtpin11.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 69CCE12141C for ; Wed, 8 Feb 2023 18:04:02 +0000 (UTC) X-FDA: 80444898324.11.29F9DA3 Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) by imf02.hostedemail.com (Postfix) with ESMTP id 8BBE080034 for ; Wed, 8 Feb 2023 18:03:58 +0000 (UTC) Authentication-Results: imf02.hostedemail.com; dkim=pass header.d=infradead.org header.s=desiato.20200630 header.b=bLmbWiK2; spf=none (imf02.hostedemail.com: domain of peterz@infradead.org has no SPF policy when checking 90.155.92.199) smtp.mailfrom=peterz@infradead.org; dmarc=none ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1675879439; a=rsa-sha256; cv=none; b=7cNzKpooQKHWsDifo06pcPVCkeoHeuG9yp3wzYPDQ2KmptXAOGZTvH5sOy+v5ACTFf18zx UKMpX0cX54egI5cJDWtEWY9EXvYKG8UC+m9hqcG9ZyNzfEnO0Kvw4LL5hEOylurYgaNbmm x5q5hB+pe3Q1nHuc1N/C6QkVfMQ+Lng= ARC-Authentication-Results: i=1; imf02.hostedemail.com; dkim=pass header.d=infradead.org header.s=desiato.20200630 header.b=bLmbWiK2; spf=none (imf02.hostedemail.com: domain of peterz@infradead.org has no SPF policy when checking 90.155.92.199) smtp.mailfrom=peterz@infradead.org; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1675879439; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=MXWv/XpzhFL/3Svn1wfLOdz+zJmzMB7DykCoFL92t/A=; b=JyVTZo9bSPzhWFTzP3BZWDjaebFS662Ydlba+lxtS274sRQRpFUnrGKFRpxTdR5W1WqTfI /ag5buRufkFbeWaJsZ5fI5KHxUpCfHDETSXxHGDz4RSvln7XbDDpZhtNCL+hfk8ws7bK6o ytXZmEGoyYDhWiZRRnDiUcLejChzYKE= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; 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=MXWv/XpzhFL/3Svn1wfLOdz+zJmzMB7DykCoFL92t/A=; b=bLmbWiK28rXhW7Vn68Q128CJ9A 6ps0GP+EVhDle+gD/SgAyhuiYGW91GcuMpIvKemFAjntYYKqwUmBFi2Z9x9GBwIzgrDlf5OEv/Vkz x8r20n6n+pRUY+wIK+J5pOSx+7XmmS5+vi7yjs7jQUX+5WwUrdHlGsM/XpVm3HsSd1/ERrrHrvxlj a47lwSM4dvG0JK+xsjpJIC9765/kRBOJroBWVU5jonnPWCwgVUfJexiyNq1spqgc8zULB+jtxLGqI sQWYRPk57ZrKCM0TQcW3vw3TamfY7u7RpMKpxLK0r6p2KnDhIUmWcesbGpuXkcLbMWg9B437KQ3yU oSrfaGsg==; Received: from j130084.upc-j.chello.nl ([24.132.130.84] helo=noisy.programming.kicks-ass.net) by desiato.infradead.org with esmtpsa (Exim 4.96 #2 (Red Hat Linux)) id 1pPomb-007Wp1-2o; Wed, 08 Feb 2023 18:03:02 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 6BA8D300399; Wed, 8 Feb 2023 19:03:39 +0100 (CET) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 53E3F20F05D4E; Wed, 8 Feb 2023 19:03:39 +0100 (CET) Date: Wed, 8 Feb 2023 19:03:39 +0100 From: Peter Zijlstra To: Bharata B Rao Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, mgorman@suse.de, mingo@redhat.com, bp@alien8.de, dave.hansen@linux.intel.com, x86@kernel.org, akpm@linux-foundation.org, luto@kernel.org, tglx@linutronix.de, yue.li@memverge.com, Ravikumar.Bangoria@amd.com, ying.huang@intel.com Subject: Re: [RFC PATCH 0/5] Memory access profiler(IBS) driven NUMA balancing Message-ID: References: <20230208073533.715-1-bharata@amd.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230208073533.715-1-bharata@amd.com> X-Rspam-User: X-Rspamd-Queue-Id: 8BBE080034 X-Rspamd-Server: rspam01 X-Stat-Signature: 6cmhtak3xc8ehec1asgb58r68wwzhsyo X-HE-Tag: 1675879438-427331 X-HE-Meta: U2FsdGVkX19L/ubwCPIjepGdAbe2iPFf42jY/MXHNhYMvOtVAXKz4LV4lI3pK5OrMBnaXjqIPTfh9izYOTtdgCgENBnzt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, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Wed, Feb 08, 2023 at 01:05:28PM +0530, Bharata B Rao wrote: > - Perf uses IBS and we are using the same IBS for access profiling here. > There needs to be a proper way to make the use mutually exclusive. No, IFF this lives it needs to use in-kernel perf. > - Is tying this up with NUMA balancing a reasonable approach or > should we look at a completely new approach? Is it giving sufficient win to be worth it, afaict it doesn't come even close to justifying it. > - Hardware provided access information could be very useful for driving > hot page promotion in tiered memory systems. Need to check if this > requires different tuning/heuristics apart from what NUMA balancing > already does. I think Huang Ying looked at that from the Intel POV and I think the conclusion was that it doesn't really work out. What you need is frequency information, but the PMU doesn't really give you that. You need to process a *ton* of PMU data in-kernel.