Received: by 10.223.176.5 with SMTP id f5csp601521wra; Fri, 9 Feb 2018 04:18:09 -0800 (PST) X-Google-Smtp-Source: AH8x225Go+Cvp9w2PqC8PEGj31FU/FXJbSpIbQniTybKfIbFqx9aICDNzff8bvPeyQyAT7i/NFqn X-Received: by 10.98.68.91 with SMTP id r88mr2722485pfa.52.1518178689766; Fri, 09 Feb 2018 04:18:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518178689; cv=none; d=google.com; s=arc-20160816; b=e+wEK3DIyICUDTMZ7/thVzhII00VZB4DxMmEth6EubcCbfZVyeeGU3sqzvlVNpeMXc ddEXGvTpmlspxWubShmF/hZObBI//qQWR0frjCCqMUKlTQlcgsahsHluAPqpxNQ2Jsbu XJIiV71p1UEpf2dI03Fbjbzf4y1WuD/89xSyfPQinKIfDRppqoxL/J23XXutoe6Rlgbb E7E9BYwoWh2L6/aYCOHgVrec9+kpu6eeWEpch1oBBDuxx7o6vlu11APzzeStwOsIMrJG jy/m1WAxEaxkA/tG57zjDTikjr41QGokfR+tedVljYfK8CW+PAOoZZRU4KgjN3rfHpgH 5WFw== 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:arc-authentication-results; bh=iqWoQGUJ0WQ+qftPw31huh7URqEQ85RAb9815cHxPlY=; b=agSt+g8xB5cEQ+dqm2PV9u5YX5EnLJ0IfDnSfmIfzGMRdjRWxaenXxpIN/bH3xDt7s 3hO1APfGExyaFaGz+PexrXv/jQe1rpUqgW7nFOgJXad+M8KnVW/9VAx5GvGNCOsALuE3 GveoXavA0OXZ1BxAZwZbqfx2iiq6ErRxMQOMpAWDJCPp/baHNREUZ5M8ksA5xl2AjyEj b8KKrDDU8jlDrnGfKIh5c3L4RQFcgZBR7OfN82T6GggoFVI59/0oGZej2Sa1//kjru2m kA8ddvb4a4Mdd0jh/5AnMNIlOkBr+w3hTsv72cULwIdYmhkU2rAOg15XXOEDDGuaPQPJ 2qew== 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 c4si1646596pfg.151.2018.02.09.04.17.55; Fri, 09 Feb 2018 04:18:09 -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; 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 S1752220AbeBIMQh (ORCPT + 99 others); Fri, 9 Feb 2018 07:16:37 -0500 Received: from foss.arm.com ([217.140.101.70]:46414 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751038AbeBIMQf (ORCPT ); Fri, 9 Feb 2018 07:16:35 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 987DA80D; Fri, 9 Feb 2018 04:16:35 -0800 (PST) Received: from [10.1.206.74] (e113632-lin.cambridge.arm.com [10.1.206.74]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 5E06A3F25C; Fri, 9 Feb 2018 04:16:34 -0800 (PST) Subject: Re: [PATCH v2 1/3] sched: Stop nohz stats when decayed To: Vincent Guittot Cc: Peter Zijlstra , Ingo Molnar , linux-kernel , Morten Rasmussen , Brendan Jackman , Dietmar Eggemann References: <1517944987-343-1-git-send-email-vincent.guittot@linaro.org> <1517944987-343-2-git-send-email-vincent.guittot@linaro.org> <780a5b3a-4829-4195-c8fd-95da27248a82@arm.com> From: Valentin Schneider Message-ID: <1827d0e9-523d-9387-9c0a-87b05ed9fcbf@arm.com> Date: Fri, 9 Feb 2018 12:16:33 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 02/09/2018 11:41 AM, Vincent Guittot wrote: > On 8 February 2018 at 20:21, Valentin Schneider > wrote: >> On 02/08/2018 01:36 PM, Vincent Guittot wrote: >>> On 8 February 2018 at 13:46, Valentin Schneider >>> wrote: >>>> On 02/06/2018 07:23 PM, Vincent Guittot wrote: >>>>> [...] > >> >> In summary: >> >> 20 iterations per test case >> All non-mentioned CPUs are idling >> >> --------------------- >> kick_ilb() test case: >> --------------------- >> >> a, b = 100% rt-app tasks >> - = idling >> >> Accumulating load before sleeping >> ^ >> ^ >> CPU1| a a a - - - a >> CPU2| - - b b b b b >> v >> v > Periodically kicking ILBs to update nohz blocked load >> >> Baseline: >> _nohz_idle_balance() takes 39µs in average >> nohz_balance_enter_idle() takes 233ns in average >> >> W/ cpumask: >> _nohz_idle_balance() takes 33µs in average >> nohz_balance_enter_idle() takes 283ns in average >> >> Diff: >> _nohz_idle_balance() -6µs in average (-16%) >> nohz_balance_enter_idle() +50ns in average (+21%) > > In your use case, there is no contention when accessing the cpumask. > Have you tried a use case with tasks that wake ups and go back to idle > simultaneously on several/all cpus so they will fight to update the > atomic resources ? > That would be interesting to see the impact on the runtime of the > nohz_balance_enter_idle function No, I haven't tried that yet. For now these tests picture the "best case" scenario since all but one CPU is idle. I've been meaning to test busier scenarios - I'll give your idle/sleep storm a try, thanks for the suggestion. I also need to work on a test case for the load_balance() call in idle_balance(). As Peter mentioned, the clearing of has_blocked in update_sd_lb_stats() can only be done with atomic ops, so that's another thing to profile against the baseline.