lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 12 Mar 2021 16:19:51 +0000
From:   "Liang, Liang (Leo)" <Liang.Liang@....com>
To:     "Deucher, Alexander" <Alexander.Deucher@....com>,
        David Hildenbrand <david@...hat.com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        amd-gfx list <amd-gfx@...ts.freedesktop.org>,
        Andrew Morton <akpm@...ux-foundation.org>
CC:     "Huang, Ray" <Ray.Huang@....com>,
        "Koenig, Christian" <Christian.Koenig@....com>,
        Mike Rapoport <rppt@...ux.ibm.com>,
        "Rafael J. Wysocki" <rafael@...nel.org>,
        George Kennedy <george.kennedy@...cle.com>
Subject: RE: slow boot with 7fef431be9c9 ("mm/page_alloc: place pages to tail
 in __free_pages_core()")

[AMD Public Use]

Dmesg attached.

-----Original Message-----
From: Deucher, Alexander <Alexander.Deucher@....com> 
Sent: Friday, March 12, 2021 11:39 PM
To: David Hildenbrand <david@...hat.com>; linux-kernel@...r.kernel.org; amd-gfx list <amd-gfx@...ts.freedesktop.org>; Andrew Morton <akpm@...ux-foundation.org>; Liang, Liang (Leo) <Liang.Liang@....com>
Cc: Huang, Ray <Ray.Huang@....com>; Koenig, Christian <Christian.Koenig@....com>; Mike Rapoport <rppt@...ux.ibm.com>; Rafael J. Wysocki <rafael@...nel.org>; George Kennedy <george.kennedy@...cle.com>
Subject: RE: slow boot with 7fef431be9c9 ("mm/page_alloc: place pages to tail in __free_pages_core()")

[AMD Public Use]

> -----Original Message-----
> From: David Hildenbrand <david@...hat.com>
> Sent: Friday, March 12, 2021 9:12 AM
> To: Deucher, Alexander <Alexander.Deucher@....com>; linux- 
> kernel@...r.kernel.org; amd-gfx list <amd-gfx@...ts.freedesktop.org>; 
> Andrew Morton <akpm@...ux-foundation.org>
> Cc: Huang, Ray <Ray.Huang@....com>; Koenig, Christian 
> <Christian.Koenig@....com>; Liang, Liang (Leo) <Liang.Liang@....com>; 
> Mike Rapoport <rppt@...ux.ibm.com>; Rafael J. Wysocki 
> <rafael@...nel.org>; George Kennedy <george.kennedy@...cle.com>
> Subject: Re: slow boot with 7fef431be9c9 ("mm/page_alloc: place pages 
> to tail in __free_pages_core()")
> 
> On 12.03.21 15:06, Deucher, Alexander wrote:
> > [AMD Public Use]
> >
> >> -----Original Message-----
> >> From: David Hildenbrand <david@...hat.com>
> >> Sent: Thursday, March 11, 2021 10:03 AM
> >> To: Deucher, Alexander <Alexander.Deucher@....com>; linux- 
> >> kernel@...r.kernel.org; amd-gfx list 
> >> <amd-gfx@...ts.freedesktop.org>; Andrew Morton 
> >> <akpm@...ux-foundation.org>
> >> Cc: Huang, Ray <Ray.Huang@....com>; Koenig, Christian 
> >> <Christian.Koenig@....com>; Liang, Liang (Leo)
> <Liang.Liang@....com>;
> >> Mike Rapoport <rppt@...ux.ibm.com>; Rafael J. Wysocki 
> >> <rafael@...nel.org>; George Kennedy <george.kennedy@...cle.com>
> >> Subject: Re: slow boot with 7fef431be9c9 ("mm/page_alloc: place 
> >> pages to tail in __free_pages_core()")
> >>
> >> On 11.03.21 15:41, Deucher, Alexander wrote:
> >>> [AMD Public Use]
> >>>
> >>> Booting kernels on certain AMD platforms takes 2-3 minutes with 
> >>> the patch
> >> in the subject.  Reverting it restores quick boot times (few 
> >> seconds).  Any ideas?
> >>>
> >>
> >> Hi,
> >>
> >> We just discovered latent BUGs in ACPI code whereby ACPI tables are 
> >> exposed to the page allocator as ordinary, free system RAM. With 
> >> the patch you mention, the order in which pages get allocated from 
> >> the page allocator are changed - which makes the BUG trigger more easily.
> >>
> >> I could imagine that someone allocates and uses that memory on your 
> >> platform, and I could imagine that such accesses are very slow.
> >>
> >> I cannot tell if that is the root cause, but at least it would make sense.
> >>
> >> See
> >>
> https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flore.
> >>
> kernel.org%2Fpatchwork%2Fpatch%2F1389314%2F&amp;data=04%7C01%7C
> >>
> alexander.deucher%40amd.com%7Cd1533aaddccd464c59f308d8e49ec563%7
> >>
> C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637510717893096801%
> >>
> 7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLC
> >>
> JBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=xpty77D54Z5S%2FKK
> >> JO5SsVQaNsHoojWMR73whpu8VT%2B4%3D&amp;reserved=0
> >>
> >> You might want to give that patch a try (not sure if it's the 
> >> latest version). CCing George
> >
> > Thanks for the patch.  Unfortunately it didn't help.  Any other 
> > ideas?  Is
> there a newer version of that patch?
> >
> 
> @George?
> 
> It's interesting that this only applies to these special AMD systems 
> so far. Is there anything particular about these systems? How much 
> memory do these systems have?

8G (with some carve out for the integrated GPU).
[    0.044181] Memory: 6858688K/7200304K available (14345K kernel code, 9659K rwdata, 4980K rodata, 2484K init, 12292K bss, 341360K reserved, 0K cma-reserved)

Nothing particularly special about these systems that I am aware of.  I'll see if we can repro this issue on any other platforms, but so far, not one has noticed any problems.

> 
> Increasing the boot time from a few seconds to 2-3 minutes does not 
> smell like some corner case cache effects we might be hitting in this 
> particular instance - there have been minor reports that it either 
> slightly increased or slightly decreases initial system performance, but that was about it.
> 
> Either, yet another latent BUG (but why? why should memory access 
> suddenly be that slow? I could only guess that we are now making 
> sooner use of very slow memory), or there is really something else weird going on.

Looks like pretty much everything is slower based on the timestamps in the dmesg output.  There is a big jump here:

> [    3.758596] ACPI: Added _OSI(Linux-Lenovo-NV-HDMI-Audio)
> [    3.759372] ACPI: Added _OSI(Linux-HPI-Hybrid-Graphics)
> [   16.177983] ACPI: 13 ACPI AML tables successfully acquired and loaded
> [   17.099316] ACPI: [Firmware Bug]: BIOS _OSI(Linux) query ignored
> [   18.969959] ACPI: EC: EC started

And here:

> [   36.566608] PCI: CLS 64 bytes, default 64
> [   36.575383] Trying to unpack rootfs image as initramfs...
> [   44.594348] Initramfs unpacking failed: Decoding failed
> [   44.765141] Freeing initrd memory: 46348K

Also seeing soft lockups:
> [  124.588634] watchdog: BUG: soft lockup - CPU#1 stuck for 23s! 
> [swapper/1:0]

@Liang, Liang (Leo) can you attach the dmesg outputs with 7fef431be9c9 reverted and without?

Alex

> 
> Cheers!
> 
> > Alex
> 
> 
> --
> Thanks,
> 
> David / dhildenb

Download attachment "dmesg_revert_7fef431be9c9.log" of type "application/octet-stream" (75860 bytes)

Download attachment "dmesg_slow_boot.log" of type "application/octet-stream" (73182 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ