Received: by 10.192.165.148 with SMTP id m20csp387337imm; Fri, 27 Apr 2018 00:09:58 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqJi9koZlQGiKdy9fi+R5VxpGe5gFynoCS74SmUl4s3EbbYFf47ww2LXqw7cPl8qXVlXHgW X-Received: by 2002:a65:43cb:: with SMTP id n11-v6mr1100490pgp.287.1524812998279; Fri, 27 Apr 2018 00:09:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524812998; cv=none; d=google.com; s=arc-20160816; b=jjLu5gmOTJoxPFXrz34qY5xb7eLFhtjpc+oD8BYV8kuXDp2lvme0COtHGvJ28vi+NQ aHzgiTwD/Yzdzs7WywPYkdjjXS6C+NCHeBfq53aT95DHvqloKOikXtCo26hs6Oi3B5SE 2nCNNAbd0qgZcqb0o4GyDsM1cYjSG1BzkiatbUUNuULeEdD4NoL7mVQwwInc9nahO1NE WFUNQxo2pmuYmPSCQ+XGnNvkDFZkTRdJpyw4aoKsWE62eyvwgtimyUz1J7JLtFv9PPWQ B05/ITW65+FSug4Ueen4LkHQK1tQKknJg+iuTszaf0ou+/zhjc59B4PCv7CdNekNazG8 I3tQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dmarc-filter:arc-authentication-results; bh=YtwCHq/X7B8YwwGxAdyYwFbnGqliTsho9LWgI6hzDMg=; b=pyRVz9V88Zb1tGaxXwrUdWcL69fYqjLH66jYDBRxDAUKpIINB+NnpWBXZb/nKWiTyS 2FKS3az9drc6aBXsu9IAqmeIWTYRvVmjAa0XmdaY7Mq07wApg/iKzjqkQzCWAlpqH9Yk 1XCYcR0JD7kmGJ6lYIIYyNgy7tQODqx7UFMN3/IOzzQX+lVbv6+/dJqTIfXcmU40g7T/ QeEnffHSQpLObHXOunVfb1Wzpd/RH2nMc5SvACax8/RPmhX1utZosDiDHyDXKYiNIwxP ruSmHEf9zV6xrYg9sVvpR90e2tQEnb1yShe7qQ0V6Czr6p9r+idQMsMevzA2QRwlYfB3 qXCw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y23si714914pff.177.2018.04.27.00.09.43; Fri, 27 Apr 2018 00:09:58 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757471AbeD0HIj (ORCPT + 99 others); Fri, 27 Apr 2018 03:08:39 -0400 Received: from mail.kernel.org ([198.145.29.99]:36522 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757367AbeD0HIh (ORCPT ); Fri, 27 Apr 2018 03:08:37 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id E4DE021864; Fri, 27 Apr 2018 07:08:36 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E4DE021864 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linuxfoundation.org Authentication-Results: mail.kernel.org; spf=fail smtp.mailfrom=gregkh@linuxfoundation.org Date: Fri, 27 Apr 2018 09:08:28 +0200 From: Greg KH To: Pavel Tatashin Cc: steven.sistare@oracle.com, daniel.m.jordan@oracle.com, akpm@linux-foundation.org, kirill.shutemov@linux.intel.com, linux-kernel@vger.kernel.org, mhocko@suse.com, linux-mm@kvack.org, stable@vger.kernel.org Subject: Re: [PATCH] mm: sections are not offlined during memory hotremove Message-ID: <20180427070828.GC4931@kroah.com> References: <20180426203002.3151-1-pasha.tatashin@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180426203002.3151-1-pasha.tatashin@oracle.com> User-Agent: Mutt/1.9.5 (2018-04-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Apr 26, 2018 at 04:30:02PM -0400, Pavel Tatashin wrote: > Memory hotplug, and hotremove operate with per-block granularity. If > machine has large amount of memory (more than 64G), the size of memory > block can span multiple sections. By mistake, during hotremove we set > only the first section to offline state. > > The bug was discovered because kernel selftest started to fail: > https://lkml.kernel.org/r/20180423011247.GK5563@yexl-desktop > > After commit, "mm/memory_hotplug: optimize probe routine". But, the bug is > older than this commit. In this optimization we also added a check for > sections to be in a proper state during hotplug operation. > > Fixes: 2d070eab2e82 ("mm: consider zone which is not fully populated to have holes") > > Signed-off-by: Pavel Tatashin > Acked-by: Michal Hocko > --- > mm/sparse.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/mm/sparse.c b/mm/sparse.c > index 62eef264a7bd..73dc2fcc0eab 100644 > --- a/mm/sparse.c > +++ b/mm/sparse.c > @@ -629,7 +629,7 @@ void offline_mem_sections(unsigned long start_pfn, unsigned long end_pfn) > unsigned long pfn; > > for (pfn = start_pfn; pfn < end_pfn; pfn += PAGES_PER_SECTION) { > - unsigned long section_nr = pfn_to_section_nr(start_pfn); > + unsigned long section_nr = pfn_to_section_nr(pfn); > struct mem_section *ms; > > /* > -- > 2.17.0 This is not the correct way to submit patches for inclusion in the stable kernel tree. Please read: https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html for how to do this properly.