Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp4873757imm; Tue, 31 Jul 2018 01:22:32 -0700 (PDT) X-Google-Smtp-Source: AAOMgpezOMKRvLMq8X2ptfmcN6dvCfc1OOVf/973Oq3cjTKjhUY8dnqN4OiRTqdDR5ZYILvV4z/y X-Received: by 2002:a17:902:28aa:: with SMTP id f39-v6mr19569548plb.150.1533025352515; Tue, 31 Jul 2018 01:22:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533025352; cv=none; d=google.com; s=arc-20160816; b=gMLIQwmqfyjQ8GSAwvAwx/p9FXBRxxvU8dJ6AcMR9X7mtx+nB5OuJ7J3+Uggt65VNL f5lTPf/1PuQrwoGLocX4QIbbMvDaVbpPmJWdobZ3ESx1kK0v3yGLTeZ85OaMWMc8Jib8 1yOfA55KZI/6Z4DFlmXdqCkhWdtQGYVhGKQQWb8Xzn/KiSX0peA2Yri4PGaNoylaaE9R Mm6S1UI6zuVKFjXtv9UsX3b6H10eNuv739/J/n8dZwsjq+K9IkGd5p/juIFDFWqYckpk lZAPRlioj+pEoNK+noHbjlDishtCbVs3sTF2h9X8KbUY6zYgjez7o83tP6mwyup4AnN9 KGAg== 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 :arc-authentication-results; bh=wsedL34Iwh9QW83RmG9rZsf9noYCWwlKl4IRxDF7iGc=; b=TmceLdI29YETiDwIIOWLxZGm+hrXR9zDW2RxLWf8zFXigjnYYtlvpro8sL40e6u/Of YuByn4LN3OScEjvWx6pkTldI2wE6dY0Tuz7huHEVL1pHk1PvLMX4+BGGRNNXVPyiXB/7 r+fUfJlLBHVL3ByQpAvnpgKu9mTVdZiCngwY4vwYknaG53Uus2ZLxwrUy+ltWLH85Roy J3Ui1RCb/gQsB9VGO5useE6Osv9olzuOADM1Oz2KJfzZB1YP6G2z57EZNINFVdajRa1x vLps04DF3rA+Qu6NUsyDgDbmhzht6QJzbpZvUcc8BLDyX/qk+7YfwTMIYTaPTh6+Q6KE MlvA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=fgjCV92m; 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 i190-v6si13648004pgc.348.2018.07.31.01.22.16; Tue, 31 Jul 2018 01:22:32 -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=fgjCV92m; 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 S1729646AbeGaKAg (ORCPT + 99 others); Tue, 31 Jul 2018 06:00:36 -0400 Received: from mail-it0-f66.google.com ([209.85.214.66]:53597 "EHLO mail-it0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727161AbeGaKAg (ORCPT ); Tue, 31 Jul 2018 06:00:36 -0400 Received: by mail-it0-f66.google.com with SMTP id 72-v6so3155615itw.3 for ; Tue, 31 Jul 2018 01:21:26 -0700 (PDT) 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=wsedL34Iwh9QW83RmG9rZsf9noYCWwlKl4IRxDF7iGc=; b=fgjCV92mgEngHdTlf+Ld73WZoQpxzJfGzbKnUeuZTY88l5cPGCEW5C46m2tpOhbvWp 4PK2+zQxynjt1E/lZZNmiVE8N0QtvpY4P7dhYgjPqgeMW11PYPuTT9lm52Yq6edbiMuQ W6zjF6nFqm5pOX7pAHcV93VcvE6zwF4K/4wXI= 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=wsedL34Iwh9QW83RmG9rZsf9noYCWwlKl4IRxDF7iGc=; b=ExMhsRrlSWw17wtG0DwlSITsH1rHI+pBlBbFenAwuW/7zoiaWhWLh9iKcuLVXfAMR0 ZAHTX66yR9VVSwiqrZP1v8gWyW2aHzaDY2V0JfqIiucOadAB2DVXsKe2uTTxyDpLXKFP 4iSrvTNyXPpCuEQFTCPASmwSkyguvmSpeb2Pv5CUfliTBB3uD82917oQiSY8JWKJibOD wqCkP3iYTzo5S8wQ0/85LFOM5NJDL7ErrCIq3xP5ZhZF5ouhcpyZlgLeTca6M+MdqiSg PVN+OdbHln8AhAjOxa0lQ5fSGYmbt24Fs/p90KelAndA3/CG5pa7ESusLUFEV2AT2zbA KCmA== X-Gm-Message-State: AOUpUlFTPbjOi2VXzRPu56y3mlWk2VP/z2Gr+V3JDh4jdLNipqLHYNRT KQTffP6eXORwqbbodbukt4yuXkNgie1o5Sx61SiiKw== X-Received: by 2002:a24:55cd:: with SMTP id e196-v6mr2024266itb.8.1533025285670; Tue, 31 Jul 2018 01:21:25 -0700 (PDT) MIME-Version: 1.0 References: <1530200714-4504-1-git-send-email-vincent.guittot@linaro.org> <1530200714-4504-7-git-send-email-vincent.guittot@linaro.org> In-Reply-To: From: Vincent Guittot Date: Tue, 31 Jul 2018 10:21:14 +0200 Message-ID: Subject: Re: [PATCH 06/11] sched/irq: add irq utilization tracking To: Wanpeng Li Cc: Peter Zijlstra , Ingo Molnar , linux-kernel , "Rafael J. Wysocki" , Juri Lelli , Dietmar Eggemann , Morten Rasmussen , viresh kumar , Valentin Schneider , Patrick Bellasi , Joel Fernandes , Daniel Lezcano , Quentin Perret , Luca Abeni , Claudio Scordino , Ingo Molnar , kvm@vger.kernel.org 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, 31 Jul 2018 at 05:32, Wanpeng Li wrote: > > > > > > > > #if defined(CONFIG_IRQ_TIME_ACCOUNTING) || defined(CONFIG_PARAVIRT_TIME_ACCOUNTING) > > > > if ((irq_delta + steal) && sched_feat(NONTASK_CAPACITY)) > > > > - sched_rt_avg_update(rq, irq_delta + steal); > > > > + update_irq_load_avg(rq, irq_delta + steal); > > > > > > I think we should not add steal time into irq load tracking, steal > > > time is always 0 on native kernel which doesn't matter, what will > > > happen when guest disables IRQ_TIME_ACCOUNTING and enables > > > PARAVIRT_TIME_ACCOUNTING? Steal time is not the real irq util_avg. In > > > addition, we haven't exposed power management for performance which > > > means that e.g. schedutil governor can not cooperate with passive mode > > > intel_pstate driver to tune the OPP. To decay the old steal time avg > > > and add the new one just wastes cpu cycles. > > > > In fact, I have kept the same behavior as with rt_avg, which was > > already adding steal time when computing scale_rt_capacity, which is > > used to reflect the remaining capacity for FAIR tasks and is used in > > load balance. I'm not sure that it's worth using different variables > > for irq and steal. > > That being said, I see a possible optimization in schedutil when > > PARAVIRT_TIME_ACCOUNTING is enable and IRQ_TIME_ACCOUNTING is disable. > > With this kind of config, scale_irq_capacity can be a nop for > > schedutil but scales the utilization for scale_rt_capacity > > Yeah, this is what in my mind before, you can make a patch for that. :) ok, I'm going to prepare a patch Thanks > > Regards, > Wanpeng Li