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 0AB0DC71136 for ; Fri, 13 Jun 2025 16:02:39 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 9E3636B0092; Fri, 13 Jun 2025 12:02:38 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 96C4B6B0093; Fri, 13 Jun 2025 12:02:38 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 85B5F6B0095; Fri, 13 Jun 2025 12:02:38 -0400 (EDT) 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 69D9B6B0092 for ; Fri, 13 Jun 2025 12:02:38 -0400 (EDT) Received: from smtpin17.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id E785A160B17 for ; Fri, 13 Jun 2025 16:02:37 +0000 (UTC) X-FDA: 83550845154.17.AABD07C Received: from mail-ej1-f49.google.com (mail-ej1-f49.google.com [209.85.218.49]) by imf26.hostedemail.com (Postfix) with ESMTP id B392A140006 for ; Fri, 13 Jun 2025 16:02:35 +0000 (UTC) Authentication-Results: imf26.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=L864BeDc; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf26.hostedemail.com: domain of bijan311@gmail.com designates 209.85.218.49 as permitted sender) smtp.mailfrom=bijan311@gmail.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1749830555; a=rsa-sha256; cv=none; b=b6z4PlmubxM9gNJXRjduBuvZ71Tt/Asz8Q05wT33XMFbzSoiYPTqYP9C25PdoS6J62YAiX ds4FqWjgsjFIQLwNAVKSc6Lr/YBSzgGyGrvm2M7pZmYqWP28/ZxDwPxcCEYw7O+w4YIoB5 nbtIF1gVHy6dIrqkmXtmmw8AkDyvvtk= ARC-Authentication-Results: i=1; imf26.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=L864BeDc; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf26.hostedemail.com: domain of bijan311@gmail.com designates 209.85.218.49 as permitted sender) smtp.mailfrom=bijan311@gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1749830555; 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=EolkFjwa32486SxkHimT0PoLXhvW13QswRm2sB8b3Go=; b=u2jjlsxEv0VtZdi+xzqI4BMMFxtX9js3hY6AImlu6NbeoCgSDEllJghCVZhsMhPC38fg/c u4ZL7CfXKKny7fhoFO38pVZAs+iT37LAQzcOOAneWDfpH0kV8AsjjPPX86006OtWHGlTUO /j9dwmHBbArGRU7vwLAmbR79Cj0Jg4Y= Received: by mail-ej1-f49.google.com with SMTP id a640c23a62f3a-addcea380eeso391064866b.0 for ; Fri, 13 Jun 2025 09:02:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1749830554; x=1750435354; 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=EolkFjwa32486SxkHimT0PoLXhvW13QswRm2sB8b3Go=; b=L864BeDcboLti/QnyJW5kvUi55P2uGYvzN0IvVizAXpHgDzxaSNWsTBoKdkM8+uwsQ 9xi5NBLcj2V7Hg7C48rtT2A1XtHnR0iP35K9BfGtZUP0FxxgSNbvNDeuEPSSnIuzQcAN Ht/oFh9hb9Ti7a79K2mQlavUbwaw/rtaYXNlN0ik8i5l6rwE+lGuky8BgF5DQNcZ8NRR LEeR9jzOPYO6t0Qzhnb0boLHNelbovGSAPQ9V7L8ixHelxczd5NiPQb9XZ4rWi29yU+u BTE1OCsIpvEV7Ahq7ZDkwz6hiGIWJtDDZ4m/e/7/dnVkcvcVcg5s0+aX81V79OJo+xCb yipg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1749830554; x=1750435354; 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=EolkFjwa32486SxkHimT0PoLXhvW13QswRm2sB8b3Go=; b=LlqbCgYwt+82QVqdBz/nhG75cyFe6QT139MSySyV4OQQnjdUebTelh7z3gPLu8Ogcd WJkNxTVrteJViyg4ulllvhZLhVcqXpKw7LvXtdr49Yjd1ugMywIC8CYno10BSePm3E3H 8BeS4SqCCFXsXfeFfgqnhJZgpW3+3gsahMHl+xj1v4XeeNAVRoMULc7Nios8CVb4r0g3 bB3R9NQM6E7Gyle/3tIzHnmgptsl66+nkg3krmDz1uaxoM313k/MIDY84Pf0qctK118n 0lslDVT/BXB6UBJIzWLuAYVkIg2pnUyzUtkL1zDzpvld5jrWlZcBTAA5ViVlOURey/6T BAMw== X-Forwarded-Encrypted: i=1; AJvYcCW6bEIDTZ+0xjEXZ2CpUFZHsqenlUrHzO7CRbpOmGy7C3IGiFLFzG2IZ5pU2fMO9zWEO/wiFLOfug==@kvack.org X-Gm-Message-State: AOJu0Yy47TQX64iTGbBfrUz+2zMZ1HiJuudPVUlrD/pq5k0sJV4L+Qb7 7yrSJr1m2jtreuoyOTaICWzHmcHusCqNGCon17xCstNAjDqLQNEgiLZ5l1Ui9mp09Py0xsRM/B7 Y2EZrwfiqm7LxSIhue6LXW6cd9LlFxu8= X-Gm-Gg: ASbGnct9gUEs9qPgrEuOeIDp+1MplbHs0dv72f+GsE6oGZtj1LOt+5oiCPjD54MTSwI AOXih3H56xG1YAT2Vfk7prZaWPJbhvISQnIuwu01x2Wu4u5NKtu1srJuuB4MwcSnE9nQHP3db/W TN9dsY2I+KbxeulktVIYP3Q4jEWcHZXB7QdpgU26mbu6V+d3jOVvTxJNe6GtaElmkR+cQhh7F8H SDE X-Google-Smtp-Source: AGHT+IGAK5cy8SvdVQyZPmEOukEmvVLoi77USHaZ8HE50a/XPUDwRV2/XI+o9a9sjbYnuvbGDNhT0rm/lrJAt/GFfdM= X-Received: by 2002:a17:907:3f1a:b0:ad8:9b5d:2c38 with SMTP id a640c23a62f3a-adec5564a1cmr383361866b.26.1749830552242; Fri, 13 Jun 2025 09:02:32 -0700 (PDT) MIME-Version: 1.0 References: <20250612234942.3612-1-sj@kernel.org> <875xh0747l.fsf@DESKTOP-5N7EMDA> In-Reply-To: <875xh0747l.fsf@DESKTOP-5N7EMDA> From: Bijan Tabatabai Date: Fri, 13 Jun 2025 11:02:20 -0500 X-Gm-Features: AX0GCFteGyv6q1eNkeTKJgzYqopZRdUgq7cFJrBGrNlx7JkrByQHyxHa2nxi6bU Message-ID: Subject: Re: [RFC PATCH 0/4] mm/damon: Add DAMOS action to interleave data across nodes To: "Huang, Ying" Cc: SeongJae Park , linux-mm@kvack.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, akpm@linux-foundation.org, corbet@lwn.net, david@redhat.com, ziy@nvidia.com, matthew.brost@intel.com, joshua.hahnjy@gmail.com, rakie.kim@sk.com, byungchul@sk.com, gourry@gourry.net, apopple@nvidia.com, bijantabatab@micron.com, venkataravis@micron.com, emirakhur@micron.com, ajayjoshi@micron.com, vtavarespetr@micron.com, damon@lists.linux.dev Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Rspamd-Server: rspam01 X-Stat-Signature: 9bqqbhe3a8wtwdafoyswp31aj41af38k X-Rspamd-Queue-Id: B392A140006 X-Rspam-User: X-HE-Tag: 1749830555-670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/6nckmxy7xPAC4cFTe1P+H3WrUOK9F4AS5HKiQwwUq3oSSwn+cdPqfk3LmaW8YmTzaTI+qe5IBOlpw5W6OI/NSkMeqaK19sY5u5KYkLzaQJPROneqbiT9ZjZ4XD8PLlKweFg9lmScRcVdRWn2EGKdq3g4/1MRxuaBFFUcTc+WTd4NU+cPhYlJ8i5emkfH/zG0DR5V+y9lKirPLEpmU4V4KEXcsIyUZArhft4vCNKdFgefA8KhCbBEcIFEwt9/TBmTmRMsPPZ9+CmKBo74x5ey6pJqoxdDF1rX8f5iKXhCxP0cN2cQdEV+ZgxoEgOMTUayYap2iJOkCCdo0vlMWNHgdORQqyla4fUCMRp/ei8JO5ZmqkAV5+fR1B9f+udSLTfSmHqe6CiOGbR4MjrUgViYMPVodW485Y9fIiQRztZDOCt1roG3eGnX7pjgRm0k= 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 Thu, Jun 12, 2025 at 9:42=E2=80=AFPM Huang, Ying wrote: > > SeongJae Park writes: > > > Hi Bijan, > > > > On Thu, 12 Jun 2025 13:13:26 -0500 Bijan Tabatabai = wrote: > > > >> From: Bijan Tabatabai > >> > >> A recent patch set automatically set the interleave weight for each no= de > >> according to the node's maximum bandwidth [1]. In another thread, the = patch > >> set's author, Joshua Hahn, wondered if/how these weights should be cha= nged > >> if the bandwidth utilization of the system changes [2]. > > > > Thank you for sharing the background. I do agree it is an important qu= estion. > > > >> > >> This patch set adds the mechanism for dynamically changing how applica= tion > >> data is interleaved across nodes while leaving the policy of what the > >> interleave weights should be to userspace. It does this by adding a ne= w > >> DAMOS action: DAMOS_INTERLEAVE. We implement DAMOS_INTERLEAVE with bot= h > >> paddr and vaddr operations sets. Using the paddr version is useful for > >> managing page placement globally. Using the vaddr version limits track= ing > >> to one process per kdamond instance, but the va based tracking better > >> captures spacial locality. > >> > >> DAMOS_INTERLEAVE interleaves pages within a region across nodes using = the > >> interleave weights at /sys/kernel/mm/mempolicy/weighted_interleave/nod= e > >> and the page placement algorithm in weighted_interleave_nid via > >> policy_nodemask. > > > > So, what DAMOS_INTERLEAVE will do is, migrating pages of a given DAMON = region > > into multiple nodes, following interleaving weights, right? Hi Ying, > Hi, Bijan, > > It's hard for me to understand what you want to do in your original > patch description. SeongJae's description is helpful. So, can you add > more description in the future version? Yes, sorry about that. I added more detail in my reply to SeongJae and will include more detail in the cover letter of the next revision. > So, you will migrate allocated pages to follow new weight? Yes > How to interact with the weight specified by users explicitly? Usually w= e will > respect explicit user policy. I am not entirely sure I understand the question completely, but I will try to answer the best I can. We interact with the user provided weights through the policy_nodemask func= tion, which gives us the node id a page should be on. This patch only reads the u= ser provided weights and migrates pages to be consistent with new weights provi= ded by the user, so I believe these changes do respect the explicit user policy. Please let me know if you disagree. Thanks for the review, Bijan P.S. Sorry for sending this twice - I accidentally replied instead of replied all.