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 DF793C433EF for ; Thu, 23 Dec 2021 00:01:11 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id C98296B0071; Wed, 22 Dec 2021 19:01:10 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id C47566B0073; Wed, 22 Dec 2021 19:01:10 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id AE86D6B0074; Wed, 22 Dec 2021 19:01:10 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0079.hostedemail.com [216.40.44.79]) by kanga.kvack.org (Postfix) with ESMTP id 9C4D96B0071 for ; Wed, 22 Dec 2021 19:01:10 -0500 (EST) Received: from smtpin12.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 547E188480 for ; Thu, 23 Dec 2021 00:01:10 +0000 (UTC) X-FDA: 78947103900.12.C6E6C80 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by imf15.hostedemail.com (Postfix) with ESMTP id 379FCA0031 for ; Thu, 23 Dec 2021 00:01:02 +0000 (UTC) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 26B9BB81EB3; Thu, 23 Dec 2021 00:01:08 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 89703C36AE8; Thu, 23 Dec 2021 00:01:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1640217667; bh=8mKy0ejJYhDe1sSwxvENGA/O6BaHbuKqNIN2Oui80fE=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=cQdliyZv6Mk+2L3Ne6sSwjPko/FERnScWunZ6aNdaJB0i7wiTJoaBfMk38GNz/pa4 bRUpCkO2AWJiQnvTBRgl9CBPThsz6nwVZPEZgEnqC0uqOOdKiHnnogSw4eeHBudI0e PKMxMvLgpMblseMfvQrbjOUelBckULyINBTLHDXo= Date: Wed, 22 Dec 2021 16:01:05 -0800 From: Andrew Morton To: Baolin Wang Cc: sj@kernel.org, ying.huang@intel.com, dave.hansen@linux.intel.com, ziy@nvidia.com, shy828301@gmail.com, zhongjiang-ali@linux.alibaba.com, xlpang@linux.alibaba.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 0/2] Add a new scheme to support demotion on tiered memory system Message-Id: <20211222160105.a267eaacefae77ae094c050e@linux-foundation.org> In-Reply-To: References: X-Mailer: Sylpheed 3.5.1 (GTK+ 2.24.32; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Rspamd-Server: rspam09 X-Rspamd-Queue-Id: 379FCA0031 X-Stat-Signature: 5g1iqfeu6noayc3cwp85o3uoag69z7mw Authentication-Results: imf15.hostedemail.com; dkim=pass header.d=linux-foundation.org header.s=korg header.b=cQdliyZv; spf=pass (imf15.hostedemail.com: domain of akpm@linux-foundation.org designates 145.40.68.75 as permitted sender) smtp.mailfrom=akpm@linux-foundation.org; dmarc=none X-HE-Tag: 1640217662-12594 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: On Wed, 22 Dec 2021 19:14:39 +0800 Baolin Wang wrote: > Now on tiered memory system with different memory types, the reclaim path in > shrink_page_list() already support demoting pages to slow memory node instead > of discarding the pages. However, at that time the fast memory node memory > wartermark is already tense, which will increase the memory allocation latency > during page demotion. So a new method from user space demoting cold pages > proactively will be more helpful. > > We can rely on the DAMON in user space to help to monitor the cold memory on > fast memory node, and demote the cold pages to slow memory node proactively to > keep the fast memory node in a healthy state. > > This patch set introduces a new scheme named DAMOS_DEMOTE to support this feature, > and works well from my testing. Any comments are welcome. Thanks. This is interesting. I think it would be helpful if we could have some example scenarios in this changelog, help people understand how to use DAMOS_DEMOTE and what effects it has. Documentation/admin-guide/mm/damon/usage.rst would like an update? And the DAMON user space tool?