Re: [PATCH 1/6] sched/cputime: Support other fields on kcpustat_field()
From: Peter Zijlstra
Date: Wed Nov 20 2019 - 16:05:24 EST
On Wed, Nov 20, 2019 at 12:51:42PM +0100, Ingo Molnar wrote:
> * Frederic Weisbecker <frederic@xxxxxxxxxx> wrote:
> > + /*
> > + * Nice VS unnice cputime accounting may be inaccurate if
> > + * the nice value has changed since the last vtime update.
> > + * But proper fix would involve interrupting target on nice
> > + * updates which is a no go on nohz_full.
>
> Well, we actually already interrupt the target in both sys_nice() and
> sys_setpriority() etc. syscall variants: we call set_user_nice() which
> calls resched_curr() and the task is sent an IPI and runs through a
> reschedule.
I think we can easily avoid doing that IPI when we find it is the only
task on that runqueue. Which is exactly the case for NOHZ_FULL.