[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <07f7beec-2837-6bc1-eb24-db84462e035f@huawei.com>
Date: Tue, 27 Dec 2022 15:16:31 +0800
From: "Leizhen (ThunderTown)" <thunder.leizhen@...wei.com>
To: Petr Mladek <pmladek@...e.com>
CC: Christophe Leroy <christophe.leroy@...roup.eu>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Luis Chamberlain <mcgrof@...nel.org>,
"linux-modules@...r.kernel.org" <linux-modules@...r.kernel.org>,
Anders Roxell <anders.roxell@...aro.org>
Subject: Re: [PATCH] kallsyms: Fix sleeping function called from invalid
context when CONFIG_KALLSYMS_SELFTEST=y
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
Powered by blists - more mailing lists