From: "Leizhen (ThunderTown)" <thunder.leizhen@huawei.com>
To: Petr Mladek <pmladek@suse.com>
Cc: Christophe Leroy <christophe.leroy@csgroup.eu>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Luis Chamberlain <mcgrof@kernel.org>,
"linux-modules@vger.kernel.org" <linux-modules@vger.kernel.org>,
Anders Roxell <anders.roxell@linaro.org>
Subject: Re: [PATCH] kallsyms: Fix sleeping function called from invalid context when CONFIG_KALLSYMS_SELFTEST=y
Date: Tue, 27 Dec 2022 15:16:31 +0800 [thread overview]
Message-ID: <07f7beec-2837-6bc1-eb24-db84462e035f@huawei.com> (raw)
In-Reply-To: <1f7c8542-ff47-106b-f651-71c1d555b027@huawei.com>
On 2022/12/21 20:37, Leizhen (ThunderTown) wrote:
>>>> I am not familiar with it. But task_cputime() in
>>>> kernel/sched/cputime.c looks promising. And there must be
>>>> the interface how the user space get this information.
>>>> Some is available via /proc/<PID>/... I am not sure
>>>> if there is a syscall.
>> Please, try to investigate the above hints.
> Yes, I will. Thanks.
Function task_cputime() works well when CONFIG_VIRT_CPU_ACCOUNTING_GEN=y,
but not when CONFIG_TICK_CPU_ACCOUNTING=y. The latter seems to be based on
tick interrupt sampling, rather than recording timestamps during task switches.
>
--
Regards,
Zhen Lei
prev parent reply other threads:[~2022-12-27 7:16 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-20 6:39 Zhen Lei
2022-12-20 8:15 ` Christophe Leroy
2022-12-20 11:01 ` Petr Mladek
2022-12-20 14:29 ` Leizhen (ThunderTown)
2022-12-20 15:43 ` Petr Mladek
2022-12-21 12:37 ` Leizhen (ThunderTown)
2022-12-27 7:16 ` Leizhen (ThunderTown) [this message]
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=07f7beec-2837-6bc1-eb24-db84462e035f@huawei.com \
--to=thunder.leizhen@huawei.com \
--cc=anders.roxell@linaro.org \
--cc=christophe.leroy@csgroup.eu \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-modules@vger.kernel.org \
--cc=mcgrof@kernel.org \
--cc=pmladek@suse.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®