Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp5604926pxu; Wed, 23 Dec 2020 00:14:48 -0800 (PST) X-Google-Smtp-Source: ABdhPJyStiKCDt346k2cbXGMLozCYbDXSQ6wwb2p9b9EZTGzBJqhsVklgrxpeQKZCFYMteJfGPuG X-Received: by 2002:a17:906:3593:: with SMTP id o19mr22858194ejb.377.1608711288225; Wed, 23 Dec 2020 00:14:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608711288; cv=none; d=google.com; s=arc-20160816; b=voHZLBvbgBGVxpHdnFjwdRInCexx/4CQH4w4ydf4DYZvwIkeIEFGz53tjehNq3fHMi dIObPdfldko+7BRK4EK7b3WtgRMX6Dg7bc3/fnOZRvzNMY37DE0+TiQIivxrb/DvIRJa qwcI8nq7o8cQq1VBf9Y9+etlom+7e7WTqwErywUT0a1FucIrIlJXJ2+zJjuzk4wF9NCP p0r0tcK0Vv+jOnkoRSaojuHDWZ731mJEgZ5NUbleAdEpJOVTJNhekc6AyfImuJgRtInt AcIM2lLfexgedfZ3gRiXmQ5+EDTP3SJU/Ogvj9p+Kqi5Xix/06hqWB/RMtPKxyj2Y7yU ZoWA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=1BANFDoSL/jWXuZWm1zwXZxvx6f9NMcc6/oidVj3yPs=; b=07oneP86Zp4ATlj8Em8sD379PX/X+0yZwvIw2PfDwtHdTUBz+HhxIrHEtGEi3PlQwY aDYf6vDFknOChKUSktb9T0gW4XHpAFCzvdbyhVWECMXo4UNvgwUvMh04nVnzXDxaql4o Mo30TpelHqXsm17nKYwE3RU+mbheDm5WaHIAo4sJO4Q02UthAQzWo/Y65oJeufm0mr8b g2I1WW4uRzFGg3IeDpVQAtH0l4vXaEZqTkq/XGkshQdWRgQwnUFgEeM2poYNzPQ51TGk 5d6fQXubOuQuwPWQn2jCNBjZn8MbdeX54+3W89gvscHYshgMI28iQtxdJH9xCMzt2rz9 jTiw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=JxIjy9mm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u26si11695337ejg.642.2020.12.23.00.14.18; Wed, 23 Dec 2020 00:14:48 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=JxIjy9mm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727929AbgLWINs (ORCPT + 99 others); Wed, 23 Dec 2020 03:13:48 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:51888 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727827AbgLWINs (ORCPT ); Wed, 23 Dec 2020 03:13:48 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1608711142; 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: in-reply-to:in-reply-to:references:references; bh=1BANFDoSL/jWXuZWm1zwXZxvx6f9NMcc6/oidVj3yPs=; b=JxIjy9mm+ZqrjD7jtcggFua3oeiUomxCrl4XM/UrdVTolPCo2Wd8jxB/nM0C2eLUvkMV7s 712Dk7Tjy1U0vEXXcIn04/oZjqpGCRH4eoQ1oPfb3b5XM8BsaCjjilXfDAG2iPyOyF1eh8 MOoDaelXgLUlGS/1q9zYjRpRJAgIQt0= 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-389-TscbMCJFOuq4a33cCDoh1g-1; Wed, 23 Dec 2020 03:12:18 -0500 X-MC-Unique: TscbMCJFOuq4a33cCDoh1g-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id E9F0F800D55; Wed, 23 Dec 2020 08:12:16 +0000 (UTC) Received: from localhost (ovpn-13-111.pek2.redhat.com [10.72.13.111]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 2394F60C6A; Wed, 23 Dec 2020 08:12:12 +0000 (UTC) Date: Wed, 23 Dec 2020 16:12:10 +0800 From: Baoquan He To: Andrew Morton Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, gopakumarr@vmware.com, rppt@kernel.org, david@redhat.com Subject: Re: [PATCH v2 0/5] Fix the incorrect memmep defer init handling and do some cleanup Message-ID: <20201223081210.GC2205@MiWiFi-R3L-srv> References: <20201220082754.6900-1-bhe@redhat.com> <20201222174658.a2d08ca723a20587467792d9@linux-foundation.org> <20201223020534.GA2205@MiWiFi-R3L-srv> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201223020534.GA2205@MiWiFi-R3L-srv> User-Agent: Mutt/1.10.1 (2018-07-13) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 12/23/20 at 10:05am, Baoquan He wrote: > On 12/22/20 at 05:46pm, Andrew Morton wrote: > > On Sun, 20 Dec 2020 16:27:49 +0800 Baoquan He wrote: > > > > > VMware reported the performance regression during memmap_init() invocation. > > > And they bisected to commit 73a6e474cb376 ("mm: memmap_init: iterate over > > > memblock regions rather that check each PFN") causing it. > > > > > > https://lore.kernel.org/linux-mm/DM6PR05MB52921FF90FA01CC337DD23A1A4080@DM6PR05MB5292.namprd05.prod.outlook.com/ > > > > > > After investigation, it's caused by incorrect memmap init defer handling > > > in memmap_init_zone() after commit 73a6e474cb376. The current > > > memmap_init_zone() only handle one memory region of one zone, while > > > memmap_init() iterates over all its memory regions and pass them one by > > > one into memmap_init_zone() to handle. > > > > > > So in this patchset, patch 1/5 fixes the bug observed by VMware. Patch > > > 2~5/5 clean up codes. > > > accordingly. > > > > This series doesn't apply well to current mainline (plus, perhaps, > > material which I sent to Linus today). > > > > So please check all that against mainline in a day or so, refresh, > > retest and resend. > > > > Please separate the fix for the performance regression (1/5) into a > > single standalone patch, ready for -stable backporting. And then a > > separate 4-patch series with the cleanups for a 5.11 merge. Have sent the 1/5 as a standalone patch. Will send the rest 4 patches as a patchset once the patch 1/5 is merged into linux-next. Thanks, Andrew. > > Sure, doing now. > > By the way, when sending patches to linux-mm ML, which branch should I > rebase them on? I usually take your akpm/master as base, thought this > will make your patch picking easier. Seems my understanding is not true, > akpm/master is changed very soon, we should always base patch on linus's > master branch, whether patch is sending to linux-mm or not, right?