From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.1 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3344DC4361B for ; Sun, 13 Dec 2020 15:15:26 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id C5C3B23123 for ; Sun, 13 Dec 2020 15:15:25 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C5C3B23123 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 518C96B006C; Sun, 13 Dec 2020 10:15:25 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 4A3BD6B006E; Sun, 13 Dec 2020 10:15:25 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 390EA6B0070; Sun, 13 Dec 2020 10:15:25 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0236.hostedemail.com [216.40.44.236]) by kanga.kvack.org (Postfix) with ESMTP id 1FB846B006C for ; Sun, 13 Dec 2020 10:15:25 -0500 (EST) Received: from smtpin17.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id D2E782816 for ; Sun, 13 Dec 2020 15:15:24 +0000 (UTC) X-FDA: 77588607768.17.chess40_4e0af6827413 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin17.hostedemail.com (Postfix) with ESMTP id B664E180D0180 for ; Sun, 13 Dec 2020 15:15:24 +0000 (UTC) X-HE-Tag: chess40_4e0af6827413 X-Filterd-Recvd-Size: 7240 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by imf15.hostedemail.com (Postfix) with ESMTP for ; Sun, 13 Dec 2020 15:15:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1607872523; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=QFK1ZDhIoaUyExjTXZFlOfOZ3dXuJkhzO36EQH+4tPU=; b=P3JreMn3Fs5zw4B6Y6YsKqFFUPS6lK4Xxu4frJBwRaXB1HuKF3mnCG88a5n8Ninxo0M7I0 m5ZCfp6V8DBXHB9140kP9BriGrZOLRwbEHXlo0hFs1VchwUQGMMclBqpGA/aR89Dp/D0Es tAn2Qs3ENvHV3VxqLN6eiRrtiDFgrik= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-147-P9UtheO6P4CJz-VJ4CrRdw-1; Sun, 13 Dec 2020 10:15:21 -0500 X-MC-Unique: P9UtheO6P4CJz-VJ4CrRdw-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 82AD1107ACF7; Sun, 13 Dec 2020 15:15:19 +0000 (UTC) Received: from localhost (ovpn-12-67.pek2.redhat.com [10.72.12.67]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E1BBF19713; Sun, 13 Dec 2020 15:15:18 +0000 (UTC) Date: Sun, 13 Dec 2020 23:15:16 +0800 From: "bhe@redhat.com" To: Rahul Gopakumar Cc: "linux-mm@kvack.org" , "linux-kernel@vger.kernel.org" , "akpm@linux-foundation.org" , "natechancellor@gmail.com" , "ndesaulniers@google.com" , "clang-built-linux@googlegroups.com" , "rostedt@goodmis.org" , Rajender M , Yiu Cho Lau , Peter Jonasson , Venkatesh Rajaram , Mike Rapoport Subject: Re: Performance regressions in "boot_time" tests in Linux 5.8 Kernel Message-ID: <20201213151516.GA12368@MiWiFi-R3L-srv> References: <20201022040440.GX25604@MiWiFi-R3L-srv> <20201102143035.GA3177@MiWiFi-R3L-srv> <20201112145149.GN8486@MiWiFi-R3L-srv> <20201122010844.GR8486@MiWiFi-R3L-srv> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 Content-Transfer-Encoding: quoted-printable X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On 12/11/20 at 04:16pm, Rahul Gopakumar wrote: > Hi Baoquan, >=20 > We re-evaluated your last patch and it seems to be fixing the > initial performance bug reported. During our previous testing, > we did not apply the patch rightly hence it was reporting > some issues.=20 >=20 > Here is the dmesg log confirming no delay in the draft patch. >=20 > Vanilla (5.10 rc3) > ------------------ >=20 > [ 0.024011] On node 2 totalpages: 89391104 > [ 0.024012] Normal zone: 1445888 pages used for memmap > [ 0.024012] Normal zone: 89391104 pages, LIFO batch:63 > [ 2.054646] ACPI: PM-Timer IO Port: 0x448 --------------> 2 secs del= ay >=20 > Patch > ------ >=20 > [ 0.024166] On node 2 totalpages: 89391104 > [ 0.024167] Normal zone: 1445888 pages used for memmap > [ 0.024167] Normal zone: 89391104 pages, LIFO batch:63 > [ 0.026694] ACPI: PM-Timer IO Port: 0x448 --------------> No delay >=20 > Attached dmesg logs. Let me know if anything is needed from our end. I posted formal patchset to fix this issue. The patch 1 is doing the fix, and almost the same as the draft v2 patch I attached in this thread. Please feel free to help test and add your Tested-by: tag in the patch thread if possible. >=20 >=20 >=20 > From: Rahul Gopakumar > Sent: 24 November 2020 8:33 PM > To: bhe@redhat.com > Cc: linux-mm@kvack.org ; linux-kernel@vger.kernel.o= rg ; akpm@linux-foundation.org ; natechancellor@gmail.com ; nde= saulniers@google.com ; clang-built-linux@googleg= roups.com ; rostedt@goodmis.org ; Rajender M ; Yiu Cho Lau ; Peter Jonasson ; Venkatesh Rajaram > Subject: Re: Performance regressions in "boot_time" tests in Linux 5.8 = Kernel=20 > =A0 > Hi Baoquan, >=20 > We applied the new patch to 5.10 rc3 and tested it. We are still > observing the same page corruption issue which we saw with the > old patch. This is causing 3 secs delay in boot time. >=20 > Attached dmesg log from the new patch and also from vanilla > 5.10 rc3 kernel. >=20 > There are multiple lines like below in the dmesg log of the > new patch. >=20 > "BUG: Bad page state in process swapper=A0 pfn:ab08001" >=20 > ________________________________________ > From: bhe@redhat.com > Sent: 22 November 2020 6:38 AM > To: Rahul Gopakumar > Cc: linux-mm@kvack.org; linux-kernel@vger.kernel.org; akpm@linux-founda= tion.org; natechancellor@gmail.com; ndesaulniers@google.com; clang-built-= linux@googlegroups.com; rostedt@goodmis.org; Rajender M; Yiu Cho Lau; Pet= er Jonasson; Venkatesh Rajaram > Subject: Re: Performance regressions in "boot_time" tests in Linux 5.8 = Kernel >=20 > On 11/20/20 at 03:11am, Rahul Gopakumar wrote: > > Hi Baoquan, > > > > To which commit should we apply the draft patch. We tried applying > > the patch to the commit 3e4fb4346c781068610d03c12b16c0cfb0fd24a3 > > (the one we used for applying the previous patch) but it fails. >=20 > I tested on 5.10-rc3+. You can append below change to the old patch in > your testing kernel. >=20 > diff --git a/mm/page_alloc.c b/mm/page_alloc.c > index fa6076e1a840..5e5b74e88d69 100644 > --- a/mm/page_alloc.c > +++ b/mm/page_alloc.c > @@ -448,6 +448,8 @@ defer_init(int nid, unsigned long pfn, unsigned lon= g end_pfn) > =A0=A0=A0=A0=A0=A0=A0 if (end_pfn < pgdat_end_pfn(NODE_DATA(nid))) > =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 return false; >=20 > +=A0=A0=A0=A0=A0=A0 if (NODE_DATA(nid)->first_deferred_pfn !=3D ULONG_M= AX) > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 return true; > =A0=A0=A0=A0=A0=A0=A0 /* > =A0=A0=A0=A0=A0=A0=A0=A0 * We start only with one section of pages, mor= e pages are added as > =A0=A0=A0=A0=A0=A0=A0=A0 * needed until the rest of deferred pages are = initialized.