From: "Srivatsa S. Bhat" <srivatsa@csail.mit.edu>
To: Will Deacon <will@kernel.org>
Cc: Elliot Berman <quic_eberman@quicinc.com>,
Juergen Gross <jgross@suse.com>,
Alexey Makhalov <amakhalov@vmware.com>,
Catalin Marinas <catalin.marinas@arm.com>,
Prakruthi Deepak Heragu <quic_pheragu@quicinc.com>,
virtualization@lists.linux-foundation.org, x86@kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org,
Murali Nalajala <quic_mnalajal@quicinc.com>
Subject: Re: [PATCH v3] arm64: paravirt: Use RCU read locks to guard stolen_time
Date: Tue, 17 May 2022 09:48:00 -0700 [thread overview]
Message-ID: <1dc10835-e302-8ae7-c256-efb0c420f35a@csail.mit.edu> (raw)
In-Reply-To: <20220517085418.GA3169@willie-the-truck>
On 5/17/22 1:54 AM, Will Deacon wrote:
> On Fri, May 13, 2022 at 04:32:53PM -0700, Srivatsa S. Bhat wrote:
>> On 5/13/22 10:46 AM, Elliot Berman wrote:
>>> From: Prakruthi Deepak Heragu <quic_pheragu@quicinc.com>
>>>
[...]
>>> static int stolen_time_cpu_down_prepare(unsigned int cpu)
>>> {
>>> + struct pvclock_vcpu_stolen_time *kaddr = NULL;
>>> struct pv_time_stolen_time_region *reg;
>>>
>>> reg = this_cpu_ptr(&stolen_time_region);
>>> if (!reg->kaddr)
>>> return 0;
>>>
>>> - memunmap(reg->kaddr);
>>> - memset(reg, 0, sizeof(*reg));
>>> + kaddr = rcu_replace_pointer(reg->kaddr, NULL, true);
>>> + synchronize_rcu();
>>> + memunmap(kaddr);
>>>
>>
>> The original code used to memset the stolen time region, but this
>> patch seems to drop it. Was that change intentional?
>
> 'struct pv_time_stolen_time_region' only has one field ('kaddr'), which
> we're now clearing with rcu_replace_pointer() so the memset doesn't make
> sense.
>
Ah right, never mind :)
Thank you!
Regards,
Srivatsa
next prev parent reply other threads:[~2022-05-17 16:48 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-13 17:46 Elliot Berman
2022-05-13 23:32 ` Srivatsa S. Bhat
2022-05-17 8:54 ` Will Deacon
2022-05-17 16:48 ` Srivatsa S. Bhat [this message]
2022-05-17 14:04 ` Will Deacon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1dc10835-e302-8ae7-c256-efb0c420f35a@csail.mit.edu \
--to=srivatsa@csail.mit.edu \
--cc=amakhalov@vmware.com \
--cc=catalin.marinas@arm.com \
--cc=jgross@suse.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=quic_eberman@quicinc.com \
--cc=quic_mnalajal@quicinc.com \
--cc=quic_pheragu@quicinc.com \
--cc=virtualization@lists.linux-foundation.org \
--cc=will@kernel.org \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®