linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Yauheni Kaliuta <yauheni.kaliuta@redhat.com>
To: Frederic Weisbecker <frederic@kernel.org>
Cc: Luiz Capitulino <lcapitulino@redhat.com>,
	Ingo Molnar <mingo@kernel.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Peter Zijlstra <peterz@infradead.org>,
	Chris Metcalf <cmetcalf@mellanox.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Christoph Lameter <cl@linux.com>,
	"Paul E . McKenney" <paulmck@linux.vnet.ibm.com>,
	Wanpeng Li <kernellwp@gmail.com>, Mike Galbraith <efault@gmx.de>,
	Rik van Riel <riel@surriel.com>
Subject: Re: [GIT PULL] isolation: 1Hz residual tick offloading v4
Date: Tue, 22 May 2018 22:10:19 +0300	[thread overview]
Message-ID: <xunyvabfjylg.fsf@redhat.com> (raw)
In-Reply-To: <20180129011024.GA2942@lerouge> (Frederic Weisbecker's message of "Mon, 29 Jan 2018 02:10:26 +0100")

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

  parent reply	other threads:[~2018-05-22 19:10 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-19  0:02 [GIT PULL] isolation: 1Hz residual tick offloading v4 Frederic Weisbecker
2018-01-19  0:02 ` [PATCH 1/6] sched: Rename init_rq_hrtick to hrtick_rq_init Frederic Weisbecker
2018-01-19  0:02 ` [PATCH 2/6] nohz: Allow to check if remote CPU tick is stopped Frederic Weisbecker
2018-01-19  0:02 ` [PATCH 3/6] sched/isolation: Isolate workqueues when "nohz_full=" is set Frederic Weisbecker
2018-01-19  0:02 ` [PATCH 4/6] sched/isolation: Residual 1Hz scheduler tick offload Frederic Weisbecker
2018-01-29 15:38   ` Peter Zijlstra
2018-01-29 16:48     ` Frederic Weisbecker
2018-01-29 17:20       ` Peter Zijlstra
2018-01-29 15:39   ` Peter Zijlstra
2018-01-19  0:02 ` [PATCH 5/6] sched/nohz: Remove the 1 Hz tick code Frederic Weisbecker
2018-01-19  0:02 ` [PATCH 6/6] sched/isolation: Tick offload documentation Frederic Weisbecker
2018-01-24 15:46 ` [GIT PULL] isolation: 1Hz residual tick offloading v4 Luiz Capitulino
2018-01-29  1:10   ` Frederic Weisbecker
2018-01-29 15:33     ` Luiz Capitulino
2018-01-29 15:54       ` Peter Zijlstra
2018-01-29 16:27         ` Luiz Capitulino
2018-01-29 15:47     ` Peter Zijlstra
2018-05-22 19:10     ` Yauheni Kaliuta [this message]
2018-05-25  2:56       ` Frederic Weisbecker
2018-05-25 12:51         ` Luiz Capitulino
2018-01-29  1:18 ` (Ping?) " Frederic Weisbecker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xunyvabfjylg.fsf@redhat.com \
    --to=yauheni.kaliuta@redhat.com \
    --cc=cl@linux.com \
    --cc=cmetcalf@mellanox.com \
    --cc=efault@gmx.de \
    --cc=frederic@kernel.org \
    --cc=kernellwp@gmail.com \
    --cc=lcapitulino@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=paulmck@linux.vnet.ibm.com \
    --cc=peterz@infradead.org \
    --cc=riel@surriel.com \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).