[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.21.1902102159070.8784@nanos.tec.linutronix.de>
Date: Sun, 10 Feb 2019 22:08:53 +0100 (CET)
From: Thomas Gleixner <tglx@...utronix.de>
To: Zhenzhong Duan <zhenzhong.duan@...cle.com>
cc: linux-kernel@...r.kernel.org, x86@...nel.org,
Daniel Lezcano <daniel.lezcano@...aro.org>,
Waiman Long <longman@...hat.com>,
Srinivas Eeda <srinivas.eeda@...cle.com>, kin.cho@...cle.com
Subject: Re: [PATCH] acpi_pm: Reduce PMTMR counter read contention
On Sat, 2 Feb 2019, Zhenzhong Duan wrote:
> On 2019/1/31 22:26, Thomas Gleixner wrote:
> > > > I'm not against the change per se, but I really want to understand
> > > > why we need all the complexity for something which should never be
> > > > used in a real world deployment.
> > > >
> > > Hmm, it's a strong word of "never be used". Customers may happen to
> > > use nohpet(sanity test?) and report bug to us. Sometimes they does
> > > report a bug that reproduce with their customed config. There may
> > > also be BIOS setting HPET disabled.
> >
> > And because the customer MAY do completely nonsensical things (and there
> > are a lot more than the HPET) the kernel has to handle all of them?
>
> Ok, then. I don't have more suggestion to convince you.
You give up too fast :)
The point is, that we really want proper justifications for changes like
this. Some 'may, could and more handwaving' simply does not cut it.
So if you can just describe a realistic scenario, which does not involve
thoughtless flipping of BIOS options, then this becomes way more palatable.
> I just think of a simple fix as below. I think it will work for both hpet
> and pmtmr. We will test it when the env is available.
> --- a/kernel/time/timekeeping.c
> +++ b/kernel/time/timekeeping.c
> @@ -1353,6 +1353,7 @@ static int change_clocksource(void *data)
>
> write_seqcount_end(&tk_core.seq);
> raw_spin_unlock_irqrestore(&timekeeper_lock, flags);
> + tick_clock_notify();
>
> return 0;
> }
> @@ -1371,7 +1372,6 @@ int timekeeping_notify(struct clocksource *clock)
> if (tk->tkr_mono.clock == clock)
> return 0;
> stop_machine(change_clocksource, clock, NULL);
> - tick_clock_notify();
> return tk->tkr_mono.clock == clock ? 0 : -1;
> }
This won't resolve the concurrency issues of HPET or PMTIMER in any
way. Instead it breaks the careful orchestrated mechanism of clocksource
change.
Thanks,
tglx
Powered by blists - more mailing lists