Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp5266220ybl; Tue, 10 Dec 2019 03:17:41 -0800 (PST) X-Google-Smtp-Source: APXvYqzJNpzxUY40YDqmgLShoKnd064xfy+6QpGNvfborPpyZyoLr5mUKLJg9dVADt/fyR0s9Xqk X-Received: by 2002:a05:6830:1492:: with SMTP id s18mr25925644otq.285.1575976661729; Tue, 10 Dec 2019 03:17:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575976661; cv=none; d=google.com; s=arc-20160816; b=p0M2n40s20J/rC4uCnD4KiwuZNEZbcj86lV/tKtrM3OwX1N8NxAbNI0tL/1L21iOBe zHSmqoS29Ftp7KhtWroPyu38XdvycVbhtMjlU1l9l/6j+XvXS/da4mIMxw6gArsV/Wow b18Tjr/dNQjdGaSjWF9GQKvzK+t8+hkXJLGIv6oCjMFqNz8g7XqNkGXxrrRXf7XIQ56y Of+IeC+Wiab2O+CZ1gzEdnUHEJ6Z/VsXg4lipCYhSr1XcAD5i1NIJrOa1HTwkteWHmkl /WYiEGNcwDMTyecVZAX3oSvlGGOZLfcunHaXYWwhfSPbufAPXrVn/kCukBYFkc/FHcYn 8LRg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=gNhRxJlAjN3xnQc/fMGRg0A/etp8RV9aaSfVxAhWsao=; b=CydmeUB0XbrXG0SimTFi0zjL9KlCJkqZeE+RrBdCNXNmV8K+Bl156y6LFyr9ZQCkbI HO/oIS7TmnnYu5A1Uc/pGHXG7Yo7C7SB8w1f1w8lZtMw8NeRQ+DlSNM0asFBfRjBwJvz QC0qzA80gPLpE7azPjNWFqtlaPKs4GXT5V9YSDrM9A61BBBfOtZEEqJ5cRoBL8YLn7VL /SugUXWz3q3zP1yrmo3pMOHSau7tFgBUIIqmr78So6oXcQ9kx9prckK4i7tL7cjtoHGj iH725gzgLT2zv1aZhhm5z/RO24YKwZk0fJ9HV+XRQ7wLqFI+8+BASNXHPkDCzzwB9BGs nbUA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Q0ZtOPNP; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h138si1673971oib.6.2019.12.10.03.17.28; Tue, 10 Dec 2019 03:17:41 -0800 (PST) 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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Q0ZtOPNP; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727224AbfLJLPr (ORCPT + 99 others); Tue, 10 Dec 2019 06:15:47 -0500 Received: from mail-oi1-f195.google.com ([209.85.167.195]:44951 "EHLO mail-oi1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726915AbfLJLPq (ORCPT ); Tue, 10 Dec 2019 06:15:46 -0500 Received: by mail-oi1-f195.google.com with SMTP id d62so9370728oia.11 for ; Tue, 10 Dec 2019 03:15:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=gNhRxJlAjN3xnQc/fMGRg0A/etp8RV9aaSfVxAhWsao=; b=Q0ZtOPNPOVKkuZZudKRECjtmEEFoDIef6uPbZaARD1XDkMSH7VDUjB9WZYo2cztA2u xAIltoiVEvRYiavrKDsys9yboQyIZsGec4/QTUUTReA8JHMw6Xjir1RaLZu3Ybu/Cssz d4epGO1yJgUMMpzCEpEA1192txMvGn7eWVECOH0kyQFu7OtxcxbAjkflnkYm7+Wg0L9Z caLcGEn/F19fHj6i4o58HZSMs+jlM8kxoIYOxlzi7U06EZpSopW3bdBYtp8HRxp2+iGC q34z/JyKn7zAU8HsY0hGo6t3blNaNBGz9ndIkJDiLBuO7GtoyDF34yhNBzI7gQvjlz2w q9zg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=gNhRxJlAjN3xnQc/fMGRg0A/etp8RV9aaSfVxAhWsao=; b=antuKlGr8LUM8qXrGaW5aAD4ZE/nUGqCHKFvj71CsURccbRlaRVr1B8JlORjVc4/sv qWuqNcOl7/vIc9g88dngh1W5cwNhRadGofAebJ2m7ropv1uKlXoqKyPhbtEmyP3YENZL qxeof/H2VDzKen4+FB1KD3FFZFPLhLj+R+tNTWDFhPpv2o5XE0ckNgEddTsARGD901AC d+wkMs0BioRl+rVtQb1+GjfhmcD6yCzzQUfolwlr87u3BlxrTtbjirx1QWFkeO654v2H LXQCYdjE3rht55XluOnl/7S4Z9RspO7z2zkjSDkYMRFBLPziugyJuItbOqW1Eo+g49bW 58/w== X-Gm-Message-State: APjAAAW3yTfmuL9V7IF61FLlvnOPfApkA7bIkAgSWYFJHfPVBdiqIHDA xKDseXsAODyVq7l4EATkQw1qn9tcjSxPzZ+3qAk= X-Received: by 2002:aca:f305:: with SMTP id r5mr3604601oih.174.1575976545814; Tue, 10 Dec 2019 03:15:45 -0800 (PST) MIME-Version: 1.0 References: <20191210063303.pubbpu77ah2veuj7@vireshk-i7> In-Reply-To: <20191210063303.pubbpu77ah2veuj7@vireshk-i7> From: Wanpeng Li Date: Tue, 10 Dec 2019 19:15:34 +0800 Message-ID: Subject: Re: [PATCH V3 0/2] sched/fair: Fallback to sched-idle CPU in absence of idle CPUs To: Viresh Kumar Cc: Ingo Molnar , Peter Zijlstra , LKML , Vincent Guittot , Todd Kjos , Daniel Lezcano , quentin.perret@linaro.org, chris.redpath@arm.com, steven.sistare@oracle.com, subhra.mazumdar@oracle.com, songliubraving@fb.com Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 10 Dec 2019 at 14:33, Viresh Kumar wrote: > > On 09-12-19, 11:50, Wanpeng Li wrote: > > On Wed, 26 Jun 2019 at 13:07, Viresh Kumar wrote: > > > > > > Hi, > > > > > > We try to find an idle CPU to run the next task, but in case we don't > > > find an idle CPU it is better to pick a CPU which will run the task the > > > soonest, for performance reason. > > > > > > A CPU which isn't idle but has only SCHED_IDLE activity queued on it > > > should be a good target based on this criteria as any normal fair task > > > will most likely preempt the currently running SCHED_IDLE task > > > immediately. In fact, choosing a SCHED_IDLE CPU over a fully idle one > > > shall give better results as it should be able to run the task sooner > > > than an idle CPU (which requires to be woken up from an idle state). > > > > > > This patchset updates both fast and slow paths with this optimization. > > > > > > Testing is done with the help of rt-app currently and here are the > > > details: > > > > > > - Tested on Octacore Hikey platform (all CPUs change frequency > > > together). > > > > > > - rt-app json [1] creates few tasks and we monitor the scheduling > > > latency for them by looking at "wu_lat" field (usec). > > > > > > - The histograms are created using > > > https://github.com/adkein/textogram: textogram -a 0 -z 1000 -n 10 > > > > > > - the stats are accumulated using: https://github.com/nferraz/st > > > > Hi Viresh, > > > > Thanks for the great work! Could you give the whole commad-line for us testing? > > The rt-app json [1] can be run using: > > $ rt-app sched-idle.json > > This will create couple of files named rt-app-cfs_thread-*.log and > rt-app-idle_thread-*.log. I looked mostly at the cfs files here as that's what > we were looking for. We will be interested only in the last column of these > files, which says "wu_lat". Remove everything apart from that column (and remove > the first row as well, which has field names) from all cfs files (or write a > sed/awk command to do it for you. > > After that I you can generate the numbers (mean/max/min/etc) using: > > $ st rt-app-cfs_thread-*.log Thanks for pointing out this. Wanpeng