Hi Zhangfei,
On Fri, Mar 26, 2021 at 12:35:49PM +0000, Zhangfei Gao via Linaro-open-discussions wrote:
> Hi,
>
> I am looking for some suggestions about dvm [1].
>
> we are testing sva with openssl, and dvm is enabled by default to broadcast
> TLB maintenance.
> And thp is enabled in system by default, a daemon khugepaged
> (mm/khugepaged.c) is running
> to collapse memory to huge page in a period of time.
>
> And we found thp: khugepaged may cause issue to sva test case.
> https://github.com/Linaro/uadk/issues/215
>
> Two cases:
> 1. Heavy weight test case, async mode, 36+ jobs.
> openssl speed -elapsed -engine uadk -async_jobs 36 rsa2048
>
> Once collapse_huge_page happens.
> hardware may hung in io page fault, there maybe huge numbers of page fault
> keeps happening,
> while usually only several io page fault reported.
>
> 2. With high thp scan frequence, low weight test case, sync mode, 1 job.
> data may not correct.
> sudo openssl speed -engine uadk -seconds 1 rsa2048
> Doing 2048 bits public rsa's for 1s: RSA verify failure
>
> Two workarounds:
> 1. disable thp
> echo never > /sys/kernel/mm/transparent_hugepage/enabled
>
> 2. enable thp but add tlbi and ignore dvm.
> Adding arm_smmu_tlb_inv_range in arm-smmu-v3-sva.c:
> arm_smmu_mm_invalidate_range.
> It is called by khugepaged: collapse_huge_page->
> mmu_notifier_invalidate_range_end
>
>
> Looks dvm is not taking effect in some corner cases.
>
> Questions
> 1. if khugepaged collapse the memory used by device, and then change tlb,
> can dvm sync this tlb change to smmu.
>
> 2. Any possible dma is just using the memory, and collapsed by khugepaged,
> can dvm handle this case?
> Or khugepaged should not touch memory using by device, looks khugepaged
> can not distinguish.
I think hugepage is juste one symptom, and may not be the only way to
trigger the issue. On khugepaged collapse, a large invalidation is issued
which arch/arm64/include/asm/tlbflush.h transforms into a TLBI-by-ASID:
if ((!system_supports_tlb_range() &&
(end - start) >= (MAX_TLBI_OPS * stride)) ||
pages >= MAX_TLBI_RANGE_PAGES) {
flush_tlb_mm(vma->vm_mm);
return;
}
With MAX_TLBI_OPS = 512 and stride = 0x1000 we hit the size limit of 2M,
which is the size of a hugepage. My guess is that on khugepage collapse we
issue a TLBI ASIDE1IS (rather than a TLBI VALE1IS), somehow that isn't
taken into account by the SMMU, and we end up with stale TLB entries
leading to memory corruption. If that's the case, I'd suggest keeping DVM
disabled on this platform (workaround 2), to force all SVA invalidation to
go through the command queue.
Thanks,
Jean
Hi,
I am looking for some suggestions about dvm [1].
we are testing sva with openssl, and dvm is enabled by default to
broadcast TLB maintenance.
And thp is enabled in system by default, a daemon khugepaged
(mm/khugepaged.c) is running
to collapse memory to huge page in a period of time.
And we found thp: khugepaged may cause issue to sva test case.
https://github.com/Linaro/uadk/issues/215
Two cases:
1. Heavy weight test case, async mode, 36+ jobs.
openssl speed -elapsed -engine uadk -async_jobs 36 rsa2048
Once collapse_huge_page happens.
hardware may hung in io page fault, there maybe huge numbers of page
fault keeps happening,
while usually only several io page fault reported.
2. With high thp scan frequence, low weight test case, sync mode, 1 job.
data may not correct.
sudo openssl speed -engine uadk -seconds 1 rsa2048
Doing 2048 bits public rsa's for 1s: RSA verify failure
Two workarounds:
1. disable thp
echo never > /sys/kernel/mm/transparent_hugepage/enabled
2. enable thp but add tlbi and ignore dvm.
Adding arm_smmu_tlb_inv_range in arm-smmu-v3-sva.c:
arm_smmu_mm_invalidate_range.
It is called by khugepaged: collapse_huge_page->
mmu_notifier_invalidate_range_end
Looks dvm is not taking effect in some corner cases.
Questions
1. if khugepaged collapse the memory used by device, and then change
tlb, can dvm sync this tlb change to smmu.
2. Any possible dma is just using the memory, and collapsed by
khugepaged, can dvm handle this case?
Or khugepaged should not touch memory using by device, looks
khugepaged can not distinguish.
[1] DVM
Distributed Virtual Memory, a protocol for interconnect messages to provide
broadcast TLB maintenance operations (among other things).
Thanks
On Thu, 18 Mar 2021 at 15:39, Jammy Zhou via Linaro-open-discussions
<linaro-open-discussions(a)op-lists.linaro.org> wrote:
>
> Hmm, it looks like I forgot to add one event in the calendar. It has been
> added by Vincent just a moment ago. Thanks!
Yeah, I noticed that the meeting didn't appear in the agenda so I
figured out to add it
>
> On Thu, 18 Mar 2021 at 22:11, Jonathan Cameron <jonathan.cameron(a)huawei.com>
> wrote:
>
> > Ah, I'd missed that as not in the calendar at the bottom of the page yet.
> >
> > That works fine for me.
> >
> > Jonathan
> >
> > -----Original Message-----
> > From: Lorenzo Pieralisi [mailto:lorenzo.pieralisi@arm.com]
> > Sent: 18 March 2021 12:28
> > To: Jonathan Cameron <jonathan.cameron(a)huawei.com>
> > Cc: Lorenzo Pieralisi via Linaro-open-discussions <
> > linaro-open-discussions(a)op-lists.linaro.org>; Jammy Zhou <
> > jammy.zhou(a)linaro.org>; Jon Masters <jcm(a)jonmasters.org>
> > Subject: Re: [Linaro-open-discussions] LOD meeting agenda for March 22nd
> >
> > On Wed, Mar 17, 2021 at 05:17:05PM +0000, Jonathan Cameron wrote:
> >
> > [...]
> >
> > > > I would also take this opportunity to get your (and Salil's)
> > > > feedback on the virtual CPU hotplug implementation with PSCI if you
> > > > had time to think about what we discussed last time.
> > >
> > > That should be fine to talk about / keep up momentum on.
> > >
> > > Have we actually picked a time slot?
> > >
> > > I have a strangely empty day on Monday, so feel free to suggest one.
> > > As Jon hasn't replied, lets go for a time that isn't too unpleasant
> > > for those based in China.
> >
> > I am happy to keep schedule as advertised in:
> >
> > https://collaborate.linaro.org/display/LOD/Linaro+Open+Discussions+Home
> >
> > namely 10AM GMT. Is it fine for everyone ?
> >
> > Thanks,
> > Lorenzo
> >
> --
> Linaro-open-discussions mailing list
> https://collaborate.linaro.org/display/LOD/Linaro+Open+Discussions+Home
> https://op-lists.linaro.org/mailman/listinfo/linaro-open-discussions
On Mon, Mar 15, 2021 at 01:00:19AM +0000, Jammy Zhou via Linaro-open-discussions wrote:
> Hi all,
>
> We're going to have the LOD meeting in one week, currently we don't
> have any topic proposed yet. Please let me know if you have something
> to discuss.
I would be glad to have a follow-up with Jonathan on CXL expansion memory
on arm64 if possible, hopefully I can read up in the meanwhile to get up
to speed on the matter.
Lorenzo
Hi all,
We're going to have the LOD meeting in one week, currently we don't have
any topic proposed yet. Please let me know if you have something to discuss.
Regards,
Jammy
Hi All,
We're going to have the next meeting for Linux kernel discussion on Feb
22nd. This time we have two major topics below:
- Update for ACPI based Virtual CPU Hotplug - Lorenzo/Salil
- CXL overview and sync up - Lorenzo/Jon/Jonathan
As usual, it will be helpful to prepare several slides for each topic by
the owners.
By the way, we're planning to get the meeting recorded in the future,
please let us know if you have any concerns.
*Meeting details:*
Date&Time: Monday, 22 February 2:00pm – 3:00pm GMT
Join Zoom Meeting
https://linaro-org.zoom.us/j/95268923753
Meeting ID:952 6892 3753
One tap mobile
+16465588656,,4417312160# US (New York)
+16699009128,,4417312160# US (San Jose)
Dial by your location
+1 646 558 8656 US (New York)
+1 669 900 9128 US (San Jose)
+1 253 215 8782 US (Tacoma)
+1 301 715 8592 US (Washington D.C)
+1 312 626 6799 US (Chicago)
+1 346 248 7799 US (Houston)
877 853 5247 US Toll-free
888 788 0099 US Toll-free
Meeting ID: 441 731 2160
Find your local number: https://linaro-org.zoom.us/u/acqrJhJKGC
Regards,
Jammy
[+]
> -----Original Message-----
> From: Linaro-open-discussions
> [mailto:linaro-open-discussions-bounces@op-lists.linaro.org] On Behalf Of
> Jonathan Cameron via Linaro-open-discussions
> Sent: 19 February 2021 15:13
> To: Lorenzo Pieralisi <lorenzo.pieralisi(a)arm.com>
> Cc: linaro-open-discussions(a)op-lists.linaro.org
> Subject: Re: [Linaro-open-discussions] ACPI based Virtual CPU Hotplug (possible
> specification) Follow-up - Suggested Agenda / timings for Monday 7 Dec call
>
> On Fri, 19 Feb 2021 14:07:04 +0000
> Lorenzo Pieralisi <lorenzo.pieralisi(a)arm.com> wrote:
>
> > On Wed, Feb 03, 2021 at 05:27:03PM +0000, Salil Mehta wrote:
> >
> > [...]
> >
> > > > > Many thanks for that.
> > > > >
> > > > > A humble request, if updates are something which might not change
> much
> > > > > between now and 22nd Feb, would it be possible to have a very short
> meeting
> > > > > scheduled before 10th February for just virtual CPU Hotplug(this might
> > > > > really help some of our colleagues in HQ)?
> > > > >
> > > > >
> > > > > Many thanks :)
> > > >
> > > > I really can't myself before Feb 10th, sorry about that. By Feb 22nd I
> > > > should have a clearer picture since it takes some time to weigh up all
> > > > pros and cons.
> > >
> > >
> > > Okay. No problem. I understand. Meanwhile, if you need any inputs from me
> > > please do let me know.
> >
> > I understand there is little time but is it possible to invite
> > kubernetes/containers people who got involved in the kernel threads to
> > the call ?
> >
> > Happy to talk to them either on Monday in the call or later as a
> > follow-up.
> >
> > Thanks,
> > Lorenzo
>
> Hi Lorenzo,
>
> Unfortunately Salil is out today, and I'm afraid I don't have the contact
> details / don't know who to invite. So probably best we can do is to have
> a follow up at some point.
>
Ok. I am going to give it a shot based on my past interactions/involvement in this :)
Hi Folks,
(Sorry if you are not interested in this topic anymore, but you
are added to this thread based on my previous interactions and
the "CPU hotplug for AArch64" discussion here,
https://github.com/kata-containers/agent/issues/764
)
Following the KVM presentation, "Challenges in Supporting Virtual
CPU Hotplug n SoC Based Systems (like ARM64)"[1] by Salil Mehta,
there is a linaro-open-discussion[2] call setup on Monday, 22
February 2:00pm – 3:00pm GMT with ARM technical team
to find out ways to take this forward.
We would like to get some input from the Container/Kubernetes experts
on this as well. I know it is a bit late but please join if you can. Otherwise,
maybe we can plan to have a follow-up call at your convenience.
Please feel free to forward to anyone involved in this topic.
The call details can be find below or from [2].
Thanks,
Shameer
[1]. https://kvmforum2020.sched.com/event/eE4m/challenges-in-supporting-virtual-…
[2] https://collaborate.linaro.org/display/LOD/Linaro+Open+Discussions+Home
Call Details
----------------
Monday, 22 February 2:00pm – 3:00pm GMT
Join Zoom Meeting
https://linaro-org.zoom.us/j/95268923753
Meeting ID:952 6892 3753
One tap mobile
+16465588656,,4417312160# US (New York)
+16699009128,,4417312160# US (San Jose)
Dial by your location
+1 646 558 8656 US (New York)
+1 669 900 9128 US (San Jose)
+1 253 215 8782 US (Tacoma)
+1 301 715 8592 US (Washington D.C)
+1 312 626 6799 US (Chicago)
+1 346 248 7799 US (Houston)
877 853 5247 US Toll-free
888 788 0099 US Toll-free
Meeting ID: 441 731 2160
Find your local number: https://linaro-org.zoom.us/u/acqrJhJKGC
> From: Linaro-open-discussions
> [mailto:linaro-open-discussions-bounces@op-lists.linaro.org] On Behalf Of
> Lorenzo Pieralisi via Linaro-open-discussions
> Sent: Thursday, January 7, 2021 10:55 AM
> To: Jonathan Cameron <jonathan.cameron(a)huawei.com>
> Cc: Mike Holmes via Linaro-open-discussions
> <linaro-open-discussions(a)op-lists.linaro.org>
> Subject: Re: [Linaro-open-discussions] Suggested Agenda / timings for Monday
> 7 Dec call
>
> On Wed, Dec 09, 2020 at 09:14:46AM +0000, Jonathan Cameron via
> Linaro-open-discussions wrote:
> > On Wed, 9 Dec 2020 08:35:57 +0000
> > Mike Holmes via Linaro-open-discussions
> <linaro-open-discussions(a)op-lists.linaro.org> wrote:
> >
> > > On Wed, Dec 9, 2020 at 8:19 AM Vincent Guittot via Linaro-open-discussions
> <
> > > linaro-open-discussions(a)op-lists.linaro.org> wrote:
> > >
> > > > On Tue, 8 Dec 2020 at 18:02, Lorenzo Pieralisi via
> > > > Linaro-open-discussions <linaro-open-discussions(a)op-lists.linaro.org>
> > > > wrote:
> > > > >
> > > > > On Thu, Dec 03, 2020 at 01:40:55PM +0000, Jonathan Cameron wrote:
> > > > > >
> > > > > > Hi All,
> > > > > >
> > > > > > The previous thread has gotten rather convoluted, so I'm going to have
> > > > a go at extracting
> > > > > > a brief summary of topics and suggesting some straw man timings.
> > > > > > These are all discussion topics, so name just indicates who I think
> > > > will do the intro.
> > > > > > Note I'd suggest we keep fairly tightly to timings and if it looks
> > > > like a particular
> > > > > > conversation is going long, we schedule a follow up.
> > > > >
> > > > > Hi Jonathan, all,
> > > > >
> > > > > thanks for the sync-up yesterday, I have already started following up
> > > > > on some topics (ACPI CPU hotplug).
Hi Lorenzo,
As a follow-up to our last meeting, do we have any updates from your internal
discussions in regards to the support of ACPI based Virtual CPU Hotplug or its
"possible" specification? :)
Many thanks
Salil
On Wed, Feb 03, 2021 at 01:30:33AM +0000, Jammy Zhou via Linaro-open-discussions wrote:
> I have added these two topics to the agenda for meeting on Feb 22nd.
We should probably move it to an afternoon slot GMT otherwise I don't
think anyone in the US can attend (I know that an afternoon slot GMT
is problematic for people in Asia, don't know how to solve this,
please let me know).
Thanks,
Lorenzo
> On Wed, 3 Feb 2021 at 03:25, Jonathan Cameron via Linaro-open-discussions <
> linaro-open-discussions(a)op-lists.linaro.org> wrote:
>
> > On Tue, 2 Feb 2021 17:18:28 +0000
> > Jon Masters via Linaro-open-discussions <
> > linaro-open-discussions(a)op-lists.linaro.org> wrote:
> >
> > > +1 to the CXL discussion
> > >
> > > On Tue, Feb 2, 2021 at 12:14 PM Lorenzo Pieralisi via
> > > Linaro-open-discussions <linaro-open-discussions(a)op-lists.linaro.org>
> > wrote:
> > >
> > > > On Tue, Feb 02, 2021 at 08:43:39AM +0000, Salil Mehta wrote:
> > > > >
> > > > > > From: Linaro-open-discussions
> > > > > > [mailto:linaro-open-discussions-bounces@op-lists.linaro.org] On
> > > > Behalf Of
> > > > > > Lorenzo Pieralisi via Linaro-open-discussions
> > > > > > Sent: Thursday, January 7, 2021 10:55 AM
> > > > > > To: Jonathan Cameron <jonathan.cameron(a)huawei.com>
> > > > > > Cc: Mike Holmes via Linaro-open-discussions
> > > > > > <linaro-open-discussions(a)op-lists.linaro.org>
> > > > > > Subject: Re: [Linaro-open-discussions] Suggested Agenda / timings
> > for
> > > > Monday
> > > > > > 7 Dec call
> > > > > >
> > > > > > On Wed, Dec 09, 2020 at 09:14:46AM +0000, Jonathan Cameron via
> > > > > > Linaro-open-discussions wrote:
> > > > > > > On Wed, 9 Dec 2020 08:35:57 +0000
> > > > > > > Mike Holmes via Linaro-open-discussions
> > > > > > <linaro-open-discussions(a)op-lists.linaro.org> wrote:
> > > > > > >
> > > > > > > > On Wed, Dec 9, 2020 at 8:19 AM Vincent Guittot via
> > > > Linaro-open-discussions
> > > > > > <
> > > > > > > > linaro-open-discussions(a)op-lists.linaro.org> wrote:
> > > > > > > >
> > > > > > > > > On Tue, 8 Dec 2020 at 18:02, Lorenzo Pieralisi via
> > > > > > > > > Linaro-open-discussions <
> > > > linaro-open-discussions(a)op-lists.linaro.org>
> > > > > > > > > wrote:
> > > > > > > > > >
> > > > > > > > > > On Thu, Dec 03, 2020 at 01:40:55PM +0000, Jonathan
> > Cameron
> > > > wrote:
> > > > > > > > > > >
> > > > > > > > > > > Hi All,
> > > > > > > > > > >
> > > > > > > > > > > The previous thread has gotten rather convoluted, so
> > I'm
> > > > going to have
> > > > > > > > > a go at extracting
> > > > > > > > > > > a brief summary of topics and suggesting some straw man
> > > > timings.
> > > > > > > > > > > These are all discussion topics, so name just indicates
> > who
> > > > I think
> > > > > > > > > will do the intro.
> > > > > > > > > > > Note I'd suggest we keep fairly tightly to timings and
> > if it
> > > > looks
> > > > > > > > > like a particular
> > > > > > > > > > > conversation is going long, we schedule a follow up.
> > > > > > > > > >
> > > > > > > > > > Hi Jonathan, all,
> > > > > > > > > >
> > > > > > > > > > thanks for the sync-up yesterday, I have already started
> > > > following up
> > > > > > > > > > on some topics (ACPI CPU hotplug).
> > > > >
> > > > >
> > > > > Hi Lorenzo,
> > > > > As a follow-up to our last meeting, do we have any updates from your
> > > > > internal discussions in regards to the support of ACPI based Virtual
> > > > > CPU Hotplug or its "possible" specification? :)
> > > >
> > > > I am following up on it, should be able to give an update next LOD
> > > > on Feb 22nd if that's OK.
> > > >
> > > > Side note: I would be really grateful if we could run a CXL
> > > > overview/sync-up on the Feb 22nd, given that the enablement code
> > > > is being upstreamed.
> >
> > Sure, though there are large parts of that which need figuring out yet
> > even if current stuff is fine.
> >
> > Jonathan
> >
> > > >
> > > > Thanks,
> > > > Lorenzo
> > > > --
> > > > Linaro-open-discussions mailing list
> > > >
> > https://collaborate.linaro.org/display/LOD/Linaro+Open+Discussions+Home
> > > > https://op-lists.linaro.org/mailman/listinfo/linaro-open-discussions
> > > >
> >
> > --
> > Linaro-open-discussions mailing list
> > https://collaborate.linaro.org/display/LOD/Linaro+Open+Discussions+Home
> > https://op-lists.linaro.org/mailman/listinfo/linaro-open-discussions
> >
> --
> Linaro-open-discussions mailing list
> https://collaborate.linaro.org/display/LOD/Linaro+Open+Discussions+Home
> https://op-lists.linaro.org/mailman/listinfo/linaro-open-discussions
I have added these two topics to the agenda for meeting on Feb 22nd.
On Wed, 3 Feb 2021 at 03:25, Jonathan Cameron via Linaro-open-discussions <
linaro-open-discussions(a)op-lists.linaro.org> wrote:
> On Tue, 2 Feb 2021 17:18:28 +0000
> Jon Masters via Linaro-open-discussions <
> linaro-open-discussions(a)op-lists.linaro.org> wrote:
>
> > +1 to the CXL discussion
> >
> > On Tue, Feb 2, 2021 at 12:14 PM Lorenzo Pieralisi via
> > Linaro-open-discussions <linaro-open-discussions(a)op-lists.linaro.org>
> wrote:
> >
> > > On Tue, Feb 02, 2021 at 08:43:39AM +0000, Salil Mehta wrote:
> > > >
> > > > > From: Linaro-open-discussions
> > > > > [mailto:linaro-open-discussions-bounces@op-lists.linaro.org] On
> > > Behalf Of
> > > > > Lorenzo Pieralisi via Linaro-open-discussions
> > > > > Sent: Thursday, January 7, 2021 10:55 AM
> > > > > To: Jonathan Cameron <jonathan.cameron(a)huawei.com>
> > > > > Cc: Mike Holmes via Linaro-open-discussions
> > > > > <linaro-open-discussions(a)op-lists.linaro.org>
> > > > > Subject: Re: [Linaro-open-discussions] Suggested Agenda / timings
> for
> > > Monday
> > > > > 7 Dec call
> > > > >
> > > > > On Wed, Dec 09, 2020 at 09:14:46AM +0000, Jonathan Cameron via
> > > > > Linaro-open-discussions wrote:
> > > > > > On Wed, 9 Dec 2020 08:35:57 +0000
> > > > > > Mike Holmes via Linaro-open-discussions
> > > > > <linaro-open-discussions(a)op-lists.linaro.org> wrote:
> > > > > >
> > > > > > > On Wed, Dec 9, 2020 at 8:19 AM Vincent Guittot via
> > > Linaro-open-discussions
> > > > > <
> > > > > > > linaro-open-discussions(a)op-lists.linaro.org> wrote:
> > > > > > >
> > > > > > > > On Tue, 8 Dec 2020 at 18:02, Lorenzo Pieralisi via
> > > > > > > > Linaro-open-discussions <
> > > linaro-open-discussions(a)op-lists.linaro.org>
> > > > > > > > wrote:
> > > > > > > > >
> > > > > > > > > On Thu, Dec 03, 2020 at 01:40:55PM +0000, Jonathan
> Cameron
> > > wrote:
> > > > > > > > > >
> > > > > > > > > > Hi All,
> > > > > > > > > >
> > > > > > > > > > The previous thread has gotten rather convoluted, so
> I'm
> > > going to have
> > > > > > > > a go at extracting
> > > > > > > > > > a brief summary of topics and suggesting some straw man
> > > timings.
> > > > > > > > > > These are all discussion topics, so name just indicates
> who
> > > I think
> > > > > > > > will do the intro.
> > > > > > > > > > Note I'd suggest we keep fairly tightly to timings and
> if it
> > > looks
> > > > > > > > like a particular
> > > > > > > > > > conversation is going long, we schedule a follow up.
> > > > > > > > >
> > > > > > > > > Hi Jonathan, all,
> > > > > > > > >
> > > > > > > > > thanks for the sync-up yesterday, I have already started
> > > following up
> > > > > > > > > on some topics (ACPI CPU hotplug).
> > > >
> > > >
> > > > Hi Lorenzo,
> > > > As a follow-up to our last meeting, do we have any updates from your
> > > > internal discussions in regards to the support of ACPI based Virtual
> > > > CPU Hotplug or its "possible" specification? :)
> > >
> > > I am following up on it, should be able to give an update next LOD
> > > on Feb 22nd if that's OK.
> > >
> > > Side note: I would be really grateful if we could run a CXL
> > > overview/sync-up on the Feb 22nd, given that the enablement code
> > > is being upstreamed.
>
> Sure, though there are large parts of that which need figuring out yet
> even if current stuff is fine.
>
> Jonathan
>
> > >
> > > Thanks,
> > > Lorenzo
> > > --
> > > Linaro-open-discussions mailing list
> > >
> https://collaborate.linaro.org/display/LOD/Linaro+Open+Discussions+Home
> > > https://op-lists.linaro.org/mailman/listinfo/linaro-open-discussions
> > >
>
> --
> Linaro-open-discussions mailing list
> https://collaborate.linaro.org/display/LOD/Linaro+Open+Discussions+Home
> https://op-lists.linaro.org/mailman/listinfo/linaro-open-discussions
>