Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp444794pxj; Thu, 17 Jun 2021 06:25:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJymxLKp+iX/Y/xUBXctcI0IcAVVIDhP9JZVC89WfVbBDlUJIUMhqO464Hh2Nd7F4NgT6qTG X-Received: by 2002:a92:6d0b:: with SMTP id i11mr3537543ilc.160.1623936301170; Thu, 17 Jun 2021 06:25:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623936301; cv=none; d=google.com; s=arc-20160816; b=JY5dMF7k5nYYSJYcw/KlGkJ8khu7cixmnAfUWFtgMPFawW0XMyx/muJpeJNu/1isWL f9RnzRxAyIMZyvd9XdPxz/kR3Lxk/ZfLa8uvcliPYEOy1rYr1GlD73MpMccHKIatvbFN SvQZAc/NdeGr7ZWLDqU/7mmp57it5Xwy4sQuYc8uJ6BqGtll64GVUT7p2LwrXB4W+KDf mlRilZ78VDWiPOuEz7a60TS/+NSGaQ343B8QLJRrO19Py3Urj3F/8QPR4ZFfyr/DOVoO EDA1KfhAOXEkYJr4tPm3zqJjdtT9yt4WmYi66qhN7bz39zXsz1MEhZpPi0am0RThzjun jEtQ== 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; bh=kUTYvQOVVCYGgme4qJ1FRHFKGk90+8Dl/j1oORMJYgo=; b=UH/mDr88aKkm39yT86mXtsBfuIje0rYrI8wWgBU53pFTRHOv7F+vEYZEYNJKHUHtih 4OSyOb5+DXKVIdiQhHEkwkAq8BiTid3r4WNpn19zht+0nSyziVkq9AY4Hxbd9oAsjUpn 89sW3MFmyWIanq1FiZnXeVU/wpARYGjf8DXX8L6/+KmIkapocsathiYPoQMCiOxli1GG 7VTFACLKlIV9jmVcw5GRD31G7zsJq0PxmrAZLRZDmLFWBKeCs6jSWRjzEpOVqBFBtEri vTLYTVMmL1l3RcNHmelSO8/+gQqwDzoA8gKbyStmYpyC18mKeebRg0d5GJyn9YQmEevv gh4g== 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 g5si6027899jaj.24.2021.06.17.06.24.47; Thu, 17 Jun 2021 06:25:01 -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 S232479AbhFQLTG (ORCPT + 99 others); Thu, 17 Jun 2021 07:19:06 -0400 Received: from outbound-smtp38.blacknight.com ([46.22.139.221]:34155 "EHLO outbound-smtp38.blacknight.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232480AbhFQLTF (ORCPT ); Thu, 17 Jun 2021 07:19:05 -0400 Received: from mail.blacknight.com (pemlinmail01.blacknight.ie [81.17.254.10]) by outbound-smtp38.blacknight.com (Postfix) with ESMTPS id DE3EE1C7C for ; Thu, 17 Jun 2021 12:16:56 +0100 (IST) Received: (qmail 15591 invoked from network); 17 Jun 2021 11:16:56 -0000 Received: from unknown (HELO techsingularity.net) (mgorman@techsingularity.net@[84.203.17.255]) by 81.17.254.9 with ESMTPSA (AES256-SHA encrypted, authenticated); 17 Jun 2021 11:16:56 -0000 Date: Thu, 17 Jun 2021 12:16:55 +0100 From: Mel Gorman To: David Hildenbrand Cc: Naoya Horiguchi , linux-mm@kvack.org, Andrew Morton , Mike Kravetz , Oscar Salvador , Michal Hocko , Naoya Horiguchi , linux-kernel@vger.kernel.org Subject: Re: [PATCH mmotm v1] mm/hwpoison: disable pcp for page_handle_poison() Message-ID: <20210617111655.GP30378@techsingularity.net> References: <20210617092626.291006-1-nao.horiguchi@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jun 17, 2021 at 11:28:49AM +0200, David Hildenbrand wrote: > On 17.06.21 11:26, Naoya Horiguchi wrote: > > From: Naoya Horiguchi > > > > Recent changes by patch "mm/page_alloc: allow high-order pages to be > > stored on the per-cpu lists" makes kernels determine whether to use pcp > > by pcp_allowed_order(), which breaks soft-offline for hugetlb pages. > > > > Soft-offline dissolves a migration source page, then removes it from > > buddy free list, so it's assumed that any subpage of the soft-offlined > > hugepage are recognized as a buddy page just after returning from > > dissolve_free_huge_page(). pcp_allowed_order() returns true for > > hugetlb, so this assumption is no longer true. > > > > So disable pcp during dissolve_free_huge_page() and > > take_page_off_buddy() to prevent soft-offlined hugepages from linking to > > pcp lists. Soft-offline should not be common events so the impact on > > performance should be minimal. And I think that the optimization of > > Mel's patch could benefit to hugetlb so zone_pcp_disable() is called > > only in hwpoison context. > > Mel, Oscar, does alloc_contig_range() now have similar issues or is it > avoided because the pageblock(s) are set MIGRATE_ISOLATE? > I'd expect MIGRATE_ISOLATE to be sufficient because they should bypass the PCP list in free_unref_page. -- Mel Gorman SUSE Labs