![]() ![]() > Frederic, didn't we have remote ticks that should help with this stuff? > to care about that aspect of things, but it does suck for nohz_full. > There's a note about syscall performance there, so clearly someone seems > isn't part of the threadgroup and/or another task is on a nohz_full cpu, > it doesn't call it unconditionally, nor on all tasks, so if current ![]() > but that's also susceptible to a variant of this very same issue since > Looking at thread_group_cputime() that already does something like this, > it does make the call significantly more expensive. > Something like the below ought to work and fix all variants I think. > It also doesn't help any of the other callers, like for example procfs. > Would be superfluous for CONFIG_VIRT_CPU_ACCOUNTING_NATIVE=y > Is there any possible problem with this? > task_cputime_adjusted(current, &utime, &stime) > void getrusage(struct task_struct *p, int who, struct rusage *r) I'm thinking of the following improvement. > just before getting the information from 'current' (as in other processes > Therefore, I think I should include a process to update se.sum_exec_runtime > CPU, sum_exec_runtime is not updated periodically, so there seems to be a > sum of utime and stime to be equal to cputime.sum_exec_runtime. > get the 'current' utime and stime, then calls cputime_adjust() to adjust the > In the current implementation, task_cputime_adjusted() calls task_cputime() to > updated just before getting the information from 'current'. > This problem seems to be caused by the fact that se.sum_exec_runtime is not > getrusage(RUSAGE_SELF) on a single thread. > the utime and stime I get are less than the actual time, unlike when I run > I found that when I run getrusage(RUSAGE_THREAD) on a tickless CPU, > Thank you, Peter, for pointing this out. On Wed, at 11:24:58AM +0200, Peter Zijlstra wrote:
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |