Re: [patch V2 37/38] posix-cpu-timers: Move state tracking to struct posix_cputimers
From: Thomas Gleixner
Date: Mon Aug 26 2019 - 19:33:24 EST
On Tue, 27 Aug 2019, Frederic Weisbecker wrote:
> On Wed, Aug 21, 2019 at 09:09:24PM +0200, Thomas Gleixner wrote:
> > Put it where it belongs and clean up the ifdeffery in fork completely.
> >
> > Signed-off-by: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
> > ---
> > V2: Adopt to the per clock base struct
> > ---
> > include/linux/posix-timers.h | 8 ++++
> > include/linux/sched/cputime.h | 9 +++--
> > include/linux/sched/signal.h | 6 ---
> > init/init_task.c | 2 -
> > kernel/fork.c | 6 ---
> > kernel/time/posix-cpu-timers.c | 73 ++++++++++++++++++++++-------------------
> > 6 files changed, 54 insertions(+), 50 deletions(-)
> >
> > --- a/include/linux/posix-timers.h
> > +++ b/include/linux/posix-timers.h
> > @@ -77,15 +77,23 @@ struct posix_cputimer_base {
> > /**
> > * posix_cputimers - Container for posix CPU timer related data
> > * @bases: Base container for posix CPU clocks
> > + * @timers_active: Timers are queued.
> > + * @expiry_active: Timer expiry is active. Used for
> > + * process wide timers to avoid multiple
> > + * task trying to handle expiry concurrently
>
> So those two fields are also added to struct task_struct but unused there,
> right?
Yes. I did not come up with a smart way to avoid that, but lemme think
about it some more.
Thanks,
tglx