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 C746FC5478C for ; Tue, 5 Mar 2024 07:10:59 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 3BB0D6B0081; Tue, 5 Mar 2024 02:10:59 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 36C3C6B0082; Tue, 5 Mar 2024 02:10:59 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 20C7C6B0089; Tue, 5 Mar 2024 02:10:59 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 0F5AC6B0081 for ; Tue, 5 Mar 2024 02:10:59 -0500 (EST) Received: from smtpin23.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 2332D120DBE for ; Tue, 5 Mar 2024 07:10:54 +0000 (UTC) X-FDA: 81862113228.23.3F392E7 Received: from mail-ua1-f48.google.com (mail-ua1-f48.google.com [209.85.222.48]) by imf22.hostedemail.com (Postfix) with ESMTP id 77098C001E for ; Tue, 5 Mar 2024 07:10:51 +0000 (UTC) Authentication-Results: imf22.hostedemail.com; dkim=pass header.d=bytedance.com header.s=google header.b=Ni32Zy2H; dmarc=pass (policy=quarantine) header.from=bytedance.com; spf=pass (imf22.hostedemail.com: domain of horenchuang@bytedance.com designates 209.85.222.48 as permitted sender) smtp.mailfrom=horenchuang@bytedance.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1709622652; 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:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=Y36f7posl7ZMNySYHsTNdos9pSPjUErfBNricXfxXss=; b=vwkuRe4o63yYws6LEZsSTPnghgaTOwqRc0Ju2VZX72KVfE/oxXa3pNrt/n9AJl5ZH7okYi eXIeagbINXWSOeVyTqUqoLF4uwPiaAMzgGxOXi16ZBpLV6yE35gM/54VPlzJy4KLDGCd+8 dtlDxlQCa0+PALePmIdx47oUS/JxxiY= ARC-Authentication-Results: i=1; imf22.hostedemail.com; dkim=pass header.d=bytedance.com header.s=google header.b=Ni32Zy2H; dmarc=pass (policy=quarantine) header.from=bytedance.com; spf=pass (imf22.hostedemail.com: domain of horenchuang@bytedance.com designates 209.85.222.48 as permitted sender) smtp.mailfrom=horenchuang@bytedance.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1709622652; a=rsa-sha256; cv=none; b=rZVMNlqHscqGEgnnBn2PbGb+6p708aNk5bEbk2SQ0qDyy7tPh0JxaKcHmmAQsKSyzKc1SE Dz2+X461whvGoFHzK0ytKDqR/51+w27L803DY2Bju583Mczt7vBu7p3NQp8PZ0w60PBpAr S7eSJKn+xWkBR+oBj99XfCarqaOlCgE= Received: by mail-ua1-f48.google.com with SMTP id a1e0cc1a2514c-7dae66def19so1980656241.0 for ; Mon, 04 Mar 2024 23:10:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytedance.com; s=google; t=1709622650; x=1710227450; darn=kvack.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=Y36f7posl7ZMNySYHsTNdos9pSPjUErfBNricXfxXss=; b=Ni32Zy2HfZEgd2bOP3G9ux6uIbBFA5ort7fKh97v7FINYV8+S6t2xOkJZwreEaLhCy tWMDvYfWzG3nPfKJn3CHSaRS7fZBpHzwYb3DfnG0NZzB5LJ2/6ggIzXzYw/U3YO9/nbk LPZN66hC9+K9smzJt1bXW7ejK2Y4cc4860G2RcwEynR0LEwiViftA7tTiiDC5q0HwUkc 6TvSbG1D4GNsll7AKVtaQ06qqojCtUBVO4Yf5DqDIYpKLHmi4X2N53Mgt9HMC8v4VWJv WMxIN1s5jA9BEp8ENp50k79lYrN4hp0mWQBgjMjsb40CZ26WywGGNtJZ/MIELVWYIMfX o2Tw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709622650; x=1710227450; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Y36f7posl7ZMNySYHsTNdos9pSPjUErfBNricXfxXss=; b=BOfYD7TJfwtdwJ69Bd8wKgLEieoNzsoTVV9rNuvYzE4JXR7b54l40pnBD/rf6WheBM nP/eVk6b4qbyok5zMWwiL5eUaexzmqdglj4IFtDg/o5LkZNlY1kSJ+wLKXbXtIulqOL0 XF9OVJkxpesvFk3IZ1w+2Bz/F1LezArKL5IeEU0SJRvokFBhVA6PsdgHFlAlKJco4u0y o1FWaDx+S774HulfRaef/QXO/VuVphB0Lf/LaleD1OHWz4OWwkLo+eyZfrVj5abvHr+p QMnIf2S6aBaBAPdJnPZ12MtH9SAFptdbisQhG64fgh3KESwNhbuEQYaijwmy7f7yixIc 2OKQ== X-Forwarded-Encrypted: i=1; AJvYcCXYkXQl2MulFQRelgnYxyAUfKDprsUCtZYqFL9e2g9PU/XZieuI0/njrFICc6YPICdkJgjL55jhvloE4sSlyIyHliE= X-Gm-Message-State: AOJu0YxFoS3SKCVFKk7wrsTlESUCWhF/C+kQh3lROt8YPppaOxWrpgzG EN6/WU+0yjnB4nBzonwzeu2NfX/MT5IkFrgGrmYOw+WYHXOyogGjnuwDxyH5gHZoQcz2IB4WrAo QungQ/BnkikzjtLLS8TbsknpB9EBcdnOUz4JcAQ== X-Google-Smtp-Source: AGHT+IE7ZWEURNC7vMd05rp6rJaZD8Db0t4zZRyqV8oa+Hv15rpZuLuTzski8EfVy0sAWkUwbXcMNnQVkDKF9+6ak1A= X-Received: by 2002:a05:6102:160b:b0:471:c414:83b5 with SMTP id cu11-20020a056102160b00b00471c41483b5mr1203643vsb.18.1709622650347; Mon, 04 Mar 2024 23:10:50 -0800 (PST) MIME-Version: 1.0 References: <20240301082248.3456086-1-horenchuang@bytedance.com> <87frx6btqp.fsf@yhuang6-desk2.ccr.corp.intel.com> <87h6hl9og3.fsf@yhuang6-desk2.ccr.corp.intel.com> In-Reply-To: <87h6hl9og3.fsf@yhuang6-desk2.ccr.corp.intel.com> From: "Ho-Ren (Jack) Chuang" Date: Mon, 4 Mar 2024 23:10:39 -0800 Message-ID: Subject: Re: [External] Re: [PATCH v1 0/1] Improved Memory Tier Creation for CPUless NUMA Nodes To: "Huang, Ying" Cc: Gregory Price , aneesh.kumar@linux.ibm.com, mhocko@suse.com, tj@kernel.org, john@jagalactic.com, Eishan Mirakhur , Vinicius Tavares Petrucci , Ravis OpenSrc , Alistair Popple , "Rafael J. Wysocki" , Len Brown , Andrew Morton , Dave Jiang , Dan Williams , Jonathan Cameron , linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, "Ho-Ren (Jack) Chuang" , "Ho-Ren (Jack) Chuang" , linux-cxl@vger.kernel.org, qemu-devel@nongnu.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 77098C001E X-Rspam-User: X-Rspamd-Server: rspam04 X-Stat-Signature: 9dh43uptd1uyfckcc81ofjdqgju6qkru X-HE-Tag: 1709622651-721693 X-HE-Meta: U2FsdGVkX1+f5ZKLbdl8UrwW+JWGjUxdXukk1w8RTUZNQBc5gt1Jz1uZ3vU/HzY3m5JiuYiC5rc3I1ypozE6IUPSNn+7LtCzEnrCUeKSg60K0hgNvsLuFB6sArZhhAjvFYATPCYIZjmQ8OKh+hxB4HZJFG0mPCm5Q7r+Ygw3/WKm9MBxr2lnb3xO8+kDC84UKO0rGcBk9tRCutSV4jOPWaZcA2uAMt4Ys1ok9r75sSOECbN78MxGJSW3U8IFEenguoS3TgRiKkBGWLo/1o0Fl6HgPrWn3r+sHt4J0wMsY2Tu4dOv9317JKZzpTDEZ6WnvRnB5+bLLq2Tt6PIpvYzhxEsn6qZ4BYxhsfMg6ZU+6C3kLKo1Ro/aU0dip83Qo6Gdx6BzdB4U+45jpB8+1opDJEyT3TkRfVgYY5EtMShVO4wpYj84oj519Ja4kJiN4d78y1gvO5MeqDlap91nwddZlW3GCgS3vz3awn7U8CRBKsqqDShGgMaCV89ROxENG2LKrOkreHpooamaarRJaa8Zlk3RKJ5FKwn0HUx0AxO6RIW8aqSIeGU0dX9S7vO26RYsI20442Z9kz1mElmkKr/Fptg5OsP3NbA7UsVq5wAVlSZ++/bZ3rL5fIv0/Zy7Lhosldo0x2/Qgi6IwEqQRYiYl6XHy8WFw/0+aKX8AqPehDqXcjuYO68Gfz60uaFUdDk16E1QxzMkCiuVUyq+qd0m9xagcohGIiaqP17Gk4fMWotFQJftpIQAN3oe4RbtM8aPhHlm7FMYqj9bqiaLJutJRd1ff/dJe1oVrc1VDgDml0BSAhcfveqe8y5uhuCGZDeTtV1WYPzIpt7ttVPHxChoc9OoXsHdG81pBXygsUYOVVA7c6A7Wk6j1WGaRjRB1MRzlKx1mut+WiuMbs3FNz4woFpD5ZVylku6YVtvlN4oZ7kL7+0MAdiePM2oSTyD7NcDl337OyXv7d565C7qwY I8w== 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: List-Subscribe: List-Unsubscribe: On Mon, Mar 4, 2024 at 10:36=E2=80=AFPM Huang, Ying = wrote: > > "Ho-Ren (Jack) Chuang" writes: > > > On Sun, Mar 3, 2024 at 6:47=E2=80=AFPM Huang, Ying wrote: > >> > >> "Ho-Ren (Jack) Chuang" writes: > >> > >> > The memory tiering component in the kernel is functionally useless f= or > >> > CPUless memory/non-DRAM devices like CXL1.1 type3 memory because the= nodes > >> > are lumped together in the DRAM tier. > >> > https://lore.kernel.org/linux-mm/PH0PR08MB7955E9F08CCB64F23963B5C3A8= 60A@PH0PR08MB7955.namprd08.prod.outlook.com/T/ > >> > >> I think that it's unfair to call it "useless". Yes, it doesn't work i= f > >> the CXL memory device are not enumerate via drivers/dax/kmem.c. So, > >> please be specific about in which cases it doesn't work instead of too > >> general "useless". > >> > > > > Thank you and I didn't mean anything specific. I simply reused phrases > > we discussed > > earlier in the previous patchset. I will change them to the following i= n v2: > > "At boot time, current memory tiering assigns all detected memory nodes > > to the same DRAM tier. This results in CPUless memory/non-DRAM devices, > > such as CXL1.1 type3 memory, being unable to be assigned to the > > correct memory tier, > > leading to the inability to migrate pages between different types of me= mory." > > > > Please see if this looks more specific. > > I don't think that the description above is accurate. In fact, there > are 2 ways to enumerate the memory device, > > 1. Mark it as reserved memory (E820_TYPE_SOFT_RESERVED, etc.) in E820 > table or something similar. > > 2. Mark it as normal memory (E820_TYPE_RAM) in E820 table or something > similar > > For 1, the memory device (including CXL memory) is onlined via > drivers/dax/kmem.c, so will be put in proper memory tiers. For 2, the > memory device is indistinguishable with normal DRAM with current > implementation. And this is what this patch is working on. > > Right? Good point! How about this?: " When a memory device, such as CXL1.1 type3 memory, is emulated as normal memory (E820_TYPE_RAM), the memory device is indistinguishable from normal DRAM in terms of memory tiering with the current implementation= . The current memory tiering assigns all detected normal memory nodes to the same DRAM tier. This results in normal memory devices with different attributions being unable to be assigned to the correct memory ti= er, leading to the inability to migrate pages between different types of memory= . " -- Best regards, Ho-Ren (Jack) Chuang =E8=8E=8A=E8=B3=80=E4=BB=BB