Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp3565537imm; Tue, 29 May 2018 09:20:34 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJm3dUz2eate7NgvS6w5YU/aZltINtnW+NgmNGgYVwfaGaoByRLRZIZ65vTZj5LKdIRDaDc X-Received: by 2002:a62:2394:: with SMTP id q20-v6mr12608433pfj.1.1527610834086; Tue, 29 May 2018 09:20:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527610834; cv=none; d=google.com; s=arc-20160816; b=a8hnStTOyGgyLK7gUTJZ8JcFH4WesC1oY0PdwjeXP4uSW8L8VN3xZUY/W8zE6gN9Wi G/TZwf5ne0dbKUmJzqC2A+ZEsFFr63RxB8lc5/6SbCoOa07XhWAhVTsL77IgjZHE4HI4 HbYRhuZb6LL8R8LLclTUOnBvDNR1DGDMH97oAYONjH5n/QkA+UGy1cHRcrCljux9qsym dAXeyVw9kqEfc35xwjct7QbNNddgqDraiAqAoWpzSlZ5WguR069hliiGr6KzpOtTst6z NwOmnlTD4LozYOkz4xpXMdrHrGfHnkLmewK5FIN4c8s5CIGqCBsddv+oSeFlKMe8D1eI nHrg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:date:cc:to:subject:from:references :in-reply-to:message-id:arc-authentication-results; bh=G80/3M/IhqUfw0o2dHtg6PyHEoVdch1TPANmcLNvqFY=; b=0jCbpHyQDnHEzClyh1Q1VuPXbswcQV4Dr7QFpf3fiBeCLumTrNKTim1Q0g7X5JWA73 nVpG2o4mQzK931fJN2zGQDvpEWG4oPItBItBJpqI59STIaa2c3DNZHJOn8+bFW5RhZwx fgYdno3mWKvRkHAqthJda7fyJ1oDn7RGXwhWUh26GGTNt9jNzckPpVtXaqhGZgGyPg5Q Nl1weioL5ut3oytac6mOfnZ4bUtlqxYbCBH0QYUAZ48IMVOZVwrowiXnNw+OMk+cKJi9 8232vE7aq3VJD0hf+r6IzBGsOnxpPvEUETRZ+E/R42eNk+HAPbzRtqXRCigupTd09y9L n1Dw== 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 g12-v6si33665620pfm.258.2018.05.29.09.20.20; Tue, 29 May 2018 09:20:34 -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; 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 S936856AbeE2QTf (ORCPT + 99 others); Tue, 29 May 2018 12:19:35 -0400 Received: from pegase1.c-s.fr ([93.17.236.30]:41685 "EHLO pegase1.c-s.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935771AbeE2QTU (ORCPT ); Tue, 29 May 2018 12:19:20 -0400 Received: from localhost (mailhub1-int [192.168.12.234]) by localhost (Postfix) with ESMTP id 40wJnx0LYSz9tvs7; Tue, 29 May 2018 18:19:17 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at c-s.fr Received: from pegase1.c-s.fr ([192.168.12.234]) by localhost (pegase1.c-s.fr [192.168.12.234]) (amavisd-new, port 10024) with ESMTP id JE8bg2BgUaNC; Tue, 29 May 2018 18:19:16 +0200 (CEST) Received: from messagerie.si.c-s.fr (messagerie.si.c-s.fr [192.168.25.192]) by pegase1.c-s.fr (Postfix) with ESMTP id 40wJnw6tndz9tvrn; Tue, 29 May 2018 18:19:16 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id C43EF8BB36; Tue, 29 May 2018 18:19:18 +0200 (CEST) X-Virus-Scanned: amavisd-new at c-s.fr Received: from messagerie.si.c-s.fr ([127.0.0.1]) by localhost (messagerie.si.c-s.fr [127.0.0.1]) (amavisd-new, port 10023) with ESMTP id 39GtkmDmCG60; Tue, 29 May 2018 18:19:18 +0200 (CEST) Received: from po14934vm.idsi0.si.c-s.fr (po15451.idsi0.si.c-s.fr [172.25.231.2]) by messagerie.si.c-s.fr (Postfix) with ESMTP id A04248BB34; Tue, 29 May 2018 18:19:18 +0200 (CEST) Received: by po14934vm.idsi0.si.c-s.fr (Postfix, from userid 0) id 92D1B6F515; Tue, 29 May 2018 16:19:18 +0000 (UTC) Message-Id: <96d2828025d815e91e3946f6ef45a09d9a206ca3.1527610536.git.christophe.leroy@c-s.fr> In-Reply-To: <2e937890abac10677aae3c1e345dd934a6794c37.1527610536.git.christophe.leroy@c-s.fr> References: <2e937890abac10677aae3c1e345dd934a6794c37.1527610536.git.christophe.leroy@c-s.fr> From: Christophe Leroy Subject: [PATCH v3 3/3] powerpc/time: no steal_time if !CONFIG_PPC_SPLPAR To: Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman Cc: linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Date: Tue, 29 May 2018 16:19:18 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org If CONFIG_PPC_SPLPAR is not selected, steal_time will always be NUL, so accounting it is pointless Signed-off-by: Christophe Leroy --- New in v3 arch/powerpc/kernel/time.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/arch/powerpc/kernel/time.c b/arch/powerpc/kernel/time.c index 7d6040233003..85d1b1ff45f3 100644 --- a/arch/powerpc/kernel/time.c +++ b/arch/powerpc/kernel/time.c @@ -346,7 +346,8 @@ void vtime_account_system(struct task_struct *tsk) stime = vtime_delta(tsk, &stime_scaled, &steal_time); stime -= min(stime, steal_time); - acct->steal_time += steal_time; + if (IS_ENABLED(CONFIG_PPC_SPLPAR)) + acct->steal_time += steal_time; if ((tsk->flags & PF_VCPU) && !irq_count()) { acct->gtime += stime; @@ -401,7 +402,7 @@ void vtime_flush(struct task_struct *tsk) if (acct->gtime) account_guest_time(tsk, cputime_to_nsecs(acct->gtime)); - if (acct->steal_time) + if (IS_ENABLED(CONFIG_PPC_SPLPAR) && acct->steal_time) account_steal_time(cputime_to_nsecs(acct->steal_time)); if (acct->idle_time) @@ -425,7 +426,8 @@ void vtime_flush(struct task_struct *tsk) acct->stime_scaled = 0; #endif acct->gtime = 0; - acct->steal_time = 0; + if (IS_ENABLED(CONFIG_PPC_SPLPAR)) + acct->steal_time = 0; acct->idle_time = 0; acct->stime = 0; acct->hardirq_time = 0; -- 2.13.3