All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Pavel V. Panteleev" <panteleev_p@mcst.ru>
To: linux-kernel@vger.kernel.org
Cc: mingo@redhat.com, peterz@infradead.org, zhaolei@cn.fujitsu.com
Subject: [sched/core] cpuacct_charge() problem
Date: Thu, 9 Nov 2017 17:51:59 +0300	[thread overview]
Message-ID: <5A046B8F.3060302@mcst.ru> (raw)

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;

                 reply	other threads:[~2017-11-09 14:52 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=5A046B8F.3060302@mcst.ru \
    --to=panteleev_p@mcst.ru \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=zhaolei@cn.fujitsu.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.