Received: by 2002:ab2:7855:0:b0:1f9:5764:f03e with SMTP id m21csp55555lqp; Tue, 21 May 2024 18:18:51 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUS+Qwos5eQHT3/1iBhFlBcGXlZA2INA3X00fG3qiCiBdYvj3fWLUmpRGmhSM30UlwBD7ASTWQsXfQ1ZZxPziXeCd079kIKFAj0k0jh0w== X-Google-Smtp-Source: AGHT+IGQy5GZnONuZmCO+d7G/d7xbFjOV/9KpCoMNPEFLw78AyE6/aLzbHZhmhvh0gPWp9Vmi/yh X-Received: by 2002:a05:6830:923:b0:6f0:2dad:5c8c with SMTP id 46e09a7af769-6f669059a3dmr844633a34.30.1716340731018; Tue, 21 May 2024 18:18:51 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716340730; cv=pass; d=google.com; s=arc-20160816; b=pT+rmnxJEjQ8nfI876cVsNtzPdtTuDzXc2vodZkQveo8mbFI9FEIXQ0SlTPAeFkg6i x78rF7bPGsnG01QFptLv/bLdHPQwfvYf4E1tr+cH55vxQkOrQU8dZs9LtSLZFSdxPztR 05hKJV+MS21mmefncy/U/dFzgT8NaRhjJQVaQHOVg1F8JveujT7wMBWk3JTsifdVksHV D29J8+ZP3620h9hF723DOOt5yTyxV+S9XnexTZTbUUW523nrA6b/aWg9qp2s5yoW6Jlj ULl7eMphKQeIrGfDvUhhguxoNGFs37/JcOkCpUa9XOFeoY8oTf7aFcBE4wzPRkojpOGY l2Jw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=vJ6RqBbexESHZQZG4h5ofX9X+/izj82ODYY/8DFDA3g=; fh=4eMmtt5ZSg/2LSGow6cm3wim9ijGGiEjDU+sxGtzGi0=; b=081+ZQNrVvPYEGkBG6RVNJydFW9QHgBGPX4tzgaKzPkdnHBrqR2r5PdnVeXBXRVusY y9FHOX6NpUsjCerPBbWahLEY2Cc+aPgetWmyH+Tw+2+nTxww3v4kuEVsFgnTRPw8Oe9+ m2Ssf5noIH3MVK3B8RBOB6IblghSTAyEtpoP1KpCEl7x1nmoL0foo1nC6p2fQt6M0aNY 2ZbpYt6xcV29axT0M7Br25FqRb2iY7FinhRyJZTEOXrTJps9WZwl28J4AbYDE5Y5Qulq gRffyC11S060iqGx18K2+sJF+FPGC5FHUVzLBdLOlg+rU9Kgf8+O+BlWDnQKoj3GOq8D 2sTg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ThGATGNl; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-185599-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-185599-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id d2e1a72fcca58-6f4d2a96d52si4068725b3a.140.2024.05.21.18.18.50 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 May 2024 18:18:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-185599-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ThGATGNl; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-185599-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-185599-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 469AFB257E6 for ; Wed, 22 May 2024 01:09:26 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6A46C149C75; Wed, 22 May 2024 01:00:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="ThGATGNl" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 85934148836; Wed, 22 May 2024 01:00:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716339638; cv=none; b=pQLM3oSrMjjB4YIZXw1f1qYApPMKd83wt/4sRyOjuouTHBSVCSJ+VIO0+VxHVbOmR8D1vodmCKNdyxzpg3uDY7CqsXgwqdxm9cbgyACUbtTc+0v9SMGnSFww3Z7a7KdPVQcZglWzwzWKlisZDBe8uUgy5YOMUR7i8U0XfkTXnrg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716339638; c=relaxed/simple; bh=MhYuz5hxHwEcA/J213/XoPQ9yIK3Rf2PtgNf8nNBVMU=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=q7QjImVIZn5R5vbCNvlsX87LifMhQfuan7QtzF5TRBtGduZ1qcFn90xNGkJe0Az/sdEb57DeTYEOh5bQrtO11h+NvV2CbqDVia1bDysTcWF19PIv9sOJC5zw+NYsH4VscmNes554pm+qd1Q4ltHU5SWL/98K2OIDMxXvh2vpnfU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=ThGATGNl; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 67309C2BD11; Wed, 22 May 2024 01:00:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1716339637; bh=MhYuz5hxHwEcA/J213/XoPQ9yIK3Rf2PtgNf8nNBVMU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ThGATGNl5WdBJ6krO6ddFKa1Vi7Yud+Y+cNz7qeg8BLswYbqGv2hbq0COi3Ex+Ewr n2obnZQIZBYotClzBsXImUJrBjvivpy1hD8fu7Hu1SDIWwmQAH1syGKHP7wiBFkntK 1FvNODkFWUc5Sy8IajSK/gdRWpECSXMTqzikGCUUHiNymyfOTMZXMijrzHAqzuWEI1 pH2XExD+CQ4ccYEjCb8UslYH2GvgCaxPf8wngLj9shc/mmvhCZRbwikEGmNyQMNlRa VKSiL1LAk0eht4ivZdcrhabT5h7l+HBr+SinR4tUYmxC65yXomtTLO+DDXy2GBp1mo FV6G5hkWs+wRw== From: SeongJae Park To: Jonghyeon Kim Cc: SeongJae Park , damon@lists.linux.dev, linux-mm@kvack.org, Andrew Morton , linux-kernel@vger.kernel.org Subject: Re: [RFC PATCH v2 0/3] Add NUMA-aware DAMOS watermarks Date: Tue, 21 May 2024 18:00:34 -0700 Message-Id: <20240522010034.79165-1-sj@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240520143038.189061-1-tome01@ajou.ac.kr> References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Hi Jonghyeon, On Mon, 20 May 2024 14:30:35 +0000 Jonghyeon Kim wrote: > Current DAMOS schemes are not considered with multiple NUMA memory nodes. > For example, If we want to proactively reclaim memory of a one NUMA node, > DAMON_RECLAIM has to wake up kdamond before kswapd does reclaim memory. > However, since the DAMON watermarks are based on not a one NUMA memory > node but total system free memory, kdamond is not waked up before invoking > memory reclamation from kswapd of the target node. > > These patches allow for DAMON to select monitoring target either total > memory or a specific NUMA memory node. I feel such usage could exist, but my humble brain is not clearly imagining such realistic usage. If you could further clarify the exampected usage, it would be very helpful for me to better understand the intention and pros/cons of this patchset. Especially, I'm wondering why they would want to use the watermark feature, rather than manually checking the metric and turning DAMON on/off, or feeding the metric as a quota tuning goal. > > --- > Changes from RFC PATCH v1 > (https://lore.kernel.org/all/20220218102611.31895-1-tome01@ajou.ac.kr) > - Add new metric type for NUMA node, DAMOS_WMARK_NODE_FREE_MEM_RATE > - Drop commit about damon_start() > - Support DAMON_LRU_SORT > > Jonghyeon Kim (3): > mm/damon: Add new metric type and target node for watermark > mm/damon: add module parameters for NUMA system > mm/damon: add NUMA-awareness to DAMON modules Following up to the above question, why they would want to use DAMON modules rather than manually controlling DAMON via DAMON sysfs interface? Thanks, SJ > > include/linux/damon.h | 11 +++++++++-- > mm/damon/core.c | 11 ++++++++--- > mm/damon/lru_sort.c | 14 ++++++++++++++ > mm/damon/modules-common.h | 4 +++- > mm/damon/reclaim.c | 14 ++++++++++++++ > mm/damon/sysfs-schemes.c | 35 +++++++++++++++++++++++++++++++++-- > 6 files changed, 81 insertions(+), 8 deletions(-) > > -- > 2.34.1