[<prev] [next>] [day] [month] [year] [list]
Message-ID: <5A046B8F.3060302@mcst.ru>
Date: Thu, 9 Nov 2017 17:51:59 +0300
From: "Pavel V. Panteleev" <panteleev_p@...t.ru>
To: linux-kernel@...r.kernel.org
Cc: mingo@...hat.com, peterz@...radead.org, zhaolei@...fujitsu.com
Subject: [sched/core] cpuacct_charge() problem
Hello!
task_pt_regs() always show on the user regs for user thread, even if
it's working in kernel mode now. So, index calculation in
cpuacct_charge() isn't correct and it's always CPUACCT_STAT_USER for
user thread. The time, spent in kernel mode for user task, will be lost:
int index = CPUACCT_STAT_SYSTEM;
struct pt_regs *regs = task_pt_regs(tsk);
if (regs && user_mode(regs))
index = CPUACCT_STAT_USER;
Powered by blists - more mailing lists