[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2306e1b324c135d7d2bf961202657031d02ad4b0.camel@amazon.com>
Date: Wed, 6 Nov 2024 17:06:53 +0000
From: "Okanovic, Haris" <harisokn@...zon.com>
To: "cl@...two.org" <cl@...two.org>
CC: "kvm@...r.kernel.org" <kvm@...r.kernel.org>, "rafael@...nel.org"
<rafael@...nel.org>, "sudeep.holla@....com" <sudeep.holla@....com>,
"boris.ostrovsky@...cle.com" <boris.ostrovsky@...cle.com>,
"ankur.a.arora@...cle.com" <ankur.a.arora@...cle.com>,
"dave.hansen@...ux.intel.com" <dave.hansen@...ux.intel.com>,
"konrad.wilk@...cle.com" <konrad.wilk@...cle.com>, "wanpengli@...cent.com"
<wanpengli@...cent.com>, "joao.m.martins@...cle.com"
<joao.m.martins@...cle.com>, "linux-kernel@...r.kernel.org"
<linux-kernel@...r.kernel.org>, "catalin.marinas@....com"
<catalin.marinas@....com>, "mingo@...hat.com" <mingo@...hat.com>,
"pbonzini@...hat.com" <pbonzini@...hat.com>, "tglx@...utronix.de"
<tglx@...utronix.de>, "misono.tomohiro@...itsu.com"
<misono.tomohiro@...itsu.com>, "daniel.lezcano@...aro.org"
<daniel.lezcano@...aro.org>, "arnd@...db.de" <arnd@...db.de>,
"lenb@...nel.org" <lenb@...nel.org>, "will@...nel.org" <will@...nel.org>,
"hpa@...or.com" <hpa@...or.com>, "peterz@...radead.org"
<peterz@...radead.org>, "maobibo@...ngson.cn" <maobibo@...ngson.cn>,
"vkuznets@...hat.com" <vkuznets@...hat.com>,
"linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>, "Okanovic, Haris"
<harisokn@...zon.com>, "linux-pm@...r.kernel.org" <linux-pm@...r.kernel.org>,
"bp@...en8.de" <bp@...en8.de>, "mtosatti@...hat.com" <mtosatti@...hat.com>,
"x86@...nel.org" <x86@...nel.org>, "mark.rutland@....com"
<mark.rutland@....com>
Subject: Re: [PATCH 1/5] asm-generic: add smp_vcond_load_relaxed()
On Tue, 2024-11-05 at 11:36 -0800, Christoph Lameter (Ampere) wrote:
> CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you can confirm the sender and know the content is safe.
>
>
>
> On Tue, 5 Nov 2024, Haris Okanovic wrote:
>
> > +/**
> > + * smp_vcond_load_relaxed() - (Spin) wait until an expected value at address
> > + * with no ordering guarantees. Spins until `(*addr & mask) == val` or
> > + * `nsecs` elapse, and returns the last observed `*addr` value.
> > + *
> > + * @nsecs: timeout in nanoseconds
>
> Please use an absolute time in nsecs instead of a timeout.
I went with relative time because it clock agnostic. I agree deadline
is nicer because it can propagate down layers of functions, but it pins
the caller to single time base.
> You do not know
> what will happen to your execution thread until the local_clock_noinstr()
> is run.
Not sure what you mean. Could you perhaps give an example where it
would break?
>
>
One alternative is to do timekeeping with delay() in all cases, to
decouple from sched/clock.
Powered by blists - more mailing lists