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 76D12C8303C for ; Thu, 3 Jul 2025 01:03:47 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id F04996B0089; Wed, 2 Jul 2025 21:03:46 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id EDBDF6B00EB; Wed, 2 Jul 2025 21:03:46 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E19246B00EC; Wed, 2 Jul 2025 21:03:46 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id D0B5D6B0089 for ; Wed, 2 Jul 2025 21:03:46 -0400 (EDT) Received: from smtpin26.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id 7CBE31405A2 for ; Thu, 3 Jul 2025 01:03:46 +0000 (UTC) X-FDA: 83621156052.26.A75112B Received: from tor.source.kernel.org (tor.source.kernel.org [172.105.4.254]) by imf05.hostedemail.com (Postfix) with ESMTP id F138E100009 for ; Thu, 3 Jul 2025 01:03:44 +0000 (UTC) Authentication-Results: imf05.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=sUIzwvC4; spf=pass (imf05.hostedemail.com: domain of sj@kernel.org designates 172.105.4.254 as permitted sender) smtp.mailfrom=sj@kernel.org; dmarc=pass (policy=quarantine) header.from=kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1751504625; 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-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=y5DmMhqIqBnQX4cfdYsib2afJw+QgRDFVOqQhPWivYc=; b=nIn/1G00WcggUwd5eawSf9zV8r7PrRQPas5cGWkbDtqLlgz3Lbi+3t1k9ME68T7EVInaNp i/dSEqKpvTJHgU3uJEbGgtp4yhZVEs4Cj51ZS9YpgsTymYDpxNLmHzTnelC2mNW65P8CAY 1BPcC0MsFQ7+eIjSCJlvdDxdw92xrWk= ARC-Authentication-Results: i=1; imf05.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=sUIzwvC4; spf=pass (imf05.hostedemail.com: domain of sj@kernel.org designates 172.105.4.254 as permitted sender) smtp.mailfrom=sj@kernel.org; dmarc=pass (policy=quarantine) header.from=kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1751504625; a=rsa-sha256; cv=none; b=MoCPukSx/rXdRt5ZZTCimhw9JLu2CQ4E6UcmvmKDeWlcfBWIDKkjaicjjx+Ssj9LwT6WKv GG4nVWIQlDJvbb+9DymRZFxedodLgRZp0HvfkExeNgt4WwlwgKYjswx76Nxnps+VQ8tOMM nyRZcORWwfYdLR8jvNlg++afz/3m8/E= Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by tor.source.kernel.org (Postfix) with ESMTP id 530F161142; Thu, 3 Jul 2025 01:03:44 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 95039C4CEE7; Thu, 3 Jul 2025 01:03:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1751504623; bh=5rU3ZMle3o8BvcmdUmfcJuB41QNksv+U1CSu20i78KA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=sUIzwvC4gx+fSgmEfLApRTxN3V6+d2kPBXfKR/fQt6r3WjKHYXlMuJ33+IpsMYJrt odB01vO2nU9BJKam8prfEWyedW8tt73z0AffeRl8UypwEisYqLsLmTUGsFvy5jq7RS 6hlpAfQBekNpaZNd0FHrBpr+j+R2h4grIb9bHgbCtcVcsTYhyeCjH/3ILabwBjmRVO hXCAqnsDKcKOJXTRLcjQ609OLlPxeTHz9NDu0ig+OqnMxQkZEn91j617FS5GOkUV1k wVG/zsMdLfmN2VYpGEUvcvoYGsXItsISFgGpvjZre/l8SxdE9halHZonVgN6pUrmQj eoFN4PqbuZ6cQ== From: SeongJae Park To: Bijan Tabatabai Cc: SeongJae Park , damon@lists.linux.dev, linux-mm@kvack.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, akpm@linux-foundation.org, corbet@lwn.net, joshua.hahnjy@gmail.com, bijantabatab@micron.com, venkataravis@micron.com, emirakhur@micron.com, ajayjoshi@micron.com, vtavarespetr@micron.com Subject: Re: [RFC PATCH v3 00/13] mm/damon/vaddr: Allow interleaving in migrate_{hot,cold} actions Date: Wed, 2 Jul 2025 18:03:41 -0700 Message-Id: <20250703010341.58007-1-sj@kernel.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250702201337.5780-1-bijan311@gmail.com> References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Stat-Signature: dtekmkayqhwkbwtmweb6sxhhym3qc79r X-Rspamd-Queue-Id: F138E100009 X-Rspamd-Server: rspam11 X-Rspam-User: X-HE-Tag: 1751504624-910057 X-HE-Meta: U2FsdGVkX1/VxAbquxxloU21/2ifvCyyx/f1VFxDSjsmgcEmX83hPm9AD3fhVwAw0uLl1J3sc3d/Jep9grdcM5J/TS3JwfFtN1sbZrjwsSE4NBp7/DxnNTFRzlFUXZM8svodN8Jm2Gq1H5fyHl9RxgYj01wdYuKagmg5EQdd3xKZW9sotPXRiSEX7PHULN8n8sXjS7N6kjtfiLwleoDA2msT9JsmrtvolHBytIRBV/uJ0GbKLexi7atLcFGYjJru80adEB08bC3DL6CeXxq+djLHWWYr/tckhmx6FQxi7jvgkWhmoF7qGkEUOOSeDGRYRIBL60r8hzzOnfbdvDq4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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: Hello Bijan, On Wed, 2 Jul 2025 15:13:23 -0500 Bijan Tabatabai wrote: > From: Bijan Tabatabai > > A recent patch set automatically sets the interleave weight for each node > according to the node's maximum bandwidth [1]. In another thread, the patch > set's author, Joshua Hahn, wondered if/how thes weights should be changed > if the bandwidth utilization of the system changes [2]. > > This patch set adds the mechanism for dynamically changing how application > data is interleaved across nodes while leaving the policy of what the > interleave weights should be to userspace. It does this by having the > migrate_{hot,cold} operating schemes interleave application data according > to the list of migration nodes and weights passed in via the DAMON sysfs > interface. This functionality can be used to dynamically adjust how folios > are interleaved by having a userspace process adjust those weights. If no > specific destination nodes or weights are provided, the migrate_{hot,cold} > actions will only migrate folios to damos->target_nid as before. [...] > Functionality Test > ================== > Below is an example of this new functionality in use to confirm that these > patches behave as intended. > In this example, the user starts an application, alloc_data, which > allocates 1GB using the default memory policy (i.e. allocate to local > memory) then sleeps. Afterwards, we start DAMON to interleave the data at a > 1:1 ratio. Using numastat, we show that DAMON has migrated the > application's data to match the new interleave ratio. > For this example, I modified the userspace damo tool [8] to write to the > migration_dest sysfs files. I plan to upstream these changes when these > patches are merged. Looking forward to! [...] > Performance Test > ================ [...] > Updating the interleave weights and having DAMON migrate the workload data > according to the weights resulted in an approximarely 25% speedup. Nice! [...] > Revision History > ================ > Changes from v2 [9]: > - Implement interleaving using vaddr instead of paddr > - Add vaddr implementation of migrate_{hot,cold} > - Use DAMON specific interleave weights instead of mempolicy weights Appreciate your efforts on revisioning! I left a few comments including simple change requests and questions as replies to each patch. In high level, looks good to me. [...] > P.S., I will be out of office Thursday until next week Tuesday, so please > forgive any delayed responses. No worry, please take your time and fun! :) Thanks, SJ [...]