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 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id EFDAAECAAD1 for ; Thu, 1 Sep 2022 06:45:17 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 72B508D0001; Thu, 1 Sep 2022 02:45:17 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 6B3826B0073; Thu, 1 Sep 2022 02:45:17 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 553118D0001; Thu, 1 Sep 2022 02:45:17 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id 435AD6B0072 for ; Thu, 1 Sep 2022 02:45:17 -0400 (EDT) Received: from smtpin16.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 0858E1208D6 for ; Thu, 1 Sep 2022 06:45:17 +0000 (UTC) X-FDA: 79862579874.16.A5158E5 Received: from mga06.intel.com (mga06b.intel.com [134.134.136.31]) by imf16.hostedemail.com (Postfix) with ESMTP id 4809E18004D for ; Thu, 1 Sep 2022 06:45:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1662014716; x=1693550716; h=from:to:cc:subject:references:date:in-reply-to: message-id:mime-version; bh=hNxVVK32D6iCwH0/rf/rQNVbgNj+5447bH9KuDWgOqE=; b=IeE+755VXVI5i54jJGTjQ22ClxFlZnF4XTNxe/BjqWmo20mex1VsY6hU 2AOzlJYVsxsaoBPfqF+y0Bxp89+WbIUHQTjCvKTfKZjT1Mnh3AeoCNpn3 aRh2kS8Hu0b/KVeOLbVTvWuu1dhAH/EVXe9vaTnLJbQDtYkfala9SSIYS XQtGRibyKnH9+nMG271r3oK7Azf2DfnDgleFHeJCtutranueZUBURI7lH q10R5GNL88ZHn4y3eYSxaumpUDK7ilcbrEsMZvS+Fx7UtBb7S8iFO+kJ3 6pkGWhuYJeanHa9FUKVJjV3FA9La7ZJl//hOvLNFYiV6OGZ997H5Jhn1c A==; X-IronPort-AV: E=McAfee;i="6500,9779,10456"; a="357348975" X-IronPort-AV: E=Sophos;i="5.93,280,1654585200"; d="scan'208";a="357348975" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 Aug 2022 23:45:10 -0700 X-IronPort-AV: E=Sophos;i="5.93,280,1654585200"; d="scan'208";a="615226088" Received: from yhuang6-desk2.sh.intel.com (HELO yhuang6-desk2.ccr.corp.intel.com) ([10.238.208.55]) by fmsmga007-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 Aug 2022 23:45:04 -0700 From: "Huang, Ying" To: Aneesh Kumar K V Cc: linux-mm@kvack.org, akpm@linux-foundation.org, Wei Xu , Yang Shi , Davidlohr Bueso , Tim C Chen , Michal Hocko , Linux Kernel Mailing List , Hesham Almatary , Dave Hansen , Jonathan Cameron , Alistair Popple , Dan Williams , Johannes Weiner , jvgediya.oss@gmail.com, Bharata B Rao Subject: Re: [PATCH mm-unstable] mm/demotion: Assign correct memory type for multiple dax devices with the same node affinity References: <20220826100224.542312-1-aneesh.kumar@linux.ibm.com> <87a67j1uyk.fsf@yhuang6-desk2.ccr.corp.intel.com> Date: Thu, 01 Sep 2022 14:45:02 +0800 In-Reply-To: (Aneesh Kumar K. V.'s message of "Thu, 1 Sep 2022 11:54:42 +0530") Message-ID: <87y1v3zj81.fsf@yhuang6-desk2.ccr.corp.intel.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=ascii ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1662014716; a=rsa-sha256; cv=none; b=twfGUKAkzhglrTJfQeuQelSx/YiBc1UyWlg1tFNc6hWMqvwP3usBIOhzeY+KtFQnCdvvwk HATeXnuJ5xraQ3xlCp33SRml6KZq0eHsjNrcir8BUbcZOEAbHtb/7kfa9ctSSR06rGjDnX MCrlf4axbH5a0cue2A6elZETgNMyEeM= ARC-Authentication-Results: i=1; imf16.hostedemail.com; dkim=none ("invalid DKIM record") header.d=intel.com header.s=Intel header.b=IeE+755V; dmarc=pass (policy=none) header.from=intel.com; spf=pass (imf16.hostedemail.com: domain of ying.huang@intel.com designates 134.134.136.31 as permitted sender) smtp.mailfrom=ying.huang@intel.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1662014716; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=nRlDwbTU6kMsppPHIO22YZVeIWCaa3y3v+gJHwrVpBo=; b=7zHOVM4cMVEhIXduDzdtcIxsAkUCumtBIF8okdauZsbikbytlNkAsSVJP8LwfHdji47WVr EoGc+Wt7tFyeVlVinKQGv6dixxQ716RRmKkIplH/F0ZlOeA/Tmu2sy2ZM0MCOlgvQHZzn+ uIKWgJl7zZ+EZV2wacUspobXvvLgZdw= Authentication-Results: imf16.hostedemail.com; dkim=none ("invalid DKIM record") header.d=intel.com header.s=Intel header.b=IeE+755V; dmarc=pass (policy=none) header.from=intel.com; spf=pass (imf16.hostedemail.com: domain of ying.huang@intel.com designates 134.134.136.31 as permitted sender) smtp.mailfrom=ying.huang@intel.com X-Rspam-User: X-Rspamd-Server: rspam12 X-Stat-Signature: wt73sjao3tt9kdt8ishwepz6zhdbdn69 X-Rspamd-Queue-Id: 4809E18004D X-HE-Tag: 1662014715-992196 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Aneesh Kumar K V writes: > On 9/1/22 11:45 AM, Huang, Ying wrote: >> "Aneesh Kumar K.V" writes: >> >>> With multiple dax devices having the same node affinity, the kernel wrongly assigned >>> default_dram memory type to some devices after the memory hotplug operation. Fix this by >>> not clearing node_memory_types on the dax device remove. >> >> Sorry for late reply. >> >> Just for confirmation. There are multiple dax devices in one NUMA node? >> >> If you can show the bug reproducing steps, that will make it even easier >> to understand. >> > > NUMA nodes are assigned per region and you can have multiple devdax namespace with same NUMA node affinity. I think that the patch description will be clearer if we added the above line into it. > dax0.1 and dax0.2 are examples. To recreate you can follow the below steps > > > root@ubuntu-guest:/sys/devices/system/node/node3# ls > compact cpumap meminfo memory34 memory36 memory38 memory41 memory43 memory45 memory47 memory50 memory52 memory54 numastat uevent > cpulist distance memory33 memory35 memory37 memory39 memory42 memory44 memory46 memory49 memory51 memory53 memory55 subsystem vmstat > root@ubuntu-guest:/sys/devices/system/node/node3# > root@ubuntu-guest:/sys/devices/system/node/node3# for mem in memory*; do echo 0 > $mem/online; done > root@ubuntu-guest:/sys/devices/system/node/node3# cd /sys/bus/dax/drivers > root@ubuntu-guest:/sys/bus/dax/drivers# echo dax0.0 > kmem/unbind > root@ubuntu-guest:/sys/bus/dax/drivers# cd /sys/devices/system/node/node3/ > root@ubuntu-guest:/sys/devices/system/node/node3# ls > compact cpumap meminfo memory42 memory44 memory46 memory49 memory51 memory53 memory55 subsystem vmstat > cpulist distance memory41 memory43 memory45 memory47 memory50 memory52 memory54 numastat uevent > root@ubuntu-guest:/sys/devices/system/node/node3# for mem in memory*; do echo 1 > $mem/online; done Thanks a lot for detailed information. Best Regards, Huang, Ying