Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp5825289ybp; Tue, 8 Oct 2019 08:51:38 -0700 (PDT) X-Google-Smtp-Source: APXvYqxf9ZxOO5zNi+0bb9e1JiFxVTti6n+P6XibT+m1FssutV1v5zaP0kzIN2nDosV6jEoL173c X-Received: by 2002:a17:906:d0d2:: with SMTP id bq18mr29023919ejb.233.1570549898758; Tue, 08 Oct 2019 08:51:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570549898; cv=none; d=google.com; s=arc-20160816; b=YajgJLHQU3cp/Poopf9Ug4bmrrVCB1c7epKzjDZd4x9qZwoN/8TrSO1xyKF+77kIht fRxaVs+U8/wkNSt7loDA+LsxF1zLRzhOVnaZRjMQWEpIiRzc0DzX7s8iqhV9dvzm+L+1 IqI2Lkx8Orx4WNwSVBbepPmFFYkvGSN++nVgv/8/HZp5dU989O9n4a/9bTHo2OR7TBh/ zROIBXWdNdnqP++yucweXhuLh33gExA07IR5O4YdwMbpNTCDvn1vDYcWtYVXSUzoFqd8 hAV5S6A1CHW5NR5zNYlenTIRN5l1Ij1G3SBJjP8ELf7QFEbcIlAZdNMkMG+WcTJhVpO9 XZGg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=sSNtPHhzm3DZbM7Xeyydqgx4E1jQ9zuX6y5ASWJPZMI=; b=GSKlzkcOTb+5dwyWbu0mwJNwqE9pUCEnYDkq/KBcsCxOg99N9Uc+qh4o1c27d9NFfq YecXOjlNFJQVqu4bslx69bOgoRzBeGWv3CSGzyNMHgsg2/ihOVV1CYeNMGyF+ZTD63xo BmEr3xbqG5b3OtsGViZFsueicPWpk4zq0MlQKzuc/1hBOIypF2YxkOO2l+MYq7Lx9Nn7 5bG2IEPSYbxxWmXLqOvjQk5fcJYk4hpPTn585fXGDRTXG/Uvz8kl9Kzx3Cd9c2KMqdbq 6Sf3iASBL/lWEVOFQbaSHxCMvWq4nU8cPxdtFceCPPTSpitaqqr9qU3KHiIWVcvM1aN1 aJ8w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e5si11500952ede.150.2019.10.08.08.51.14; Tue, 08 Oct 2019 08:51:38 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727536AbfJHPsi (ORCPT + 99 others); Tue, 8 Oct 2019 11:48:38 -0400 Received: from foss.arm.com ([217.140.110.172]:39886 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725908AbfJHPsi (ORCPT ); Tue, 8 Oct 2019 11:48:38 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id A26761570; Tue, 8 Oct 2019 08:48:37 -0700 (PDT) Received: from [10.1.194.37] (e113632-lin.cambridge.arm.com [10.1.194.37]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 669A03F6C4; Tue, 8 Oct 2019 08:48:36 -0700 (PDT) Subject: Re: [PATCH v3 04/10] sched/fair: rework load_balance To: Vincent Guittot Cc: Peter Zijlstra , linux-kernel , Ingo Molnar , Phil Auld , Srikar Dronamraju , Quentin Perret , Dietmar Eggemann , Morten Rasmussen , Hillf Danton References: <1568878421-12301-1-git-send-email-vincent.guittot@linaro.org> <1568878421-12301-5-git-send-email-vincent.guittot@linaro.org> <31cac0c1-98e4-c70e-e156-51a70813beff@arm.com> <20191008141642.GQ2294@hirez.programming.kicks-ass.net> <20191008153002.GA21999@linaro.org> From: Valentin Schneider Message-ID: Date: Tue, 8 Oct 2019 16:48:35 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <20191008153002.GA21999@linaro.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 08/10/2019 16:30, Vincent Guittot wrote: [...] > > This is how I plan to get ride of the problem: > + if (busiest->group_weight == 1 || sds->prefer_sibling) { > + unsigned int nr_diff = busiest->sum_h_nr_running; > + /* > + * When prefer sibling, evenly spread running tasks on > + * groups. > + */ > + env->migration_type = migrate_task; > + lsub_positive(&nr_diff, local->sum_h_nr_running); > + env->imbalance = nr_diff >> 1; > + return; > + } > I think this wants a /* Local could have more tasks than busiest */ atop the lsub, otherwise yeah that ought to work.