Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2916564pxb; Tue, 19 Jan 2021 09:03:19 -0800 (PST) X-Google-Smtp-Source: ABdhPJyyyIyUBeYQQiGKwa4Pmbm5tTTUQHxaZ49dZfNNDGT7q1CuYdgjMjtiswXP4xiPD3JJZ0cX X-Received: by 2002:a17:906:53d0:: with SMTP id p16mr3459092ejo.38.1611075798977; Tue, 19 Jan 2021 09:03:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611075798; cv=none; d=google.com; s=arc-20160816; b=msYhZpyvu4nyVXADilsMZqMJMW10z7QpZOGxrYNbZ+QQ2T+2414gol/y+sGzm6kDh6 8NBiGU5jU0R/vCVjzKarnGkpaU9C7SONnMI6Go3RGVbGigGwUDz7uEl/18oUelE3OUqS g8PnBFQlb7n/gSCo0e4fDSAgKXbP7Oag0bzta5gws7MO3g0zPFj6xesw7IzjYUc2nzcS nDApXAE0dlc+PTdMhNuyWBisC91KgWudap2PXJfcTvPeLu6h8If8p8o6Yx5zq7W/oFDG fF34gRxqon+Lpjlqe3yTSgrJCCm49g2xzgFG9O6c7H4dYyjixIPvfEIw+jX2k7WvreU0 G4dw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:user-agent :references:in-reply-to:subject:cc:to:from; bh=pPPc9x5EEY6dEvnnuSeLXSQuHQK8BFRb/lp7Odh7uQE=; b=EsnGDIYMXqXxJdOLRJgideZ06KZ6xAaWV7njhxsSp00n4BzTXdGarQE3Jbj4aM86Qe AV8ZFoX51/2BI777b23bfzepN4AAp9n/t1OkCeZIA5ghBgP0yYiuX0kQyKrYK5M+r8g1 0jjYdkd/OcVSyeqooQiZX4m5vY/mFSVV7+q+DT9XXtizXWiNUoEu23N0cdYJTPJ7Jrz1 CtkAr/xAaZJgRhksaGvT0G+Jelq3e0HnpwkOR6zTdYyQVxV05+UhwN+IUfl5+Ed9dIbo VlfRuRtulROL3deCBGQ9/L+Vwtz4DJnvJmoBrLjKxtvqDvfT6O2BrpRJNNwpQzJXr1Z/ tuYw== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d17si5506049edj.264.2021.01.19.09.02.55; Tue, 19 Jan 2021 09:03:18 -0800 (PST) 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729498AbhASRBg (ORCPT + 99 others); Tue, 19 Jan 2021 12:01:36 -0500 Received: from foss.arm.com ([217.140.110.172]:40152 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388905AbhASQ4m (ORCPT ); Tue, 19 Jan 2021 11:56:42 -0500 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 E5C9BD6E; Tue, 19 Jan 2021 08:55:53 -0800 (PST) Received: from e113632-lin (e113632-lin.cambridge.arm.com [10.1.194.46]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 00E573F66E; Tue, 19 Jan 2021 08:55:52 -0800 (PST) From: Valentin Schneider To: Vincent Guittot Cc: Qais Yousef , "Peter Zijlstra \(Intel\)" , Dietmar Eggemann , linux-kernel , Morten Rasmussen Subject: Re: [PATCH] sched/eas: Don't update misfit status if the task is pinned In-Reply-To: References: <20210119120755.2425264-1-qais.yousef@arm.com> User-Agent: Notmuch/0.21 (http://notmuchmail.org) Emacs/26.3 (x86_64-pc-linux-gnu) Date: Tue, 19 Jan 2021 16:55:43 +0000 Message-ID: MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 19/01/21 15:19, Vincent Guittot wrote: > On Tue, 19 Jan 2021 at 14:54, Valentin Schneider > wrote: >> On 19/01/21 14:34, Vincent Guittot wrote: >> >> - if (!p) { >> >> + if (!p || p->nr_cpus_allowed == 1) { >> > >> > Side question: What happens if there is 2 misfit tasks and the current >> > one is pinned but not the other waiting one >> > >> >> update_misfit_status() is called either on the current task (at tick) or >> on the task picked by pick_next_task_fair() - i.e. CFS current or >> about-to-be-current. >> >> So if you have 2 CPU hogs enqueued on a single LITTLE, and one of them >> is pinned, the other one will be moved away either via regular load > > This doesn't seem reliable because it uses load or nr_running > Right >> balance, or via misfit balance sometime after it's picked as the next >> task to run. >> >> Admittedly that second case suffers from unfortunate timing mostly >> related to the load balance interval. There was an old patch in the >> Android stack that would reduce the balance interval upon detecting a > > Shouldn't we keep track of enqueue misfit tasks instead ? > That might help. This being CFS however, the maintenance of it might prove prohibitive. I faintly recall having concerns about expanding the misfit logic to non-current tasks, but nothing comes to mind right now... Historically (before PELT time scaling) I think it wasn't possible to have a steady state with more than one misfit task on a rq, as two similar CPU hogs would end up with a utilization value of at most half the CPU's capacity. If those were at e.g. opposite ends of the NICE spectrum, if one would be flagged as misfit then the other wouldn't (can't have two slices greater than 80%!) I *think* that's still true with timescaling, but then we did add the uclamp stuff to make tasks look bigger than they are... >> misfit task to "accelerate" its upmigration; this might need to be >> revisited... >> >> >> rq->misfit_task_load = 0; >> >> return; >> >> } >> >> -- >> >> 2.25.1 >> >>