Received: by 2002:ab2:620c:0:b0:1ef:ffd0:ce49 with SMTP id o12csp1069234lqt; Tue, 19 Mar 2024 11:38:48 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWh/p8QXu/qEZk86upN0yJ39nY38ptjT9sSGRykTSnu47kXN9jUkLG6HDjZqUtjbh3MzCgDtnS7SiaLGGYbT5szT8okDVLG2DnDYRO9Ig== X-Google-Smtp-Source: AGHT+IFOMHCvwo4F3HxB6SZg/IZAEE1KLTTVlkmKUf3/NGCo1Z7Q5/0NcJRSSCRxRdLCnBp3/1bk X-Received: by 2002:a05:6a00:18a0:b0:6e7:2e58:87c2 with SMTP id x32-20020a056a0018a000b006e72e5887c2mr6743550pfh.3.1710873528428; Tue, 19 Mar 2024 11:38:48 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710873528; cv=pass; d=google.com; s=arc-20160816; b=iHej33fOi5P4+daEyc1cc39l1H8490p13vbSs8Mha3YHlh3TSnPBDF1md4bwFqFf+Z rOH4fy8ZzBio7aivaS3UaKAetKCRJRPvw49V6fTZ+cSUcETzTQcXKH1vMiEqQS1vjcMg 3ugTX1UWoo8lj2bD3FmDGm6wGR4JLIluJwTYZwZGpZBWCO/VzFcOD4N1S/8FSzyDNm0l 37PuZIcRquePj7kpdT5K5aZb9LSaoJd2D75uXzoc4OlpaMnW4hBATn+hp5NYrRNoHnWI qKD/Zk4TDaUX9s3KIN97z1Vdhmjy4W+kgEBd6DL34wroGm6nRVl/VC088ZTB7d0pe7wl Xgtg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=ZnTbSyQ+3b0Xe1n8vMeKEDDL3zu+pgv6P5ioGToOLWc=; fh=jrvHgYiy77lDiIcih8aVJlpO7vfgPZj761CEB2LFGp0=; b=UpSfObWW5FmDjAunewFyNvqENfeDMOY5QH2mv+PKdM37tsDskKErB6wGeU+Syi6NCN rLjiUaMG9rXgZPZ/ZFTYZbOF6G4zWRnUWSW0yxmxWBGAGqoxrEZlnDFanzPnW5K/8moF nvY2y+IJyG3gZOdkWAcuvryhWiajUP6Sl1M01plkcMspO5AFKc/sHgd/lDUpmObIY9O2 Yg5iSiYiuHz1lIFU9q5a0Raq7y/E9M98iPkIomYHdvmAQOR9Iu+UOs6bTQSm7/4Sa7Vs ko/6yW8F3m4oTIJnjb3pOpuOudNC5QkacjTmvmzLaAwBI3Wn+xChYUD0RzN/0OW68lzd vFpw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=IOf0HdNd; arc=pass (i=1 dkim=pass dkdomain=infradead.org); spf=pass (google.com: domain of linux-kernel+bounces-108028-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-108028-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id h12-20020a056a00000c00b006e6fdb8f0b5si8618344pfk.265.2024.03.19.11.38.48 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Mar 2024 11:38:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-108028-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=IOf0HdNd; arc=pass (i=1 dkim=pass dkdomain=infradead.org); spf=pass (google.com: domain of linux-kernel+bounces-108028-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-108028-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 1061F284FCB for ; Tue, 19 Mar 2024 18:38:48 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E04B539ACC; Tue, 19 Mar 2024 18:38:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="IOf0HdNd" Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3E7EA3A1D8; Tue, 19 Mar 2024 18:38:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=90.155.50.34 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710873511; cv=none; b=CNSCrTFp/KCo62aS0hGd0Iu2bAiu4EBq9d3Meo/rpjRntyJTeprSYCYyrzB+6Ilnad1HFgXMx2cueNO35L6AjmISA5FnBJRWsSQx1N5z47v6skSTgO2pdpx7SKR232QgXRtyJJJnVaEEUIgNbbW8jWJleFpplThBrv320t7QhtA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710873511; c=relaxed/simple; bh=GXwswoYv9U8DBj4pX6EMIE6f8CmqCoXFdq9sUHFNXfo=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Ohle9ZofCXkwjot+1REHo9sAYj/v+c2EwdUVsF4EmAP3J8+Sr5Q/E9LoeUwgJW1dgNHho9lGgnBTfBgvENvziYf4MADvatuegZdAQd1MSzbRJi2JfHqECuBGCa2NZeYlug2e8R+61asNsd0JxRg+3gJf1SROhd2OdcLLZm9e2LM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org; spf=none smtp.mailfrom=infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=IOf0HdNd; arc=none smtp.client-ip=90.155.50.34 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=infradead.org 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> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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.