Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp1882477ybc; Wed, 20 Nov 2019 05:40:51 -0800 (PST) X-Google-Smtp-Source: APXvYqys42fFsS1eHgcHk5h50fi5N8RSjWAxTHpgFew+Z+xKmcnQlHPaIb29KCxJ44sTTxNajfQ9 X-Received: by 2002:a17:906:cca:: with SMTP id l10mr5416926ejh.161.1574257250107; Wed, 20 Nov 2019 05:40:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574257250; cv=none; d=google.com; s=arc-20160816; b=WcGzdTBsnGxeq2JCPx/kZqiMIOj4GN+dZ7ouDoZhPfojXwoKLsPIxalm2MbFdf3+RI cv+6xsDOV5E+gOhQtQfNFirH1jGkE7uwPpfD8rbE9l5XUj3TuNO6wM3to+H698agTcbK Bt5tuRK6U/JRNeVweeLh9jju/DcITHzAzCYpHsTOJ4GS5ffL8/w2EVs7CdaM8dTp4/Q0 aZInEX8rlwVaYV+dS9rmArLTQKAlwnrea53FCfmlRCEQnyCYWlwGJuotpUb0m+muqyMy 2+dGkmXtySp040FLyaew5rQiCo7xVsI/WEnvNO9EWq5qMFtqNGdR9ukRaAXgeDvsRImr PXuA== 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=u+fEJbvQrRlIm5amKPzgTUOGJYAL/QTXwvIMqIsCMxs=; b=OACFfCtpAv1AR6GOaSEOPF7vJUBR269BAPLb7qsDvU1MEnkE8syml0TNPzTL0gy9ak X1rrBJ66nQ8Yrsp3i3IfuWX/rqVEB1r4wAlp78VmxtytMUbAyIZwyPWo5tfHlhh0nsNV 9wRL7PjZ+5CjI2pNH94wHB/TE6Y2mebgx/tycx6WJR2h5ooOw6QZsM4dHoplRnPQ0rj8 yAhX69wereUjdWLyKp2bT6YluzB6xXD0UhO3z/8YF1K3KqJIgplQBFK3IiE/q8/N4gM7 Of0uRVxp5eqvzhQAft0ef2bXxc+WA89+dqlKxlpsS/XfsLo604zjHDVm1IwAs+ICSVq0 DXRw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=zeVpR9kG; 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=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id bo10si14234996edb.424.2019.11.20.05.40.26; Wed, 20 Nov 2019 05:40:50 -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=@linaro.org header.s=google header.b=zeVpR9kG; 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=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730409AbfKTNWN (ORCPT + 99 others); Wed, 20 Nov 2019 08:22:13 -0500 Received: from mail-lf1-f65.google.com ([209.85.167.65]:41893 "EHLO mail-lf1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730266AbfKTNWL (ORCPT ); Wed, 20 Nov 2019 08:22:11 -0500 Received: by mail-lf1-f65.google.com with SMTP id j14so20160545lfb.8 for ; Wed, 20 Nov 2019 05:22:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=u+fEJbvQrRlIm5amKPzgTUOGJYAL/QTXwvIMqIsCMxs=; b=zeVpR9kG6RhnlC8g9BSHP0NoAGUkP0qwAhYse80QhwQEO6r7B8jxxhqmB5Q6bfYZeZ AgpzRHSe9SIixtqeUib5xE/5a1qMnlyt6CMEONaOGWj8qZM7Zs4I02BkAtdmXlSilAN7 9q/5a8dArRMysT+xLuyY2qLNGzmedUiUwLxw7ddXPDHzXrloXK3YcFtSznkJXTLK4waV tMiPH1SSNToVlctcX7SsM8Gapk7LtK0eFL8+kj4eJId5ENquQcfkf7wMBCMmbro6v/3n tUSBHQowhVnEsHjj1mGo2zRZ/8DOZ3PpiDjXrJXTxZsu19VoLQ2d/HdAuF8Dj5gxl5Lh RT7Q== 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=u+fEJbvQrRlIm5amKPzgTUOGJYAL/QTXwvIMqIsCMxs=; b=uoI6F6FizlWqMeMLtsgxZjMAkJe7stAs1dvTv1k5aqLuNXSXQd/FbFOI8RKOSkeXEO jr6yB+bEg4csVOv5bMFQa9DKf53o+mZPmJKCoGyexKKUl11ovH09U5QGQb4u/Dz+z/Ni XfCd5CHPmOuARzeqA2qiEJLJKZaH91cRig2uKCzBwxlveCwGuXttlDjEFHeDq4z7dekZ xI+ooRBzNCHUh+qQU6eZVTAdmTRQI1QSgQuy7Ggnr+ybQFQlC9JEN/9j16ue1gSZ2TGq j+M6aeL57h3PWoh+pQcfQLiB6A//9nS7/1bsyGbfhay9T4Sn1tsfq2+deQP+mA+0TxSd eYxw== X-Gm-Message-State: APjAAAUa+a0OWZeVVvNZ3Qs/27XMTaoXG8N9hEKK/tjL3RRypPkX5sM0 7+yFQLly6icW0CiEtxUbQ90NUN793ksX5B2KpCU3jg== X-Received: by 2002:a19:c144:: with SMTP id r65mr2806460lff.133.1574256128135; Wed, 20 Nov 2019 05:22:08 -0800 (PST) MIME-Version: 1.0 References: <1571405198-27570-1-git-send-email-vincent.guittot@linaro.org> <1571405198-27570-12-git-send-email-vincent.guittot@linaro.org> <20191120115844.scli3gprgd5vvlt4@e107158-lin.cambridge.arm.com> In-Reply-To: <20191120115844.scli3gprgd5vvlt4@e107158-lin.cambridge.arm.com> From: Vincent Guittot Date: Wed, 20 Nov 2019 14:21:56 +0100 Message-ID: Subject: Re: [PATCH v4 11/11] sched/fair: rework find_idlest_group To: Qais Yousef Cc: linux-kernel , Ingo Molnar , Peter Zijlstra , Phil Auld , Valentin Schneider , Srikar Dronamraju , Quentin Perret , Dietmar Eggemann , Morten Rasmussen , Hillf Danton , Parth Shah , Rik van Riel 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 Hi Qais, On Wed, 20 Nov 2019 at 12:58, Qais Yousef wrote: > > Hi Vincent > > On 10/18/19 15:26, Vincent Guittot wrote: > > The slow wake up path computes per sched_group statisics to select the > > idlest group, which is quite similar to what load_balance() is doing > > for selecting busiest group. Rework find_idlest_group() to classify the > > sched_group and select the idlest one following the same steps as > > load_balance(). > > > > Signed-off-by: Vincent Guittot > > --- > > LTP test has caught a regression in perf_event_open02 test on linux-next and I > bisected it to this patch. > > That is checking out next-20191119 tag and reverting this patch on top the test > passes. Without the revert the test fails. > > I think this patch disturbs this part of the test: > > https://github.com/linux-test-project/ltp/blob/master/testcases/kernel/syscalls/perf_event_open/perf_event_open02.c#L209 > > When I revert this patch count_hardware_counters() returns a non zero value. > But with it applied it returns 0 which indicates that the condition terminates > earlier than what the test expects. Thanks for the report and starting analysing it > > I'm failing to see the connection yet, but since I spent enough time bisecting > it I thought I'll throw this out before I continue to bottom it out in hope it > rings a bell for you or someone else. I will try to reproduce the problem and understand why it's failing because i don't have any clue of the relation between both for now > > The problem was consistently reproducible on Juno-r2. > > LTP was compiled from 20190930 tag using > > ./configure --host=aarch64-linux-gnu --prefix=~/arm64-ltp/ > make && make install > > > > *** Output of the test when it fails *** > > # ./perf_event_open02 -v > at iteration:0 value:254410384 time_enabled:195570320 time_running:156044100 > perf_event_open02 0 TINFO : overall task clock: 166935520 > perf_event_open02 0 TINFO : hw sum: 1200812256, task clock sum: 667703360 > hw counters: 300202518 300202881 300203246 300203611 > task clock counters: 166927400 166926780 166925660 166923520 > perf_event_open02 0 TINFO : ratio: 3.999768 > perf_event_open02 0 TINFO : nhw: 0.000100 /* I added this extra line for debug */ > perf_event_open02 1 TFAIL : perf_event_open02.c:370: test failed (ratio was greater than ) > > > > *** Output of the test when it passes (this patch reverted) *** > > # ./perf_event_open02 -v > at iteration:0 value:300271482 time_enabled:177756080 time_running:177756080 > at iteration:1 value:300252655 time_enabled:166939100 time_running:166939100 > at iteration:2 value:300252877 time_enabled:166924920 time_running:166924920 > at iteration:3 value:300242545 time_enabled:166909620 time_running:166909620 > at iteration:4 value:300250779 time_enabled:166918540 time_running:166918540 > at iteration:5 value:300250660 time_enabled:166922180 time_running:166922180 > at iteration:6 value:258369655 time_enabled:167388920 time_running:143996600 > perf_event_open02 0 TINFO : overall task clock: 167540640 > perf_event_open02 0 TINFO : hw sum: 1801473873, task clock sum: 1005046160 > hw counters: 177971955 185132938 185488818 185488199 185480943 185477118 179657001 172499668 172137672 172139561 > task clock counters: 99299900 103293440 103503840 103502040 103499020 103496160 100224320 96227620 95999400 96000420 > perf_event_open02 0 TINFO : ratio: 5.998820 > perf_event_open02 0 TINFO : nhw: 6.000100 /* I added this extra line for debug */ > perf_event_open02 1 TPASS : test passed > > Thanks > > -- > Qais Yousef