From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.6 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SPF_PASS,USER_AGENT_MUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A61A3C282C4 for ; Tue, 12 Feb 2019 14:42:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 731902083B for ; Tue, 12 Feb 2019 14:42:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1549982569; bh=ne1GaoIkFU39IlisZEyCSRLo+/PRrwBzZOEyKO+uo5o=; h=Date:From:To:Cc:Subject:References:In-Reply-To:List-ID:From; b=bn/QU01N6teHTJv+5EG8fpp8Pa1CW8TxVQm5Sy4EBD1TiyJpDvT3l6qlhaqz/kmaN WoNcLRNk06ed+R5S7xE+KyMkH5HCkKkVnu6BkqQFrQhsDuy7uXySUM9HHouDnIMgOh /eId4p7w6mC1ny4iLIthpp+fsQiHBGvJSJVTjZtk= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730005AbfBLOms (ORCPT ); Tue, 12 Feb 2019 09:42:48 -0500 Received: from mx2.suse.de ([195.135.220.15]:42904 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727428AbfBLOmp (ORCPT ); Tue, 12 Feb 2019 09:42:45 -0500 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 54795AF01; Tue, 12 Feb 2019 14:42:43 +0000 (UTC) Date: Tue, 12 Feb 2019 15:42:42 +0100 From: Michal Hocko To: Oscar Salvador Cc: Shameerali Kolothum Thodi , Jonathan Cameron , "linux-mm@kvack.org" , "dan.j.williams@intel.com" , "Pavel.Tatashin@microsoft.com" , "david@redhat.com" , "linux-kernel@vger.kernel.org" , "dave.hansen@intel.com" , Linuxarm , Robin Murphy Subject: Re: [RFC PATCH v2 0/4] mm, memory_hotplug: allocate memmap from hotadded memory Message-ID: <20190212144242.GZ15609@dhcp22.suse.cz> References: <20190122103708.11043-1-osalvador@suse.de> <20190212124707.000028ea@huawei.com> <5FC3163CFD30C246ABAA99954A238FA8392B5DB6@lhreml524-mbs.china.huawei.com> <20190212135658.fd3rdil634ztpekj@d104.suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190212135658.fd3rdil634ztpekj@d104.suse.de> 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 Tue 12-02-19 14:56:58, Oscar Salvador wrote: > On Tue, Feb 12, 2019 at 01:21:38PM +0000, Shameerali Kolothum Thodi wrote: > > > Hi Oscar, > > > > > > I ran tests on one of our arm64 machines. Particular machine doesn't actually > > > have > > > the mechanics for hotplug, so was all 'faked', but software wise it's all the > > > same. > > > > > > Upshot, seems to work as expected on arm64 as well. > > > Tested-by: Jonathan Cameron > > Thanks Jonathan for having given it a spin, much appreciated! > I was short of arm64 machines. > > > (qemu) object_add memory-backend-ram,id=mem1,size=1G > > (qemu) device_add pc-dimm,id=dimm1,memdev=mem1,node=1 > > root@ubuntu:~# > > root@ubuntu:~# numactl -H > ... > > node 1 cpus: > > node 1 size: 1008 MB > > node 1 free: 1008 MB > > node distances: > > node 0 1 > > 0: 10 20 > > 1: 20 10 > > root@ubuntu:~# > > Ok, this is what I wanted to see. > When you hotplugged 1GB, 16MB out of 1024MB were spent > for the memmap array, that is why you only see 1008MB there. > > I am not sure what is the default section size for arm64, but assuming > is 128MB, that would make sense as 1GB would mean 8 sections, > and each section takes 2MB. > > That means that at least the mechanism works. Please make sure to test on a larger machine which has multi section memblocks. This is where I was hitting on bugs hard. -- Michal Hocko SUSE Labs