Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752821AbdCPRfY (ORCPT ); Thu, 16 Mar 2017 13:35:24 -0400 Received: from mail-bn3nam01on0130.outbound.protection.outlook.com ([104.47.33.130]:28457 "EHLO NAM01-BN3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752110AbdCPRfW (ORCPT ); Thu, 16 Mar 2017 13:35:22 -0400 From: "Kani, Toshimitsu" To: "mhocko@kernel.org" CC: "zhenzhang.zhang@huawei.com" , "tangchen@cn.fujitsu.com" , "arbab@linux.vnet.ibm.com" , "vkuznets@redhat.com" , "linux-mm@kvack.org" , "daniel.kiper@oracle.com" , "xieyisheng1@huawei.com" , "linux-kernel@vger.kernel.org" , "iamjoonsoo.kim@lge.com" , "qiuxishi@huawei.com" , "yasu.isimatu@gmail.com" , "akpm@linux-foundation.org" , "aarcange@redhat.com" , "vbabka@suse.cz" , "imammedo@redhat.com" , "rientjes@google.com" , "mgorman@suse.de" , "ak@linux.intel.com" , "slaoub@gmail.com" Subject: Re: [RFC PATCH] rework memory hotplug onlining Thread-Topic: [RFC PATCH] rework memory hotplug onlining Thread-Index: AQHSnWyJBZOXJ4lOCE+q/X46Wshj4KGWllIAgACUjgCAAJxYAA== Date: Thu, 16 Mar 2017 17:19:34 +0000 Message-ID: <1489688018.9118.14.camel@hpe.com> References: <20170315091347.GA32626@dhcp22.suse.cz> <1489622542.9118.8.camel@hpe.com> <20170316085404.GE30501@dhcp22.suse.cz> In-Reply-To: <20170316085404.GE30501@dhcp22.suse.cz> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=toshi.kani@hpe.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [15.219.163.8] x-microsoft-exchange-diagnostics: 1;CS1PR84MB0293;7:jOxMPmcx0r4Ln0MeNLZvh5IFyLuVZTbUazkkExnHDKOFsYEcst+ZTNn1J9vRMCI5FpK10/mGA0pH6DdahKEHHO5wTuRyiewvTp33muonBbnM1ODspJy6o387UbE68n2qv84pVrHLQWY2rBqUsQFWunHt7liSJtDZ/Ag2CR4KUg0xCwn4g7MWYP1kcckEdWC7jlTKB6RRKZuJVrzy9AhctYW2AAWT/duJYrJ/tdHwUb3TE9peOyc+ZASXNu9ZDdugWq3g8laKD3IBxYQlo6F9gDyuivq/mSOHnJEuXM/mlASkShTPsmdveZYEa4y/pO/Qm0JP5aNrfNUKZPeWNlmZnQ== x-ms-office365-filtering-correlation-id: e811a49f-fc35-4c15-e5c6-08d46c909e03 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001)(48565401081);SRVR:CS1PR84MB0293; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(209352067349851); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(6040375)(601004)(2401047)(5005006)(8121501046)(3002001)(10201501046)(6055026)(6041248)(20161123560025)(20161123562025)(20161123564025)(20161123555025)(20161123558025)(6072148);SRVR:CS1PR84MB0293;BCL:0;PCL:0;RULEID:;SRVR:CS1PR84MB0293; x-forefront-prvs: 024847EE92 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(6009001)(39850400002)(39860400002)(39410400002)(39840400002)(39450400003)(377424004)(24454002)(6506006)(103116003)(2351001)(6916009)(33646002)(53936002)(106356001)(6116002)(102836003)(3846002)(8936002)(97736004)(76176999)(50986999)(5660300001)(54356999)(8676002)(2950100002)(81166006)(3660700001)(1730700003)(7416002)(229853002)(6512007)(77096006)(2900100001)(7736002)(38730400002)(54906002)(6246003)(110136004)(3280700002)(6486002)(2501003)(122556002)(189998001)(6436002)(5640700003)(305945005)(36756003)(4326008)(39060400002)(2906002)(86362001)(66066001);DIR:OUT;SFP:1102;SCL:1;SRVR:CS1PR84MB0293;H:CS1PR84MB0294.NAMPRD84.PROD.OUTLOOK.COM;FPR:;SPF:None;MLV:ovrnspm;PTR:InfoNoRecords;LANG:en; spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="utf-8" Content-ID: <3676DD6D62852844A835C5F735DFC027@NAMPRD84.PROD.OUTLOOK.COM> MIME-Version: 1.0 X-OriginatorOrg: hpe.com X-MS-Exchange-CrossTenant-originalarrivaltime: 16 Mar 2017 17:19:34.6665 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 105b2061-b669-4b31-92ac-24d304d195dc X-MS-Exchange-Transport-CrossTenantHeadersStamped: CS1PR84MB0293 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by mail.home.local id v2GHZmnB019512 Content-Length: 1246 Lines: 29 On Thu, 2017-03-16 at 09:54 +0100, Michal Hocko wrote: > On Wed 15-03-17 23:08:14, Kani, Toshimitsu wrote: > > On Wed, 2017-03-15 at 10:13 +0100, Michal Hocko wrote: : > > > - zone = page_zone(pfn_to_page(valid_start)); > > > > Please do not remove the fix made in a96dfddbcc043. zone needs to > > be set from valid_start, not from start_pfn. > > Thanks for pointing this out. I was scratching my head about this > part but was too tired from previous git archeology so I didn't check > the history of this particular part. > > I will restore the original behavior but before I do that I am really > curious whether partial memblocks are even supported for onlining. > Maybe I am missing something but I do not see any explicit checks for > NULL struct page when we set zone boundaries or online a memblock. Is > it possible those memblocks are just never hotplugable? check_hotplug_memory_range() checks if a given range is aligned by the section size. This memory device represents a memory_block, which may have multiple sections per 'sections_per_block'. This value is set to 2GB/128MB for 2GB memory_block. So, I'd expect that hot-add works as long as the address is aligned by 128MB, but I have not tested it myself. Thanks, -Toshi