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 0E344C54E71 for ; Tue, 19 Mar 2024 18:38:32 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 635986B0085; Tue, 19 Mar 2024 14:38:31 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 5E5B66B008A; Tue, 19 Mar 2024 14:38:31 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 4D5126B008C; Tue, 19 Mar 2024 14:38:31 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 3F0C66B0085 for ; Tue, 19 Mar 2024 14:38:31 -0400 (EDT) Received: from smtpin29.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id 0B4A31408F4 for ; Tue, 19 Mar 2024 18:38:31 +0000 (UTC) X-FDA: 81914649222.29.CF77905 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf21.hostedemail.com (Postfix) with ESMTP id 296741C0005 for ; Tue, 19 Mar 2024 18:38:28 +0000 (UTC) Authentication-Results: imf21.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=IOf0HdNd; dmarc=none; spf=none (imf21.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1710873509; 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=ZnTbSyQ+3b0Xe1n8vMeKEDDL3zu+pgv6P5ioGToOLWc=; b=Z8hjzWp+W45F1/GscHFSY7uyO/TKp4AfQPTs/dn3gHAl14bSp+6o1ZTzo/x/v11N12DaBy NmeMUJBPjMC9qJoUa3dD1A5DohuW6IzdpQTSDOPCZ4drokFBk3rtMQBW4IGiUFg/n4L3HD /9/SwXgHbL0p2dxWVLtm3omoR7yL3U0= ARC-Authentication-Results: i=1; imf21.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=IOf0HdNd; dmarc=none; spf=none (imf21.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1710873509; a=rsa-sha256; cv=none; b=iP1/CDI2R+EAy1qA5VkbH59ZPH8fOtqzc9EUAhEZ3n2Eo3T8V1kwdUOTKHiZFimI9nSHoq O68f03GlIvnBfpx12Q/eJd334pQp60QYCtyv1U590jWFmimwBg8efh8xXN3plb/OpcDZlg r/CdFoOdcUhmOye5120LanS4SCsbOLY= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=ZnTbSyQ+3b0Xe1n8vMeKEDDL3zu+pgv6P5ioGToOLWc=; b=IOf0HdNdfe2DRHA61K6l5rZVg2 bdPnLbBdeu7eicia0t7lJUpSvZj0snFu1o2hiqWFmclJVRbor6nLsw4Jr7kw6XNBLAPuXew+qB7aH ZdqTOsNZSRiAIKuH8958G7nz6Zs1aPO0AGUQJZcqAO700H3GCaCIR7U2MklhSN8Taws10z+zB6c3t 0Eh26oPqUam4oZR7oLPxcj/N3CA1+YCHB8REn0R0eXpLDMEC/EYNBsIECTb1XICSKXix0XxMunAQv E1mV9DVakUrE/Z93KPA4beNtqaWgCDHLC7WzVNsv49LbNAHZrP4FJ+Wl3JnTUUEz2qnSRYOiP19UC cYPFIjuQ==; Received: from willy by casper.infradead.org with local (Exim 4.97.1 #2 (Red Hat Linux)) id 1rmeLv-00000002W4q-1oCi; Tue, 19 Mar 2024 18:38:23 +0000 Date: Tue, 19 Mar 2024 18:38:23 +0000 From: Matthew Wilcox To: Gregory Price Cc: Gregory Price , linux-mm@kvack.org, linux-api@vger.kernel.org, linux-arch@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, ying.huang@intel.com, dan.j.williams@intel.com, honggyu.kim@sk.com, corbet@lwn.net, arnd@arndb.de, luto@kernel.org, akpm@linux-foundation.org, shuah@kernel.org Subject: Re: [RFC v3 3/3] ktest: sys_move_phys_pages ktest Message-ID: References: <20240319172609.332900-1-gregory.price@memverge.com> <20240319172609.332900-4-gregory.price@memverge.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Rspamd-Queue-Id: 296741C0005 X-Rspam-User: X-Rspamd-Server: rspam02 X-Stat-Signature: zma59rur38pyjmaamb5oojd1q9hm9n1a X-HE-Tag: 1710873508-727571 X-HE-Meta: U2FsdGVkX1/czOHdsaYUByVqLjbsJK8YsUbcVrV62gQ/4x7eLTJbAek7iE3ffMa85Fa0GjL3UMnBzGn0iB7gG66+mBv78KiBMkUQG2BOwuCGAltxUNIdXzuYOmF1w4Us+1AED7JGaNVqJx18ciAQq7+kNwOtdKiZ0VAxKF6tFLbqwA7NgpNVZj3WlDVvgJOPf5cKET5noMq/cvl4eKfXi+xucm2pAzH3jsGEqgojxvfGOFswjOb2G6RUXN/lf8WJwtI8O/leP6NNXP3TRoDdleOGZn4nj2rU3prjk8bPWpMR35JlLqrCjJO3ii/NeXrrYIbEUpHjfiJAju2Jn/o2qMlEIhwwe36B+Zq+w02Nmz+6OZ4K6iPfWuTYBof3MaLithztVvfCWVjkE5wr7Mj8D3K+V0pv18JjN5+GviLs7qI3CjR9m4fHyw9xJ7uF0YbnukJKxErXadB/nGqkcs2ADIO4ETkRWUMYc3KnMx6Bj/kilDcNWc3koKyhjx91MMPgnRMHw3ymolX5mTSCz60jqR8jMui6iGYTH0p3I1oWA/jU8soKX1IlEboba8q6ohp5140/EIMgPQDZRXhC3wpt83vsUqeJnCslLDiRKsxs26OiREF1rWuwnXvuCQtuZjpWKZxC4ptpHfuzX5Cx5frnsqH/M3IEXFK3tByKHbwS3hPeRU7Z8oCBWUYxv9G/dhWagQdWjG1HoW/dpxrYN/hXwUBlSZxikWtcOTKimiVOn0DOqS+IH3pOCR/+EEP7hUTaOGlHdoOx4bMSr8OdVCcCKbJ8+NGUnVyaV9Qn0ISUv9u/wMSYiNLO7R+QidfUY+xJyu0O6uojchUKEE73BM5Coca4C+VOjHNC3aWdFwOrlW6b5t4GUu4E+20/B+oVIaiaireLI85AGFizXa7/XC2vCFTxbxOoqKIUP2zx27LcokdDT81Rpx7n2GCleaplrEMVmk5OF+jMELltV1jGvAm o0XD3HUN XbzXMN58rycfHYHo9vyv1kGACoHwDYEDNqLg36xGmCOMZyHqwvitcSNO30MqOQy5WESBQlNw1t71g5gWTfMqvw2XbS1vZ8Bf10ICTCA6UYBXs5LXl2Yr7gr/XQHZpvm4FYwuw2rHUtZu3Mr+v0FfcjAZ+D2Wn6+YVidCyjOmGSimedKD0bWtt+iD9HkrvIc7jZBPb3DebtLoa09IAXj4WU5MwosqLGaKCFDSxJSpn5CPzf2+pc5sfkJyAzp3qeIi4z7ha4YFa4H9/WtZbWTVfkFE3QaA0ycwf8qY/jE4LD9SGSS9fPgT16BMVL3E6/FZoM8I0 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 Tue, Mar 19, 2024 at 02:32:17PM -0400, Gregory Price wrote: > On Tue, Mar 19, 2024 at 06:20:33PM +0000, Matthew Wilcox wrote: > > On Tue, Mar 19, 2024 at 02:14:33PM -0400, Gregory Price wrote: > > > On Tue, Mar 19, 2024 at 05:52:46PM +0000, Matthew Wilcox wrote: > > > > On Tue, Mar 19, 2024 at 01:26:09PM -0400, Gregory Price wrote: > > > > > Implement simple ktest that looks up the physical address via > > > > > /proc/self/pagemap and migrates the page based on that information. > > > > > > > > What? LOL. No. > > > > > > > > > > Certainly the test is stupid and requires admin, but I could not > > > come up an easier test to demonstrate the concept - and the docs > > > say to include a test with all syscall proposals. > > > > > > Am I missing something else important? > > > (stupid question: of course I am, but alas I must ask it) > > > > It's not that the test is stupid. It's the concept that's stupid. > > Ok i'll bite. > > The 2 major ways page-hotness is detected right now is page-faults > (induced or otherwise) and things like IBS/PEBS. > > page-faults cause overhead, and IBS/PEBS actually miss upwards of ~66% > of all traffic (if you want the details i can dig up the presentation, > but TL;DR: prefetcher traffic is missed entirely). > > so OCP folks have been proposing hotness-tracking offloaded to the > memory devices themselves: > > https://www.opencompute.org/documents/ocp-cms-hotness-tracking-requirements-white-paper-pdf-1 > > (it's come along further than this white paper, but i need to dig up > the new information). > > These devices are incapable of providing virtual addressing information, > and doing reverse lookups of addresses is inordinately expensive from > user space. This leaves: Do it all in a kernel task, or give user space > an an interface to operate on data provided by the device. > > The syscall design is mostly being posted right now to collaborate via > public channels, but if the idea is so fundamentally offensive then i'll > drop it and relay the opinion accordingly. The syscall design is wrong. Exposing physical addresses to userspace is never the right answer. Think rowhammer. I'm vehemently opposed to all of the bullshit around CXL. However, if you are going to propose something, it should be based around an abstraction. Say "We have 8 pools of memory. This VMA is backed by memory from pools 3 & 6. The relative hotness of the 8 pools are . The quantities of memory in the 8 ppols are ". And then you can say "migrate this range of memory to pool 2". That's just an initial response to the idea. I refuse to invest a serious amount of time in a dead-end idea like CXL memory pooling.