Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp3487331imm; Tue, 29 May 2018 08:05:00 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqZ0xkR4YPtFfVguHzx4hRb37RVxEu6TkPY8S1EsElFQCA5r8Kpz/I+l6Qr4dx4pMEgGZmb X-Received: by 2002:a63:ba56:: with SMTP id l22-v6mr14020830pgu.161.1527606300755; Tue, 29 May 2018 08:05:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527606300; cv=none; d=google.com; s=arc-20160816; b=XNzUW0m+OTGnXihQWYWkvrENLDL/3DA6I/tp16oyrPdbzasDracoaEG8RY5JM5bR7i 3dPODfR1vmiN/P5yg/4hWj+D2hbMol02M6s2JQBdivGuJBfwxx2hiBFk4YVqAG/Ezkae GaCihZN5B04cqvVdyBBsl4/I6EclVpKb7yaeu6C0qAPXu4vcau0WO/DIbqK0jS2DUi9N 27XZJgzP0Hs5htfvcmheY//ibHSFmpIcSRWUNHvLx7LAD6X83yo/rd4XgssD6hl76qae zCSlBbNe1WdC7RafeRZujGpgzTWLrvE6SV5bs8jTnsF60x5WmS6yYN8n2NsPzlNh2iW9 FCVg== 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 :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=LsQGwf2hdzjg/UJfDIUxQmTUiwfQ5PbD33mWc77jzxI=; b=z91R3J7nmLjQKRY681D3JeQIPwnOnyz4Kh4PznvdN7vplpZHS++Lt47i/g6NRPXm34 Og8B36okdn9yUn+Psx3/7ZfrV3M/54MXl+MT/DaRaRWHlEH4Ez1BMyn7O6f/hXNhDtab bmzBRmmR9pGSccYTV2LanKnef+WkQu4BMGibNBUGMwub+bDXPo/izQYegbnFewogDRf+ i+LzCVxTqEPpIaSJ4qccYZJa9qfDdr2RPHMcTA55WiI4D5MEDmlDihKxihMBTGdBSB8X 0HOI40V8InoIBB2p9ovrS9bKFNRTjm1/1XsRbme5mJSyklS+w2dBvnPTnOuAbIiX3unq zBfg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=NdSHef3K; 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 c8-v6si32730179pfj.138.2018.05.29.08.04.14; Tue, 29 May 2018 08:05:00 -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; dkim=pass header.i=@linaro.org header.s=google header.b=NdSHef3K; 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 S936629AbeE2PDI (ORCPT + 99 others); Tue, 29 May 2018 11:03:08 -0400 Received: from mail-it0-f66.google.com ([209.85.214.66]:38030 "EHLO mail-it0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935483AbeE2PCv (ORCPT ); Tue, 29 May 2018 11:02:51 -0400 Received: by mail-it0-f66.google.com with SMTP id q4-v6so18950420ite.3 for ; Tue, 29 May 2018 08:02:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=LsQGwf2hdzjg/UJfDIUxQmTUiwfQ5PbD33mWc77jzxI=; b=NdSHef3Ku+wY3dJqHvT/58Q36fSZlviljYH75W0h/2jVYXBoOjGLZvEznufmeh8es2 8w7NczyCLV9dJcIlXt5qe9pf8n6oIGPMBZ9dlPeFTslCLacR6BuXKvQiCp8SIfTngGfK jwC8/YAwuI54lyAEOHA7Byr1N4eaTOWWoHTrI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=LsQGwf2hdzjg/UJfDIUxQmTUiwfQ5PbD33mWc77jzxI=; b=YwqB0tlJWrEpZynFfzHn9UHc2Xzwk+aqg6dIj46WH44TCneJHrScIU7vDX4C+6s0mQ uYm4z2qe3NNG10tZrhcg0A7yYUFwf+eijG0qtGfREH/GIasNCIMtIw6Q7BNcwqeRIPlz Z5EtPFNhV+OpAUKX6xWYW9MHw5dFZCS0VIClYQgJNQ1QSU776ZpszMLvxnYz865MzweV ZyWs2anrntS5+f/Kjf2RZuo0wZeYHGrvzi+7sa9XnOdM//+8gPCwW7ap/H20Noega6fT 6PHsk+q9Kwymb9ojNTt8tLlXI17NbE7Tx+nrXJtYMMPifiy8n6q9XjX1YFWivJVo48aC 6/hQ== X-Gm-Message-State: ALKqPwetQctgjrnzw8GHGe4bzb8YMHvl/me1XDbkbvlT3xNvwIJkbR8n gyeEgkp9Hh/WiFtG8/1yDGC7d+ROZm9CkHhVOufzsA== X-Received: by 2002:a24:eb17:: with SMTP id h23-v6mr14285046itj.17.1527606170134; Tue, 29 May 2018 08:02:50 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a6b:4cc:0:0:0:0:0 with HTTP; Tue, 29 May 2018 08:02:29 -0700 (PDT) In-Reply-To: <20180529145506.GF15173@e108498-lin.cambridge.arm.com> References: <1527253951-22709-1-git-send-email-vincent.guittot@linaro.org> <1527253951-22709-2-git-send-email-vincent.guittot@linaro.org> <20180525142648.GC15173@e108498-lin.cambridge.arm.com> <20180525180455.GF30654@e110439-lin> <20180529145506.GF15173@e108498-lin.cambridge.arm.com> From: Vincent Guittot Date: Tue, 29 May 2018 17:02:29 +0200 Message-ID: Subject: Re: [PATCH v5 01/10] sched/pelt: Move pelt related code in a dedicated file To: Quentin Perret Cc: Patrick Bellasi , Peter Zijlstra , Ingo Molnar , linux-kernel , "Rafael J. Wysocki" , Juri Lelli , Dietmar Eggemann , Morten Rasmussen , viresh kumar , Valentin Schneider 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 Quentin, On 29 May 2018 at 16:55, Quentin Perret wrote: > > On Friday 25 May 2018 at 19:04:55 (+0100), Patrick Bellasi wrote: > > On 25-May 15:26, Quentin Perret wrote: > > > And also, I understand these functions are large, but if we _really_ > > > want to inline them even though they're big, why not putting them in > > > sched-pelt.h ? > > > > Had the same tought at first... but then I recalled that header is > > generated from a script. Thus, eventually, it should be a different one. > > Ah, good point. This patch already introduces a pelt.h so I guess that > could work as well. > > > > > > We probably wouldn't accept that for everything, but > > > those PELT functions are used all over the place, including latency > > > sensitive code paths (e.g. task wake-up). > > > > We should better measure the overheads, if any, and check what > > (a modern) compiler does. Maybe some hackbench run could help on the > > first point. > > FWIW, I ran a few hackbench tests today on my Intel box: > - Intel i7-6700 (4 cores / 8 threads) @ 3.40GHz > - Base kernel: today's tip/sched/core "2539fc82aa9b sched/fair: Update > util_est before updating schedutil" > - Compiler: GCC 7.3.0 Which cpufreq governor are you using ? > > The tables below summarize the results for: > perf stat --repeat 10 perf bench sched messaging --pipe --thread -l 50000 --group G > > Without patch: > +---+-------+----------+---------+ > | G | Tasks | Duration | Stddev | > +---+-------+----------+---------+ > | 1 | 40 | 3.906 | +-0.84% | > | 2 | 80 | 8.569 | +-0.77% | > | 4 | 160 | 16.384 | +-0.46% | > | 8 | 320 | 33.686 | +-0.42% | > +---+-------+----------+---------+ > > With patch: Just to make sure. You mean only this patch and not the whole patchset ? > +---+-------+----------------+---------+ > | G | Tasks | Duration | Stddev | > +---+-------+----------------+---------+ > | 1 | 40 | 3.953 (+1.2%) | +-1.43% | > | 2 | 80 | 8.646 (+0.9%) | +-0.32% | > | 4 | 160 | 16.390 (+0.0%) | +-0.38% | > | 8 | 320 | 33.992 (+0.9%) | +-0.27% | > +---+-------+----------------+---------+ > > So there is (maybe) a little something on my box, but not so significant > IMHO ... :) > > Thanks, > Quentin