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 8D766C433F5 for ; Sun, 6 Feb 2022 22:28:22 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id D593D6B0072; Sun, 6 Feb 2022 17:28:21 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id D07D36B0073; Sun, 6 Feb 2022 17:28:21 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id BAA796B0074; Sun, 6 Feb 2022 17:28:21 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0153.hostedemail.com [216.40.44.153]) by kanga.kvack.org (Postfix) with ESMTP id A76F56B0072 for ; Sun, 6 Feb 2022 17:28:21 -0500 (EST) Received: from smtpin22.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 6366D181E996A for ; Sun, 6 Feb 2022 22:28:21 +0000 (UTC) X-FDA: 79113794802.22.D795F75 Received: from mail-pj1-f52.google.com (mail-pj1-f52.google.com [209.85.216.52]) by imf25.hostedemail.com (Postfix) with ESMTP id 12A33A0005 for ; Sun, 6 Feb 2022 22:28:20 +0000 (UTC) Received: by mail-pj1-f52.google.com with SMTP id v15-20020a17090a4ecf00b001b82db48754so11632054pjl.2 for ; Sun, 06 Feb 2022 14:28:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:from:to:cc:subject:in-reply-to:message-id:references :mime-version; bh=MOMhnq0ObWXdnjvkc+JCn5dFhi6wxP+jaPhFzcfiR+Y=; b=g6mjE7ZN/EP3S8f/BrpdDLzIByOJjKdAQfSFWyMryO64GjtxeG90+v+J4oRMoOzAIo 24Nc8Zc366/eiIpYTsbMitDpzvmsqufM/+QNEiUCTro7ZiyTMMyWMkvibCIbMxKUwhJt o2ASViHoKe7tNQYl6N3xz0gLhh4NbwVF8NjZm6MTt0BtG86OiSzy1n1cNol8bej8ClNR GbFHGMb4M+wt2pKEacDu3WPLO907LnkOMOKno1r/rHovW3DaMEzjFt3P/tkfRob4Y4GR PPyVzlWLnOmnW4D2+L0OhBr6YzYlP2aANUQFcEqWCBbEOPQoc4wllqjvupGnktwqujOy 0XwQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:in-reply-to:message-id :references:mime-version; bh=MOMhnq0ObWXdnjvkc+JCn5dFhi6wxP+jaPhFzcfiR+Y=; b=MXjY5V1KRtrYXI73NiwBPyrDciw0xfzdNBVJVLBB1hIsdq0ez5FWNxxZbGcqwxjrZq t3+uWubTLjvz8DTQk+N7l20VIgBPrFOB+ApoV/0M3hDDUUHybH3rbQnaRkkqPqoM8pjb R8FNAQlcRYH5lnHflLKcrd+YjK6cUpVmkpfa4F6IdQ50SF6rfUM8EtuWd3Bs2kWj2dCI wLu5pLv959nV/kkkJRRh7uT9EExdfA4LzyT0PF3CdJ+rZXd2p82wV22/3GYkRDi4SLvR Rzo2nrWIn0FAmeZJ2cC7647XAcSNU1RmoNLHwi7svJCqmL8bnwrurjKXlz/woDf9IfSO BSVA== X-Gm-Message-State: AOAM530YvZckUgdueSX866MzcDtEww86AFwZWun5EKggG/jKU3ntLOF8 ABfUTkR2w4gNXdGDS6RUHCmGOWupppfsJw== X-Google-Smtp-Source: ABdhPJziKUeovI/Gs3yGvpBH1Wdvr4nAodeg+i2AL7iqhM2iP7EiD0H2mV0ji4sZRwUCAozcIAgtjQ== X-Received: by 2002:a17:90a:4144:: with SMTP id m4mr13481227pjg.77.1644186499779; Sun, 06 Feb 2022 14:28:19 -0800 (PST) Received: from [2620:15c:29:204:dae1:9bee:7b85:4b01] ([2620:15c:29:204:dae1:9bee:7b85:4b01]) by smtp.gmail.com with ESMTPSA id q32sm6621852pgm.26.2022.02.06.14.28.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 06 Feb 2022 14:28:19 -0800 (PST) Date: Sun, 6 Feb 2022 14:28:18 -0800 (PST) From: David Rientjes To: Jonghyeon Kim cc: SeongJae Park , Andrew Morton , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] mm/damon: Rebase DAMON_RECALIM watermarks for NUMA nodes In-Reply-To: <20220204110318.GA9391@swarm08> Message-ID: References: <20220204064059.6244-1-tome01@ajou.ac.kr> <20220204090642.2425-1-sj@kernel.org> <20220204110318.GA9391@swarm08> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: 12A33A0005 X-Stat-Signature: 5hwnfgcf8xepjqggeswtncfw3r38r5mu X-Rspam-User: nil Authentication-Results: imf25.hostedemail.com; dkim=pass header.d=google.com header.s=20210112 header.b=g6mjE7ZN; spf=pass (imf25.hostedemail.com: domain of rientjes@google.com designates 209.85.216.52 as permitted sender) smtp.mailfrom=rientjes@google.com; dmarc=pass (policy=reject) header.from=google.com X-HE-Tag: 1644186500-602929 X-Bogosity: Ham, tests=bogofilter, spamicity=0.012538, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Fri, 4 Feb 2022, Jonghyeon Kim wrote: > > > This patch allows kdamond thread to select watermark options for monitoring > > > specific node or whole system free memory. > > > > Why only specific NUMA node or whole system, instead of each NUMA node? Are > > you running DARC for only specific NUMA node? If that's the case, I think > > implementing your own DAMON-based policy in user space might be a better > > choice. For example, you could implement and use a user-space daemon that > > monitors free memory ratio of each NUMA node and adjusts the watermarks. > > > > I have tested DAMON_RECLAIM for each NUMA node by using a module. But, I felt > that the goal of DAMON_RECLAIM is dealing with the entire system memory or > specific monitoring regions by using module parameters. So, I hoped to add more > options for DAMON_RECLAIM on the NUMA system. > > Another thing I considered is the problem of correlation between NUMA node range > and monitoring start/end addresses, such as "What if we monitor target that > spans multiple nodes?". > In that case, I guess we have to decide the policy for watermarks. > > > Hope I'm not making you get me wrong. You found the important limitation of > > DAMON_RECLAIM, thank you! I really hope DAMON_RECLAIM to evolve to handle the > > case. I'm just saying this patch looks like specialized for your special case, > > and there could be a better approach for that. > > > > If you agree that each NUMA node is able to have its own DAMON_RECLAIM daemon > threads, I will add that codes in the next patch. > It seems like one DAMON context per NUMA node is required for this, no? In other words, since each context has its own set of memory regions that it monitors and set of watermarks that it must abide by, if we want per NUMA node proactive reclaim then each node must have its own context that is coordinated by userspace if we want to do system-wide proactive reclaim.