Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp2848745imm; Mon, 10 Sep 2018 07:22:26 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZdund9pMT0uwibHg8YyoMCueTEB0/ztX98ASL9GI3iKOOxjvO2Oels+gUwqAIhz59PP22S X-Received: by 2002:a62:8a4f:: with SMTP id y76-v6mr23903758pfd.233.1536589346290; Mon, 10 Sep 2018 07:22:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536589346; cv=none; d=google.com; s=arc-20160816; b=mnv7Y7YOC84mtOpS8UVj2trguuZ+PJoHnGsap9zoSgrl99T0qCfd3TTlkuqCcn8wUW wAUgGdp3/viT08Z+/lcffnyV++gea9Xg2n5oSEhXKi8OCv4RupAaKDtEQvh3iYoMaPz4 UoY+TutEfPbw2icF6/c6asXnLbckcAUg4IXiITI3B5Vgwl6J5DtLppD4mglCrdVmp+ht hbnGRGrvh+PUPy0b1uHbiOi4hiZuSUcgV5Wk2i+mAR9GS1L32Q5OobmIooIJNRWbeTw5 gnSUNI1SuTyP7ZBSg2FcNqXYXwLQb2EG/iPlunC6ujKdaIxwR12dh75G9Q5Q14muoydJ kMPw== 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; bh=S3YYAxlhAcXPr8EcIYfWnshrcwgGlCGNv3UFvM8I8yA=; b=NCocYg1+I9lTQiUx1QlbpmYLj2XR5hkRBNMqO46CBTnhUFZz6kmPTpTaXgeltBSf+Z NjFt4QmUEYqJlKDB3AzA5jv0Tow7B2k9zSVyt77xwPK+Krj5QvsQYbe9AtKyaKX33pcm Ydv8HEQ0Cvpcg5EUhO1IhX6+bDwnLgQ4ddp+cN/NfzUxxWGLMK4PVyCMT3MMuMVCs10a k19X7BgNCKpUEB3CBjN5zuApYq7dkcNr5PASBLej7rdrBIPb9l+xdg2ssA4POBK32K68 gveC7XCgr8yqYHpPULWO2cq38j0zK4ro58Z/5muP/SEiriutIdwYuO53VhqkM82UZl3t LwmA== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a10-v6si18967689pll.303.2018.09.10.07.22.10; Mon, 10 Sep 2018 07:22:26 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728699AbeIJTOI (ORCPT + 99 others); Mon, 10 Sep 2018 15:14:08 -0400 Received: from mx2.suse.de ([195.135.220.15]:57432 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727674AbeIJTOH (ORCPT ); Mon, 10 Sep 2018 15:14:07 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 90083B000; Mon, 10 Sep 2018 14:19:47 +0000 (UTC) Date: Mon, 10 Sep 2018 16:19:46 +0200 From: Michal Hocko To: Pasha Tatashin Cc: "zaslonko@linux.ibm.com" , Andrew Morton , LKML , Linux Memory Management List , "osalvador@suse.de" , "gerald.schaefer@de.ibm.com" Subject: Re: [PATCH] memory_hotplug: fix the panic when memory end is not on the section boundary Message-ID: <20180910141946.GJ10951@dhcp22.suse.cz> References: <20180910123527.71209-1-zaslonko@linux.ibm.com> <20180910131754.GG10951@dhcp22.suse.cz> <20180910135959.GI10951@dhcp22.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon 10-09-18 14:11:45, Pavel Tatashin wrote: > Hi Michal, > > It is tricky, but probably can be done. Either change > memmap_init_zone() or its caller to also cover the ends and starts of > unaligned sections to initialize and reserve pages. > > The same thing would also need to be done in deferred_init_memmap() to > cover the deferred init case. Well, I am not sure TBH. I have to think about that much more. Maybe it would be much more simple to make sure that we will never add incomplete memblocks and simply refuse them during the discovery. At least for now. -- Michal Hocko SUSE Labs