Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp1960304imm; Tue, 22 May 2018 12:12:36 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpKTCqdsS7R+jXkxiBD+7bTsZyygxKevEXJdlCtPRKmZywq9hJeHCHI33NkXRrcP8UIZu9D X-Received: by 2002:a62:ccdc:: with SMTP id j89-v6mr25842555pfk.182.1527016356471; Tue, 22 May 2018 12:12:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527016356; cv=none; d=google.com; s=arc-20160816; b=MkW7v8arNu0QaSN6rASJCSDUt+mibnLLvinf6nqxkNh29oCvCe5rvCAyRVvwpPIQMf Ahlc/syaOr952JBWcQdVuZ97H4DiKxQBlf+YnUf/hDaWGCYu0y7HbEzW7RjqLXYSXAq+ fblKsRI7cqWuWPlUJylkJwiYksPIb3GZZhVV5hzWn8QBbH2FmwXlnmJcOIbw2/oLG7xH xTqBhsj+En24d7LJ2xIYPVCMqtZq2iMtIlqEcgogCVEHkXmkytVP7Dj0ZrMrg09qyxIJ FllEdRS/cjdBCLEWkKgaxDMIUca3VdHArHbKQ5ZCXGJmN1gZH187WyIVIxeXZbnlJVb1 geWw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:in-reply-to:date :references:subject:cc:to:from:arc-authentication-results; bh=k7mFl9HN/cw3TZShtdghthCThah/NsLmeacVFS4jIHY=; b=xvmQGtLNgL0fwQjBM5JelU6LRR8lLyo5nu+QjodcbcoZfXmGrq3MMFcM2E6+GirRCZ fwhi4xPMljeCSV3EnOLuHZiuTRO3iUJkRz/IASa79zuVe3kY/ta37aUFQngbQ6+A4HPs eCqod8HDLUBWIKb/TWBueC5FNB/r4cjqpFQrBX4/3UqUsWJcDIN7I4YolAJwJgNXsbNK y8Na2ceLbGf/2k0+vUW0uBepYPYRcEybVqB8//n50BLrSgxm6xac1sA5lj6FwXDiAWBG QjVN6tyEBVeb3guUMgCP9b5hWWcU74ocQSV9MJC+EHNvzSUXEu1FS1eK5DRw+Z98dKfw j8WA== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o19-v6si17262676pll.447.2018.05.22.12.12.16; Tue, 22 May 2018 12:12:36 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752208AbeEVTK1 (ORCPT + 99 others); Tue, 22 May 2018 15:10:27 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:54178 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751533AbeEVTK0 (ORCPT ); Tue, 22 May 2018 15:10:26 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 19F25401EF08; Tue, 22 May 2018 19:10:26 +0000 (UTC) Received: from astarta.redhat.com (ovpn-117-101.ams2.redhat.com [10.36.117.101]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 6BB48111DD04; Tue, 22 May 2018 19:10:20 +0000 (UTC) From: Yauheni Kaliuta To: Frederic Weisbecker Cc: Luiz Capitulino , Ingo Molnar , LKML , Peter Zijlstra , Chris Metcalf , Thomas Gleixner , Christoph Lameter , "Paul E . McKenney" , Wanpeng Li , Mike Galbraith , Rik van Riel Subject: Re: [GIT PULL] isolation: 1Hz residual tick offloading v4 References: <1516320140-13189-1-git-send-email-frederic@kernel.org> <20180124104608.038fb212@redhat.com> <20180129011024.GA2942@lerouge> Date: Tue, 22 May 2018 22:10:19 +0300 In-Reply-To: <20180129011024.GA2942@lerouge> (Frederic Weisbecker's message of "Mon, 29 Jan 2018 02:10:26 +0100") Message-ID: MIME-Version: 1.0 Content-Type: text/plain X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.5]); Tue, 22 May 2018 19:10:26 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.5]); Tue, 22 May 2018 19:10:26 +0000 (UTC) for IP:'10.11.54.3' DOMAIN:'int-mx03.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'yauheni.kaliuta@redhat.com' RCPT:'' Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, Frederic! >>>>> On Mon, 29 Jan 2018 02:10:26 +0100, Frederic Weisbecker wrote: > On Wed, Jan 24, 2018 at 10:46:08AM -0500, Luiz Capitulino wrote: [...] >> Since the 1Hz tick offload worked for you, I must be missing >> a way to disable this timer or the kernel is thinking my CPU >> has unstable TSC (which it doesn't AFAIK). > It's beyond the scope of this patchset but indeed that's > right, I run my kernels with tsc=reliable because my CPUs > don't have the TSC_RELIABLE flag. That's the only way I found > to shutdown the tick completely on my test machine, otherwise > I keep having that clocksource watchdog. [...] Thanks, it helps. But I have accounting problem: if I run user busy loop on the nohz cpu, the task accounting works correctly (top shows the task takes 100% cpu), but cpu accounting is wrong (cpu is 100% idle, in the per-core view as well). If I understand correctly, the stats are updated by account_user_time() -> task_group_account_field() but there is no call for it in case of offloading (it is called from irqtime_account_process_tick, account_process_tick, vtime_user_exit). Moreover, task_group_account_field() uses __this_cpu_add() which will be wrong for offloading. For testing I used kcpustat_cpu(task_cpu(p)) in task_group_account_field() and added call account_user_time(curr, delta) to the sched_tick_remote() what fixes it for me, but what would be the proper fix? -- WBR, Yauheni Kaliuta