Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp3077608pxk; Mon, 7 Sep 2020 02:28:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx8xVeMbr9ek/W2unKb6rUA/1iUHW4fPkd6+bMfScHAWNeyqGAGOrnCQYiP4XOylPB5vW5B X-Received: by 2002:a17:906:16da:: with SMTP id t26mr20004856ejd.172.1599470938479; Mon, 07 Sep 2020 02:28:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599470938; cv=none; d=google.com; s=arc-20160816; b=vaym2u93o7FAsZewkvQXxp9YU/sS30S7tVt/7PptzK5IovrHWee/I8jjVEQLwZVUEj b0suogc0ByrEPuQMe1oV0Pndchf7YGDLHadfqEwapmkYakzQJpk/U65xic3AOIhci0Gb ODc/TKpREhPkb/ywsHI3s0540mTJR4oS8rxBfw8VwATRKV7x6fb+zmmihR96i5Sadghv xGWxO6sjRvpqYH883MfRuJuVKOfqDTfVtyndzQAknLk+HzNZj0dBP/t2qPc+OElAwsXw QKQ2ioDTKa2ra4u2C6qbO+RHtgLj2MU7l6N2lawn7TNIr5V1cSSoM7FpwzcQd/VTR7li /v8g== 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=DHPFeB4eHXEBj4w25RtoVvSwpyOkgCIp+9rPs0wZyms=; b=a+OOKufCKP3JIZHz+fQfzv98FnWYjrWiMQZ6Ilu2ky2LIGNtOkAPkt1yxHx8NF9f9L bbxWUYMJESkLMMekXNWuLejJ4ByA1NL1l69oX7+LyW/ooZ0OcL3MdD1DGw2KHkwpoup2 V1QMnF13Qet6hELPd9UgY36aVS1TXgC+pl+PatvhV7POtIKYRNxHaVPfzxFnKmxnq0ny OfJRX51+ASxfBpDO/2cOFmpK8sGjFkkVb829Mdk9P0juvKlgRkeRB78eE/EajRzgmg1F GP6NbDTeNbNJOinOpBna3pSQ7CO32DM3xqlbLaRoX7TEE7RY2occJlDL+UvndEJGgmqX XDjw== 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 p9si10045171ejx.463.2020.09.07.02.28.36; Mon, 07 Sep 2020 02:28:58 -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 S1728253AbgIGJ1X (ORCPT + 99 others); Mon, 7 Sep 2020 05:27:23 -0400 Received: from mx2.suse.de ([195.135.220.15]:60512 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728093AbgIGJ1V (ORCPT ); Mon, 7 Sep 2020 05:27:21 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 9C485ADA8; Mon, 7 Sep 2020 09:27:21 +0000 (UTC) Date: Mon, 7 Sep 2020 10:27:17 +0100 From: Mel Gorman To: Barry Song Cc: mingo@redhat.com, peterz@infradead.org, juri.lelli@redhat.com, vincent.guittot@linaro.org, dietmar.eggemann@arm.com, bsegall@google.com, linux-kernel@vger.kernel.org, linuxarm@huawei.com, Mel Gorman , Peter Zijlstra , Valentin Schneider , Phil Auld , Hillf Danton , Ingo Molnar Subject: Re: [PATCH] sched/fair: use dst group while checking imbalance for NUMA balancer Message-ID: <20200907092717.GD3117@suse.de> References: <20200907072708.8664-1-song.bao.hua@hisilicon.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: <20200907072708.8664-1-song.bao.hua@hisilicon.com> 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 Mon, Sep 07, 2020 at 07:27:08PM +1200, Barry Song wrote: > Something is wrong. In find_busiest_group(), we are checking if src has > higher load, however, in task_numa_find_cpu(), we are checking if dst > will have higher load after balancing. It seems it is not sensible to > check src. > It maybe cause wrong imbalance value, for example, if > dst_running = env->dst_stats.nr_running + 1 results in 3 or above, and > src_running = env->src_stats.nr_running - 1 results in 1; > The current code is thinking imbalance as 0 since src_running is smaller > than 2. > This is inconsistent with load balancer. > It checks the conditions if the move was to happen. Have you evaluated this for a NUMA balancing load and confirmed it a) balances properly and b) does not increase the scan rate trying to "fix" the problem? -- Mel Gorman SUSE Labs