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 E18A5C54E67 for ; Wed, 27 Mar 2024 22:53:58 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 574B46B0088; Wed, 27 Mar 2024 18:53:58 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 4FD496B0089; Wed, 27 Mar 2024 18:53:58 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 39DBF6B008A; Wed, 27 Mar 2024 18:53:58 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 1C44A6B0088 for ; Wed, 27 Mar 2024 18:53:58 -0400 (EDT) Received: from smtpin10.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id CF5451605AE for ; Wed, 27 Mar 2024 22:53:57 +0000 (UTC) X-FDA: 81944323314.10.6EC6452 Received: from mail-yb1-f172.google.com (mail-yb1-f172.google.com [209.85.219.172]) by imf04.hostedemail.com (Postfix) with ESMTP id 097D84000E for ; Wed, 27 Mar 2024 22:53:55 +0000 (UTC) Authentication-Results: imf04.hostedemail.com; dkim=pass header.d=google.com header.s=20230601 header.b=XCDnjjT7; dmarc=pass (policy=reject) header.from=google.com; spf=pass (imf04.hostedemail.com: domain of yuanchu@google.com designates 209.85.219.172 as permitted sender) smtp.mailfrom=yuanchu@google.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1711580036; 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=ddFX6WA7Vse1WsWNG5JUtWurIddg/WeWShq3oKWotbI=; b=rW6l5i/IPwGMzI9Q5pZlYA0QrYen7/3LfYd8RZ2B/kF4IG+AkkTi6Sjxjvv8iwvnZWua2x hGqVa0FjSL+bqNtWyRzfrfVwbPVdmWXBCr5UFbN9o45PztWMrGSh4j42d7BJj/iLvdToXM JBWRYO0Km9KcAbe84fqV+PKqq/iahBQ= ARC-Authentication-Results: i=1; imf04.hostedemail.com; dkim=pass header.d=google.com header.s=20230601 header.b=XCDnjjT7; dmarc=pass (policy=reject) header.from=google.com; spf=pass (imf04.hostedemail.com: domain of yuanchu@google.com designates 209.85.219.172 as permitted sender) smtp.mailfrom=yuanchu@google.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1711580036; a=rsa-sha256; cv=none; b=6awtwQ5DrbDH300yjo1DsjOvPdrkiZQgheJhZm1cdPIIuNONJfFUAtxXazxqvrTFPdJZOD AA2to5Ggmcq8HlwmY5Uc00lSx8/+IoyfMG/+mw7FLkwTQYDExGnz6sDzTi+bahlEcnvZnL dUl4KQC8saLMEOuKNt71pSzzWebfPlU= Received: by mail-yb1-f172.google.com with SMTP id 3f1490d57ef6-dcbef31a9dbso260396276.1 for ; Wed, 27 Mar 2024 15:53:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1711580035; x=1712184835; 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=ddFX6WA7Vse1WsWNG5JUtWurIddg/WeWShq3oKWotbI=; b=XCDnjjT7n8WgVZFUk+9xfVVkSov4MXo2ujwnfIIVMIWnrA1l4vc3elX4L/suo9PrCl lRnbIi0+O23RSSjXrZ5cCu+J8jL9cMncKGTycG8lQQTVzUbUu4PjMIqB4h9WibBAb2Pl AC89gpJKPbO8ZpZuy/TkLAOusEYlOLhW8lPV4Nlb+JtT/psysNP5xC2lYCIKub021N8O Ur5YB59CzE5fMJt9jdHjEkWDjtLsFmlwaKZDR3t1loy7IeQMu+9g9/nlKmWxxVp+O6nt gWMNZDpeOgWSAZygEYKZUzUWaHtLG+waIYutqWixqdtO9RED5ifnWAh1sgKKZKWnhFWk QWpg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711580035; x=1712184835; 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=ddFX6WA7Vse1WsWNG5JUtWurIddg/WeWShq3oKWotbI=; b=xHJH06OTYtlTarTAiA9T9ThFgawJMpZU9SJkFLrZTUt1TowMlze83bcXgH/p3FMPV0 QZ5FIPizeS5QNQ0/ODCBQX/ndBT6LwPcm6TGlql0PsCg28XoXvjly2K1qSB7wRQkrVrH GrVWLewUmMbPg/LZ2L2lCLGBLr/wo8fiHbkTz4W5tnPnFTTHJZbj+f+wfhWN8quPTJHy RJyDNO2iyD+PAMt7Xx4FHrHsF7SwUDGBnRKjQx4+jGaQecAHI1oUACu7LTvy0DdoMKNu wINzEHm38Dhc7g6RFcVO62OnJ1cXD/tsPR5nxHM9WA/ZnKYCSvjTjwXP7NqTkIa9wOhh OwEw== X-Forwarded-Encrypted: i=1; AJvYcCU7WAWcfPWsGnxxtU+s3L9kEcz8a/NbrZ1UDonEr5AKBDnkhQF5iwxekvrbhvK14MGW3qA/K6cT5yS+hIHK5y62FaE= X-Gm-Message-State: AOJu0Yx73jXsSiONgMpnbO4sb34eOgRrQ3AX4djJsON3A0Kl5UiPGrI6 Pv/6vNzGftliBQFqrOfFS58HOlUjZ2pwHCbLz06y168JXLhSvFwpMp0T4km1fqwnrNyIIP8rnDt yA9XLa9ShvyCTUUjWl/sUdWT5Eo11rP3y/dXi X-Google-Smtp-Source: AGHT+IEEprNR4NF3Q3WnvLiotmlkp3Lt8bivSWWsO+fQy1wY94j5tqAZMqFwzhr1EI+Qy0IGP5aJU7WpBj2TgO+DJIY= X-Received: by 2002:a05:6902:136d:b0:dcc:97e4:bc61 with SMTP id bt13-20020a056902136d00b00dcc97e4bc61mr1324930ybb.57.1711580033859; Wed, 27 Mar 2024 15:53:53 -0700 (PDT) MIME-Version: 1.0 References: <20240327213108.2384666-1-yuanchu@google.com> In-Reply-To: From: Yuanchu Xie Date: Wed, 27 Mar 2024 15:53:39 -0700 Message-ID: Subject: Re: [RFC PATCH v3 0/8] mm: workingset reporting To: Gregory Price Cc: David Hildenbrand , "Aneesh Kumar K.V" , Khalid Aziz , Henry Huang , Yu Zhao , Dan Williams , Huang Ying , Wei Xu , David Rientjes , Greg Kroah-Hartman , "Rafael J. Wysocki" , Andrew Morton , Johannes Weiner , Michal Hocko , Roman Gushchin , Muchun Song , Shuah Khan , Yosry Ahmed , Matthew Wilcox , Sudarshan Rajagopalan , Kairui Song , "Michael S. Tsirkin" , Vasily Averin , Nhat Pham , Miaohe Lin , Qi Zheng , Abel Wu , "Vishal Moola (Oracle)" , Kefeng Wang , linux-kernel@vger.kernel.org, linux-mm@kvack.org, cgroups@vger.kernel.org, linux-kselftest@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 097D84000E X-Rspam-User: X-Rspamd-Server: rspam02 X-Stat-Signature: 7418fassx7fq8af561itt71gkp9o81bu X-HE-Tag: 1711580035-608622 X-HE-Meta: U2FsdGVkX1/RR/xrA+mJ0d2XAhkvzK4aCotQD/0HwKT5FnaDY2VEQ4Hprgd5N/Q/3Z/kgaPwGpNb7ganzD69aUqcG/uQh4Oc1ZHhKvU9mc3KQmgkyQzXhyxEVWnh2SH26QzRg1Gu3FsDUFa21gwXWwdDfRqk3ALFbIsxXIB76DV0FNBpEj5Dea7+cN0X70tDp7ga9dD2KaCkFoH16nYRXkW0w89Pz9M0P1NKT0P5Iq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KhLfmG80MaY/V5EI5uM5uRoTcY71krCjFqhiTNCYuY1bB++wBEnN7CEJeiMsr5pdBQzQDVbJk7SDK8xxLlWu0ur6qsg99KpGFDEE4zg84Q7XjdJClww 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 Wed, Mar 27, 2024 at 2:44=E2=80=AFPM Gregory Price wrote: > > On Wed, Mar 27, 2024 at 02:30:59PM -0700, Yuanchu Xie wrote: > > I realize this does not generalize well to hotness information, but I > > lack the intuition for an abstraction that presents hotness in a useful > > way. Based on a recent proposal for move_phys_pages[2], it seems like > > userspace tiering software would like to move specific physical pages, > > instead of informing the kernel "move x number of hot pages to y > > device". Please advise. > > > > [2] > > https://lore.kernel.org/lkml/20240319172609.332900-1-gregory.price@memv= erge.com/ > > > > Please note that this proposed interface (move_phys_pages) is very > unlikely to be received upstream due to side channel concerns. Instead, > it's more likely that the tiering component will expose a "promote X > pages from tier A to tier B", and the kernel component would then > use/consume hotness information to determine which pages to promote. I see that mm/memory-tiers.c only has support for demotion. What kind of hotness information do devices typically provide? The OCP proposal is not very specific about this. A list of hot pages with configurable threshold? Access frequency for all pages at configured granularity? Is there a way to tell which NUMA node is accessing them, for page promotio= n? > > (Just as one example, there are many more realistic designs) > > So if there is a way to expose workingset data to the mm/memory_tiers.c > component instead of via sysfs/cgroup - that is preferable. Appreciate the feedback. The data in its current form might be useful to inform demotion decisions, but for promotion, are you aware of any recent developments? I would like to encode hotness as workingset data as well. > > The 'move_phys_pages' interface is more of an experimental interface to > test the effectiveness of this approach without having to plumb out the > entire system. Definitely anything userland interface should not be > designed to generate physical address information for consumption unless > it is hard-locked behind admin caps. > > Regards, > Gregory