Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp9124273ioo; Sun, 5 Jun 2022 05:50:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw8iZOkL2IbqSEm7Ryr3gpiqN0tvlMHHq/OgffkEliVw0QhCSoOY14ZmLqURcNIKim/opWg X-Received: by 2002:a17:902:7582:b0:162:1131:23c2 with SMTP id j2-20020a170902758200b00162113123c2mr19512974pll.83.1654433442701; Sun, 05 Jun 2022 05:50:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654433442; cv=none; d=google.com; s=arc-20160816; b=kOowEF8xpjuM/I8C7eFnhVVnnUGHn5iRn6bwkDK42ppRYV3vTtU4/ZaQcp19Oeyihk MDt1ZfSsZON90E9+jU6awK0p3kFlMMjxacFRqI6S54hPSQU5TD5JiZwxpF0Rt36vNnED 7L2wOoy+xy2Bb0sPnPwUMTJjvmixZ7U38cqkfCJAvQZG9oiVuNAwU1ORjxR7vbYFP76T I6JNVsZY8+LIhbu/SZ6sG62+W6wWLe/eH7ZbU8WO4hWboFPs/GxUpHrmGDaOkQdqhJna Lg+mPbooW9muZI8tNETEeiU6u6GEL9v8gTb5F4gQXQKjy6OPmt9HL5mltvwn9KN2/q4a 4HMQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=fkgjiBbvfssojcLQ5Xrtaf/b+dhAnuUhltuZxxE14dI=; b=YwiS2dabeNNP642LtiFNrVJ5ObfUjoCLxAn0Z+NGCnYWM74rg4l5Fvf4KNejRjZp3C k682JauEr9uCnJnx8lNDyZeOwFpVKlLKEuBx5pcY1XdGMA4v1vRC3gECNZtR7SpOMbPW CxtcLN7bDzY81qghwNivkxpU2Sz5nhSzVZHIVIF6WaGQVwMyJoiUtdou7p4cJwJFgwEP mY307MrEkATFUm+SaaZX1Ny07U4Uf6USdbB8gjqc8Bd43y103Q/MefIi+XM4R2volBWn rQvWizlVVS9Bs4kN5UFRXJ3GConWBtqayUolE/sUktaVLlgGRvOpoAP9se3TplX4tY9n irDg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=Wnm87g9c; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d17-20020a056a0010d100b0051beb7365b5si8040413pfu.355.2022.06.05.05.50.29; Sun, 05 Jun 2022 05:50:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=Wnm87g9c; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239181AbiFCJFH (ORCPT + 99 others); Fri, 3 Jun 2022 05:05:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49040 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229761AbiFCJFF (ORCPT ); Fri, 3 Jun 2022 05:05:05 -0400 Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0670A381B1 for ; Fri, 3 Jun 2022 02:05:04 -0700 (PDT) Received: from pps.filterd (m0098419.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 2536DNMu018802; Fri, 3 Jun 2022 09:04:44 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=message-id : date : mime-version : subject : to : cc : references : from : in-reply-to : content-type : content-transfer-encoding; s=pp1; bh=fkgjiBbvfssojcLQ5Xrtaf/b+dhAnuUhltuZxxE14dI=; b=Wnm87g9cv/OXyRG2iPsmT0vdxsFSuIvKeOHM8JuM/Qxtjh6f6JvoPBQAhgn9nK9Kl+30 YicjWWZLTm2D/g3IjKTWANv7vp5Zwt9rQhU56OySYx2e0RmNv3M2v1qFw7Yoy9EC5s7d G7t8UokrZs60Zi0hKzI5p1eE4ypTnzIhjXJZ25dgyQBM/KX6RMCl/otn8/xjLpOYAAeu P0etDZTOeCt81w0yAixagmYRzpSJRcLqi7p4c0dKJN6qNQ7lJcljLyaFs9JbMCHxVSfp qK3Pr8gRfizOC5hSCBSZNEeJT97S2Lbx5VSg76re2EXXNWUG/ibyd9UW7/IbnMs1oTo9 wA== Received: from pps.reinject (localhost [127.0.0.1]) by mx0b-001b2d01.pphosted.com (PPS) with ESMTPS id 3gfcu8jss1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 03 Jun 2022 09:04:44 +0000 Received: from m0098419.ppops.net (m0098419.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 2538usfW020405; Fri, 3 Jun 2022 09:04:43 GMT Received: from ppma04ams.nl.ibm.com (63.31.33a9.ip4.static.sl-reverse.com [169.51.49.99]) by mx0b-001b2d01.pphosted.com (PPS) with ESMTPS id 3gfcu8jsrg-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 03 Jun 2022 09:04:43 +0000 Received: from pps.filterd (ppma04ams.nl.ibm.com [127.0.0.1]) by ppma04ams.nl.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 2538pqgb014509; Fri, 3 Jun 2022 09:04:41 GMT Received: from b06cxnps4074.portsmouth.uk.ibm.com (d06relay11.portsmouth.uk.ibm.com [9.149.109.196]) by ppma04ams.nl.ibm.com with ESMTP id 3gbcae85bu-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 03 Jun 2022 09:04:41 +0000 Received: from d06av22.portsmouth.uk.ibm.com (d06av22.portsmouth.uk.ibm.com [9.149.105.58]) by b06cxnps4074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 25394doC44302756 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 3 Jun 2022 09:04:39 GMT Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 0ED5A4C044; Fri, 3 Jun 2022 09:04:39 +0000 (GMT) Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id C18B34C046; Fri, 3 Jun 2022 09:04:32 +0000 (GMT) Received: from [9.43.93.173] (unknown [9.43.93.173]) by d06av22.portsmouth.uk.ibm.com (Postfix) with ESMTP; Fri, 3 Jun 2022 09:04:32 +0000 (GMT) Message-ID: Date: Fri, 3 Jun 2022 14:34:31 +0530 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.10.0 Subject: Re: [RFC PATCH v4 4/7] mm/demotion/dax/kmem: Set node's memory tier to MEMORY_TIER_PMEM Content-Language: en-US To: Bharata B Rao , linux-mm@kvack.org, akpm@linux-foundation.org Cc: Huang Ying , Greg Thelen , Yang Shi , Davidlohr Bueso , Tim C Chen , Brice Goglin , Michal Hocko , Linux Kernel Mailing List , Hesham Almatary , Dave Hansen , Jonathan Cameron , Alistair Popple , Dan Williams , Feng Tang , Jagdish Gediya , Baolin Wang , David Rientjes References: <20220527122528.129445-1-aneesh.kumar@linux.ibm.com> <20220527122528.129445-5-aneesh.kumar@linux.ibm.com> <5706f5e9-0609-98c9-a0cd-7d96336d73dd@amd.com> <8e651a1e-d189-3e8a-438f-298f21402bd2@linux.ibm.com> From: Aneesh Kumar K V In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 X-Proofpoint-GUID: oSx9HJET7Gpw0PQRshfj_d5cI9DoJaRx X-Proofpoint-ORIG-GUID: kEMdneNsbdlx1A764xvy2vRfXW557sLJ X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.874,Hydra:6.0.517,FMLib:17.11.64.514 definitions=2022-06-03_02,2022-06-02_01,2022-02-23_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 impostorscore=0 suspectscore=0 clxscore=1015 mlxscore=0 mlxlogscore=999 lowpriorityscore=0 malwarescore=0 spamscore=0 bulkscore=0 adultscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2204290000 definitions=main-2206030039 X-Spam-Status: No, score=-3.3 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 6/2/22 12:06 PM, Bharata B Rao wrote: > On 6/1/2022 7:19 PM, Aneesh Kumar K V wrote: >> On 6/1/22 11:59 AM, Bharata B Rao wrote: >>> I was experimenting with this patchset and found this behaviour. >>> Here's what I did: >>> >>> Boot a KVM guest with vNVDIMM device which ends up with device_dax >>> driver by default. >>> >>> Use it as RAM by binding it to dax kmem driver. It now appears as >>> RAM with a new NUMA node that is put to memtier1 (the existing tier >>> where DRAM already exists) >>> >> >> That should have placed it in memtier2. >> >>> I can move it to memtier2 (MEMORY_RANK_PMEM) manually, but isn't >>> that expected to happen automatically when a node with dax kmem >>> device comes up? >>> >> >> This can happen if we have added the same NUMA node to memtier1 before dax kmem driver initialized the pmem memory. Can you check before the above node_set_memory_tier_rank() whether the specific NUMA node is already part of any memory tier? > > When we reach node_set_memory_tier_rank(), node1 (that has the pmem device) > is already part of memtier1 whose nodelist shows 0-1. > can you find out which code path added node1 to memtier1? Do you have regular memory also appearing on node1? -aneesh