From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754044AbdDKIDO (ORCPT ); Tue, 11 Apr 2017 04:03:14 -0400 Received: from mx1.redhat.com ([209.132.183.28]:39366 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751255AbdDKIB7 (ORCPT ); Tue, 11 Apr 2017 04:01:59 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 6164B787F3 Authentication-Results: ext-mx03.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx03.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=imammedo@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 6164B787F3 Date: Tue, 11 Apr 2017 10:01:52 +0200 From: Igor Mammedov To: Michal Hocko Cc: linux-mm@kvack.org, Andrew Morton , Mel Gorman , Vlastimil Babka , Andrea Arcangeli , Jerome Glisse , Reza Arbab , Yasuaki Ishimatsu , qiuxishi@huawei.com, Kani Toshimitsu , slaoub@gmail.com, Joonsoo Kim , Andi Kleen , David Rientjes , Daniel Kiper , Vitaly Kuznetsov , LKML , Dan Williams , Heiko Carstens , Lai Jiangshan , Martin Schwidefsky , Tobias Regnery Subject: Re: [PATCH -v2 0/9] mm: make movable onlining suck less Message-ID: <20170411100152.6b4be896@nial.brq.redhat.com> In-Reply-To: <20170410145639.GE4618@dhcp22.suse.cz> References: <20170410110351.12215-1-mhocko@kernel.org> <20170410162749.7d7f31c1@nial.brq.redhat.com> <20170410145639.GE4618@dhcp22.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Tue, 11 Apr 2017 08:01:58 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 10 Apr 2017 16:56:39 +0200 Michal Hocko wrote: > On Mon 10-04-17 16:27:49, Igor Mammedov wrote: > [...] > > Hi Michal, > > > > I've given series some dumb testing, see below for unexpected changes I've noticed. > > > > Using the same CLI as above plus hotpluggable dimms present at startup > > (it still uses hotplug path as dimms aren't reported in e820) > > > > -object memory-backend-ram,id=mem1,size=256M -object memory-backend-ram,id=mem0,size=256M \ > > -device pc-dimm,id=dimm1,memdev=mem1,slot=1,node=0 -device pc-dimm,id=dimm0,memdev=mem0,slot=0,node=0 > > > > so dimm1 => memory3[23] and dimm0 => memory3[45] > > > > #issue1: > > unable to online memblock as NORMAL adjacent to onlined MOVABLE > > > > 1: after boot > > memory32:offline removable: 0 zones: Normal Movable > > memory33:offline removable: 0 zones: Normal Movable > > memory34:offline removable: 0 zones: Normal Movable > > memory35:offline removable: 0 zones: Normal Movable > > > > 2: online as movable 1st dimm > > > > #echo online_movable > memory32/state > > #echo online_movable > memory33/state > > > > everything is as expected: > > memory32:online removable: 1 zones: Movable > > memory33:online removable: 1 zones: Movable > > memory34:offline removable: 0 zones: Movable > > memory35:offline removable: 0 zones: Movable > > > > 3: try to offline memory32 and online as NORMAL > > > > #echo offline > memory32/state > > memory32:offline removable: 1 zones: Normal Movable > > memory33:online removable: 1 zones: Movable > > memory34:offline removable: 0 zones: Movable > > memory35:offline removable: 0 zones: Movable > > OK, this is not expected. We are not shifting zones anymore so the range > which was online_movable will not become available to the zone Normal. > So this must be something broken down the show_valid_zones path. I will > investigate. > > > > > #echo online_kernel > memory32/state > > write error: Invalid argument > > // that's not what's expected > > this is proper behavior with the current implementation. Does anything > depend on the zone reusing? if we didn't have zone imbalance issue in design, the it wouldn't matter but as it stands it's not minore issue. Consider following, one hotplugs some memory and onlines it as movable, then one needs to hotplug some more but to do so one one needs more memory from zone NORMAL and to keep zone balance some memory in MOVABLE should be reonlined as NORMAL