Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp1107414pxa; Thu, 13 Aug 2020 00:08:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwKX8L/kRL4GrHcNPADS9j4Sr+GwQdDqYpZEBYwzuUxCq2hLAjFhaMrt1DuQjsLzykX4nl0 X-Received: by 2002:a17:906:a206:: with SMTP id r6mr3414355ejy.70.1597302538570; Thu, 13 Aug 2020 00:08:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597302538; cv=none; d=google.com; s=arc-20160816; b=M/59n1bzIy8mvkS182tLmkYrtDG2MU0di34u6ZD7NscYDEjt4hOZGI2gVQHBMDWBL5 tn+V++iYZjfnnT3TUaSQ3GmtVQG6PMJHphpgMLE3cUrwIcs0gIXiXBkRcTlrsi2I3+WX cg6ES0MXR82uIBKdSUQGsGXQJ0MHyHZGa5vz2RPbEmFXjZmZt9PmcvA8qfQcz7OgXFh0 2X0k4G2WZTB3zNtILEzNBNbJ3ApWiBtn9Dk9KpJeFmQB2sXeN3FvXO8C7cwOeKnYKoJt TnddyhToZnpICo73ZHRgdrDWHjPwgbA+iaYbp0vlBlL3bwrRWyLCZETqLiHgCP+/Y13b 9zVg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=nCbFI235A7jtRXBrP3K4m2Um2caWjfzGyNzrUoSxWyI=; b=mcuCGRO8Beo0PqNeLeUtWyAMiMU8skAgwnUbxXfg9Rh64KyN27ZF2eT+YAaTf1hC74 9sBBJyw5xTWcndGAVA9nxhwbF1g6LrotNURljBxH6fIszdLHwwRNkIb5TCNOD84s4Lf9 IJdaSreJxM2ptRz5Nf/9LEaC4H6shbWT0c20OoHWA7gTnI7Ly7BFzLtA3dMAYrr0gvMQ utDnSgXZn1kdMbMKH7LtLzp0EnsLNeCC9r2oN8tKURwTdulam/BOg63oK8r3OqT0ufrG vMtEGnCx03G/mkc+zayf8PSheodYfKsriaTBoCcAhen8BvZNyiJ+kK+p9osffIGf7GRn 7vNQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q12si2769745edh.55.2020.08.13.00.08.35; Thu, 13 Aug 2020 00:08:58 -0700 (PDT) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726100AbgHMHHx (ORCPT + 99 others); Thu, 13 Aug 2020 03:07:53 -0400 Received: from mx2.suse.de ([195.135.220.15]:42918 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725982AbgHMHHw (ORCPT ); Thu, 13 Aug 2020 03:07:52 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 4D1B2B17C; Thu, 13 Aug 2020 07:08:13 +0000 (UTC) Date: Thu, 13 Aug 2020 09:07:44 +0200 From: Michal Hocko To: David Hildenbrand Cc: Charan Teja Reddy , akpm@linux-foundation.org, vbabka@suse.cz, linux-mm@kvack.org, linux-kernel@vger.kernel.org, vinmenon@codeaurora.org Subject: Re: [PATCH] mm, page_alloc: fix core hung in free_pcppages_bulk() Message-ID: <20200813070744.GB9477@dhcp22.suse.cz> References: <1597075833-16736-1-git-send-email-charante@codeaurora.org> <3b07d2a6-8ce7-5957-8ca5-a8d977852e14@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3b07d2a6-8ce7-5957-8ca5-a8d977852e14@redhat.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue 11-08-20 10:29:24, David Hildenbrand wrote: [...] > I was wondering if we should rather set all pageblocks to > MIGRATE_ISOLATE in online_pages() before doing the online_pages_range() > call, and do undo_isolate_page_range() after onlining is done. > > move_pfn_range_to_zone()->memmap_init_zone() marks all pageblocks > MIGRATE_MOVABLE, and as that function is used also during boot, we could > supply a parameter to configure this. > > This would prevent another race from happening: Having pages exposed to > the buddy ready for allocation in online_pages_range() before the > sections are marked online. > > This would avoid any pages from getting allocated before we're > completely done onlining. This sounds like a reasonable idea to me. > We would need MIGRATE_ISOLATE/CONFIG_MEMORY_ISOLATION also for > CONFIG_MEMORY_HOTPLUG. We already do depend on the memory isolation in the hotremove. Doing the same for hotplug in general makes sense as well. Thanks! -- Michal Hocko SUSE Labs