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 EBD1FC0218A for ; Sat, 1 Feb 2025 16:30:32 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 355BA6B007B; Sat, 1 Feb 2025 11:30:32 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 3051B6B0082; Sat, 1 Feb 2025 11:30:32 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 1CD836B0083; Sat, 1 Feb 2025 11:30:32 -0500 (EST) 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 F3BD96B007B for ; Sat, 1 Feb 2025 11:30:31 -0500 (EST) Received: from smtpin21.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 7AE371C7FFB for ; Sat, 1 Feb 2025 16:30:31 +0000 (UTC) X-FDA: 83071913862.21.2F5BB96 Received: from mail-qk1-f173.google.com (mail-qk1-f173.google.com [209.85.222.173]) by imf28.hostedemail.com (Postfix) with ESMTP id 6DEA3C000C for ; Sat, 1 Feb 2025 16:30:29 +0000 (UTC) Authentication-Results: imf28.hostedemail.com; dkim=pass header.d=gourry.net header.s=google header.b=jcI4cj4k; spf=pass (imf28.hostedemail.com: domain of gourry@gourry.net designates 209.85.222.173 as permitted sender) smtp.mailfrom=gourry@gourry.net; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1738427429; 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=uAzsil3k1tj1Q2KIFJPbu6aJ0Yupqtm9Xx7vSO2xF9Q=; b=FW0lfQdul7mqy82pEqtExANGDnyp3tHWV7S/mB1xDe7kYsBYIEdipKrKCZYXM98Vk/yt5d WdOvmXRkomjJMfZZqyUkjlbms6pgqrdBapru+/3BJgTX6fgIpGAtOObqAm8PbFOpFjqTYm R8WLltYH9q+JO5ofj1QGYEJqn3lUrdo= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1738427429; a=rsa-sha256; cv=none; b=AKevggoN/aqO/+l4nOmiEysaeUERCl05quuH8hVaM4bRqkx7RX2e2kUwPdqL/tfKfREZYC VTlOAKxyvdtqlRam9emBkg66GrAD0u/bdMG367nncXWuplGGkbEEUZFggwUAnNM06vkYGL U5TOIJrKCZI21JzixXgQzZii8pccKGs= ARC-Authentication-Results: i=1; imf28.hostedemail.com; dkim=pass header.d=gourry.net header.s=google header.b=jcI4cj4k; spf=pass (imf28.hostedemail.com: domain of gourry@gourry.net designates 209.85.222.173 as permitted sender) smtp.mailfrom=gourry@gourry.net; dmarc=none Received: by mail-qk1-f173.google.com with SMTP id af79cd13be357-7b6c3629816so160220585a.1 for ; Sat, 01 Feb 2025 08:30:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gourry.net; s=google; t=1738427428; x=1739032228; darn=kvack.org; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to; bh=uAzsil3k1tj1Q2KIFJPbu6aJ0Yupqtm9Xx7vSO2xF9Q=; b=jcI4cj4krqh2m/bzyYo1zP0E3Hw3/pXCtv9H+KzNmG87mrzO+0ourb6B8sNGfixd4w 1egpc73bFpkxStMyzcG5Vqhsgr5JUgiz3TRvA1I+UmcvaKQ08J/EQ2BWfe73X84vFNwQ G5Hg+achy6j1q87DiGSC5DjVBDlJ/d7mEQu57gC8GEPpie4NvT9G84wSrGbHOTuZ0SSX RNMim6bawP1U5YDqp6J7GOeqbENoeHuAAz1nz1dZjrhQHa4B0AT1t5M7LK0RZMrmTgXn kjrhPT86S49Mgl7nbGNqBNRXWKfugbz6xp0QCX6R+TT56mRf+z40hRTrnFcLH+P+cBVX CBIg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1738427428; x=1739032228; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=uAzsil3k1tj1Q2KIFJPbu6aJ0Yupqtm9Xx7vSO2xF9Q=; b=lDbhwOz7rs54kJhncnFjDQ4YLqCspM5TtoWFbVwQ2EmRrrht/KcqOFZU8HwaBOLcDI rYaM9r159UiOG20N1WancpmveIIhy50pPcxBX+OuPOETpavM8vc5UITXBTxUMdWYe2KH /3vmpR7uNfSFSTJ1vwzfpFpcasvOPkJ/U78OPSshEY2bKDkn+Ikrf/tHlbiEf8etDBte +F9Bj362zuaui4uRuS/jNBXT7q27PnO09+Gx1BdQzBr3y40n8MTkCZe/VZmodTQp/rAp Q+ln/YJW4dv4GWHkijdxwUU6LYhsq/YAoeuFULS1g4x8DSUhAu9ZnoY2TkDfk9EZuo3W YN9A== X-Forwarded-Encrypted: i=1; AJvYcCWjAfzg3tGikLFl6PJTZcbETXF3zu09SQ5DdKyrs+pg/7V1onBH/mnBpUTO00BmHMHNo3Y+ew3BUg==@kvack.org X-Gm-Message-State: AOJu0YznKx2P09VwzJ+ve1TKwGegcigxYTXfYu6SkC6HifdKtFxDyfa4 wOVzkk2aBLQ1wCPZ+dxj4TXrvZCZkW76oAjtBfOiQnsyt4NgEvQKXg64e8B5W2w= X-Gm-Gg: ASbGncunmdD4qhTyH+GyPXcvxps6pPFdyA+Ck97kYoGPHGBSg0X26jxhKKJIiA/7YiD P8FDSp4J33V3GH1LZKbMxhWBUSIfvDeZ8Mqli+anOqgOy/mKPBrdlVvvtUSHmkSchcRSeczFAnQ qNrJKdr5JT7GG09oW2bxLyLHB2bbJqzmaUcaCK5Q6pvndDPjWCILsB+pSKiAHENApG0VB2IK3xd Dx6wWRX0KeTRHYUZ3pE5cqAorENCbybWbuL/L7VnQ24QxG0dwYBz+nH0Keeu+bmiSTqdyF0tq3S NehfvVl0SLAYgerHetlznzTHg3GQ6Ekd+0OtA0PVDVgY7eVZmcG/gIzr9UFpcvtSrGbcZa62xA= = X-Google-Smtp-Source: AGHT+IHypOupMAohvtLd8qmhgQw96htPpaIcdH8DHr/zDJCnHZKVa/m1oxXQ49DS4TdDJ00x9k3/3w== X-Received: by 2002:a05:620a:244f:b0:7b6:cfab:9883 with SMTP id af79cd13be357-7bffccc97dbmr2417712785a.8.1738427427928; Sat, 01 Feb 2025 08:30:27 -0800 (PST) Received: from gourry-fedora-PF4VCD3F (pool-173-79-56-208.washdc.fios.verizon.net. [173.79.56.208]) by smtp.gmail.com with ESMTPSA id af79cd13be357-7c00a8d95cdsm311440285a.56.2025.02.01.08.30.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 01 Feb 2025 08:30:27 -0800 (PST) Date: Sat, 1 Feb 2025 11:30:24 -0500 From: Gregory Price To: Hyeonggon Yoo <42.hyeyoo@gmail.com> Cc: Matthew Wilcox , lsf-pc@lists.linux-foundation.org, linux-mm@kvack.org, linux-cxl@vger.kernel.org, Byungchul Park , Honggyu Kim Subject: Re: [LSF/MM/BPF TOPIC] Restricting or migrating unmovable kernel allocations from slow tier Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Rspamd-Queue-Id: 6DEA3C000C X-Stat-Signature: qw1sbaccri7bca855t1dx86yrno4eepe X-Rspam-User: X-Rspamd-Server: rspam12 X-HE-Tag: 1738427429-513235 X-HE-Meta: U2FsdGVkX1/NrcyiTX11r0pQtQJo+TNQ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xHo2SHeGtKqKPg4ueYfK7h5LDhs5c8wTUxJy6/57sN+aSw0oiMdFJ6UArIHjwMf2XuQyl/Pihud5xPeRe7yk9GNPWObXdkJbU11TTRfn7yoVvJSSKufQO5Vu+pvOVMLIdrwSJKZgUYjkRjrc4GxQrWcBz+Z0dFyU17WQyo322DCUDchR5dC9qvol+Hv8wLbu2HPlkVvC1HZ5CN5J+VoK5cGtwZtvm9TH8utU5kXOsJ014rYnny6eWwE87s2S1EaBxW/FMPoPey1qkwIA4agWJzdQkvGAcm2VLHMdoh03AYFQNCUx/LZgYI8RKjjFSa07cKeWq8V5Yexrd4s7qWl5fy/PndYRlzhsDtrHM/KEmmRrkzX7ZG9ovCCR/VMGiQuum5MnmAmSNXIwrzZ7t68K+oSQQVGL5b4D5LQf6nB6QPoqbIK4tw== X-Bogosity: Ham, tests=bogofilter, spamicity=0.046328, 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 Sun, Feb 02, 2025 at 12:13:23AM +0900, Hyeonggon Yoo wrote: > On Sat, Feb 1, 2025 at 11:04 PM Matthew Wilcox wrote: > > This all seems like a grand waste of time. Don't do that. Don't allow > > kernel allocations from CXL at all. Don't build systems that have > > vast quantities of CXL memory (or if you do, expose it as really fast > > swap, not as memory). > > > > Hi, Matthew. Thank you for sharing your opinion. > > I don't want to introduce too much complexity to MM due to CXL madness either, > but I think at least we need to guide users who buy CXL hardware to avoid > doing stupid things. > > My initial subject was "Clearly documenting the use cases of > memhp_default_state=online{,_kernel}" because at first glance, > it was deemed usable for allowing kernel allocations from CXL, > which turned out to be not after some evaluation. > This was the motivation for implementing the build-time switch for memhp_default_state. Distros and builders can now have flexibility to make this their default policy for hotplug memory blocks. https://lore.kernel.org/linux-mm/20241226182918.648799-1-gourry@gourry.net/ I don't normally agree with Willy's hard takes on CXL, but I do agree that it's generally not fit for kernel use - and I share general skepticism that movement-based tiering is fundamentally better than reclaim/swap semantics (though I have been convinced otherwise in some scenarios, and I think some clear performance benefits in many scenarios are lost by treating it as super-fast-swap). Rather than ask whether we can make portions of the kernel more ammenable to movable allocations, I think it's more beneficial to focus on whether we can reduce the ZONE_NORMAL cost of ZONE_MOVABLE capacity. That seems (to me) like the actual crux of this particular issue. ~Gregory