Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp613987ybk; Wed, 13 May 2020 08:32:33 -0700 (PDT) X-Google-Smtp-Source: APiQypKLqq6m73KIl93IbMgdD8lnCf7rn6SsnYmni9fJSNsfczgtQqf0ycVT+rYNYmK9d5NI5/kG X-Received: by 2002:a17:906:4e02:: with SMTP id z2mr22587875eju.212.1589383953691; Wed, 13 May 2020 08:32:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589383953; cv=none; d=google.com; s=arc-20160816; b=Qq8zu/Ou5L3w0wIhc4m8NAqjlXl5MT24XJOo/9faluIYnTxL13pGCIMODivLd5U0ee iu4I334oZ6cGipk2MWGqZvjzQw8VZ/vzjAhQzxR3sHLEbW+zZGsfS1RPtmlMDDBo8ycq 9ZeDiP5eTU+ozq6fDhEfzIH0lzfgF4K1X96t9FNQGWx4sCXWYVIFtPuh/e3/XUO1mtaQ x/vmH6ELDSTi8NU32op/yYn1mAIY3LbA35Higlnde9EgkjE7DepjLoe66zqPtVqN8e5R 57ixkzpGwDjex05/T6LgA7cWdBABeOKJbMZIVS13+zJdVJb2q9tEEDWke+SXZQvE0Fvs RHLA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=dinhg4NO9dnn5j4f8VCL17lgWpwD8lYwDUDevoLa4WY=; b=o9XS19WS/PuouIfSf2z9/69n++dxIIGYhyP7V/0wtV+Eabx92hgXYT1p8h0J+ikmdA ghpYRe05L0jVDsr/x3ytRBFuG7PV7IhryyasbZyf0bdXJe7QRXOp/8J44US0age0aiyb VNwRxIM9d+I22pAYNVkrRklmjKZ71NL4Wtu1VwgKPFrKMNbjzFMm6SSvhUy0BZYZtOpH /8aaqG48x+dmjlUxnjIbTlSrPIPHPmYgEzh+yEhF508gTL0YbyHJC6uBG4XJhLhF4LiZ 0j4N8eAqwSxkLvXPBlW4fT3U6mSEeM4ZQaLfEcQiFBH3j+yn7yzK0UrUP33rg5mZEsmQ I3+A== ARC-Authentication-Results: i=1; mx.google.com; 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 k19si6131679edj.455.2020.05.13.08.32.10; Wed, 13 May 2020 08:32:33 -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; 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 S1729849AbgEMPa1 (ORCPT + 99 others); Wed, 13 May 2020 11:30:27 -0400 Received: from outbound-smtp52.blacknight.com ([46.22.136.236]:36715 "EHLO outbound-smtp52.blacknight.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728678AbgEMPa0 (ORCPT ); Wed, 13 May 2020 11:30:26 -0400 Received: from mail.blacknight.com (pemlinmail01.blacknight.ie [81.17.254.10]) by outbound-smtp52.blacknight.com (Postfix) with ESMTPS id 49759FAA96 for ; Wed, 13 May 2020 16:30:25 +0100 (IST) Received: (qmail 22053 invoked from network); 13 May 2020 15:30:25 -0000 Received: from unknown (HELO techsingularity.net) (mgorman@techsingularity.net@[84.203.18.57]) by 81.17.254.9 with ESMTPSA (AES256-SHA encrypted, authenticated); 13 May 2020 15:30:25 -0000 Date: Wed, 13 May 2020 16:30:23 +0100 From: Mel Gorman To: Jirka Hladky Cc: Phil Auld , Peter Zijlstra , Ingo Molnar , Vincent Guittot , Juri Lelli , Dietmar Eggemann , Steven Rostedt , Ben Segall , Valentin Schneider , Hillf Danton , LKML , Douglas Shakshober , Waiman Long , Joe Mario , Bill Gray Subject: Re: [PATCH 00/13] Reconcile NUMA balancing decisions with the load balancer v6 Message-ID: <20200513153023.GF3758@techsingularity.net> References: <20200320152251.GC3818@techsingularity.net> <20200320163843.GD3818@techsingularity.net> <20200507155422.GD3758@techsingularity.net> <20200508092212.GE3758@techsingularity.net> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, May 13, 2020 at 04:57:15PM +0200, Jirka Hladky wrote: > Hi Mel, > > we have tried the kernel with adjust_numa_imbalance() crippled to just > return the imbalance it's given. > > It has solved all the performance problems I have reported. > Performance is the same as with 5.6 kernel (before the patch was > applied). > > * solved the performance drop upto 20% with single instance > SPECjbb2005 benchmark on 8 NUMA node servers (particularly on AMD EPYC > Rome systems) => this performance drop was INCREASING with higher > threads counts (10% for 16 threads and 20 % for 32 threads) > * solved the performance drop for low load scenarios (SPECjvm2008 and NAS) > > Any suggestions on how to proceed? One approach is to turn > "imbalance_min" into the kernel tunable. Any other ideas? > > https://github.com/torvalds/linux/blob/4f8a3cc1183c442daee6cc65360e3385021131e4/kernel/sched/fair.c#L8914 > Complete shot in the dark but restore adjust_numa_imbalance() and try this diff --git a/kernel/sched/core.c b/kernel/sched/core.c index 1a9983da4408..0b31f4468d5b 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -2393,7 +2393,7 @@ static void ttwu_queue(struct task_struct *p, int cpu, int wake_flags) struct rq_flags rf; #if defined(CONFIG_SMP) - if (sched_feat(TTWU_QUEUE) && !cpus_share_cache(smp_processor_id(), cpu)) { + if (sched_feat(TTWU_QUEUE)) { sched_clock_cpu(cpu); /* Sync clocks across CPUs */ ttwu_queue_remote(p, cpu, wake_flags); return; -- Mel Gorman SUSE Labs