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=-1.0 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_PASS autolearn=unavailable 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 9709AC04AA9 for ; Thu, 2 May 2019 23:20:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6397E2064A for ; Thu, 2 May 2019 23:20:17 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=intel-com.20150623.gappssmtp.com header.i=@intel-com.20150623.gappssmtp.com header.b="o0QO+B7F" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726416AbfEBXUQ (ORCPT ); Thu, 2 May 2019 19:20:16 -0400 Received: from mail-oi1-f195.google.com ([209.85.167.195]:46356 "EHLO mail-oi1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726022AbfEBXUP (ORCPT ); Thu, 2 May 2019 19:20:15 -0400 Received: by mail-oi1-f195.google.com with SMTP id d62so3027601oib.13 for ; Thu, 02 May 2019 16:20:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=vaw/ORyOIX+LivDFjdzavvVFdSzrsfQ8T1otSWpVSIU=; b=o0QO+B7FpHVFXwLKbb17bFFqRW1e+qzOjokLhCa27tCA1lJSASdWhA4P/c4NjmHrqa GOOsRFhnMSC4lUYLJvgInQ6SVvEFblUsDEPZ8ydtIHrpEPx3GuSL/RdaPG2JoFOe4NEe hZl/zdyQUbrHeQuzhQYwqG1rNDOKwqDmtTeAsyxa+01dfkWFPMTmg8v6VfafeW0LRWoY eKOtN2mSnXVe4884pA8yQaBlyW7qSdHDi5TOp8WB42EmRk2DFs+J7zvgxkCbO0IJMGye k2byHYMgYhgXNQtcT2yeAEvkkg0b+TAfCF2UzrtO+4BxVi0uTXN0nuyzPTimga99l9js BHKA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=vaw/ORyOIX+LivDFjdzavvVFdSzrsfQ8T1otSWpVSIU=; b=bfor+FbBeIjaEQnqJ7AD3khFSbDepUyPMsjUkYskrl2lBdrM5qmZvPFzuQMJe9Fyc4 eBSAivomCaoA8ChvjiIqaW70vFz86iSp3GSa9ZQpvfFicOL+H+Gxm0hmcKOlb35eTcVN QkD7XNbdq62cEuEFI296TANX8dNj7QkVz+ttLAhwL91siJpKP1zlLqTrUGhFqli71oUl C6HOscyQOI5z40wdxRIACpbv7KeDAtewy6QEzCPPC+zlI/r9R1+Fz+R1ouzDKFD85JNP eJzAiUoK/2YLnms5N1UtwEO4L+Vdq/QaYbgj6gjdddNRO5HucRQ3XZrFt6rFw6lWWvVc 9wyQ== X-Gm-Message-State: APjAAAXNDQwAQ6lt7dsCkl18YKG8CUE4H63JUPKOaqmkV3lQjLQYj2ol IhYhtVydGrQlON+dtq1BVeVADgHRYq+GTY6UaXT/9Q== X-Google-Smtp-Source: APXvYqyR93jgYdljX7eIKXZzIfYL0esJbUsyTF/5NB+UbuV9bKgSCs+g8m9GOZjm7n5rkAFiUqQBlviACfilFseyMts= X-Received: by 2002:aca:de57:: with SMTP id v84mr4398622oig.149.1556839214939; Thu, 02 May 2019 16:20:14 -0700 (PDT) MIME-Version: 1.0 References: <155552633539.2015392.2477781120122237934.stgit@dwillia2-desk3.amr.corp.intel.com> In-Reply-To: From: Dan Williams Date: Thu, 2 May 2019 16:20:03 -0700 Message-ID: Subject: Re: [PATCH v6 00/12] mm: Sub-section memory hotplug support To: Pavel Tatashin Cc: Andrew Morton , David Hildenbrand , =?UTF-8?B?SsOpcsO0bWUgR2xpc3Nl?= , Logan Gunthorpe , Toshi Kani , Jeff Moyer , Michal Hocko , Vlastimil Babka , stable , linux-mm , linux-nvdimm , LKML Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, May 2, 2019 at 3:46 PM Pavel Tatashin wrote: > > Hi Dan, > > How do you test these patches? Do you have any instructions? Yes, I briefly mentioned this in the cover letter, but here is the test I am using: > > I see for example that check_hotplug_memory_range() still enforces > memory_block_size_bytes() alignment. > > Also, after removing check_hotplug_memory_range(), I tried to online > 16M aligned DAX memory, and got the following panic: Right, this functionality is currently strictly limited to the devm_memremap_pages() case where there are guarantees that the memory will never be onlined. This is due to the fact that the section size is entangled with the memblock api. That said I would have expected you to trigger the warning in subsection_check() before getting this far into the hotplug process. > > # echo online > /sys/devices/system/memory/memory7/state > [ 202.193132] WARNING: CPU: 2 PID: 351 at drivers/base/memory.c:207 > memory_block_action+0x110/0x178 > [ 202.193391] Modules linked in: > [ 202.193698] CPU: 2 PID: 351 Comm: sh Not tainted > 5.1.0-rc7_pt_devdax-00038-g865af4385544-dirty #9 > [ 202.193909] Hardware name: linux,dummy-virt (DT) > [ 202.194122] pstate: 60000005 (nZCv daif -PAN -UAO) > [ 202.194243] pc : memory_block_action+0x110/0x178 > [ 202.194404] lr : memory_block_action+0x90/0x178 > [ 202.194506] sp : ffff000016763ca0 > [ 202.194592] x29: ffff000016763ca0 x28: ffff80016fd29b80 > [ 202.194724] x27: 0000000000000000 x26: 0000000000000000 > [ 202.194838] x25: ffff000015546000 x24: 00000000001c0000 > [ 202.194949] x23: 0000000000000000 x22: 0000000000040000 > [ 202.195058] x21: 00000000001c0000 x20: 0000000000000008 > [ 202.195168] x19: 0000000000000007 x18: 0000000000000000 > [ 202.195281] x17: 0000000000000000 x16: 0000000000000000 > [ 202.195393] x15: 0000000000000000 x14: 0000000000000000 > [ 202.195505] x13: 0000000000000000 x12: 0000000000000000 > [ 202.195614] x11: 0000000000000000 x10: 0000000000000000 > [ 202.195744] x9 : 0000000000000000 x8 : 0000000180000000 > [ 202.195858] x7 : 0000000000000018 x6 : ffff000015541930 > [ 202.195966] x5 : ffff000015541930 x4 : 0000000000000001 > [ 202.196074] x3 : 0000000000000001 x2 : 0000000000000000 > [ 202.196185] x1 : 0000000000000070 x0 : 0000000000000000 > [ 202.196366] Call trace: > [ 202.196455] memory_block_action+0x110/0x178 > [ 202.196589] memory_subsys_online+0x3c/0x80 > [ 202.196681] device_online+0x6c/0x90 > [ 202.196761] state_store+0x84/0x100 > [ 202.196841] dev_attr_store+0x18/0x28 > [ 202.196927] sysfs_kf_write+0x40/0x58 > [ 202.197010] kernfs_fop_write+0xcc/0x1d8 > [ 202.197099] __vfs_write+0x18/0x40 > [ 202.197187] vfs_write+0xa4/0x1b0 > [ 202.197295] ksys_write+0x64/0xd8 > [ 202.197430] __arm64_sys_write+0x18/0x20 > [ 202.197521] el0_svc_common.constprop.0+0x7c/0xe8 > [ 202.197621] el0_svc_handler+0x28/0x78 > [ 202.197706] el0_svc+0x8/0xc > [ 202.197828] ---[ end trace 57719823dda6d21e ]--- > > Thank you, > Pasha