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 68597C433EF for ; Tue, 21 Dec 2021 13:26:25 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id C44D06B0071; Tue, 21 Dec 2021 08:26:24 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id BF51E6B0073; Tue, 21 Dec 2021 08:26:24 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id ABDB26B0074; Tue, 21 Dec 2021 08:26:24 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0170.hostedemail.com [216.40.44.170]) by kanga.kvack.org (Postfix) with ESMTP id 9B13A6B0071 for ; Tue, 21 Dec 2021 08:26:24 -0500 (EST) Received: from smtpin13.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 58A8282499B9 for ; Tue, 21 Dec 2021 13:26:24 +0000 (UTC) X-FDA: 78941875488.13.D8BFC98 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by imf11.hostedemail.com (Postfix) with ESMTP id D90AB40009 for ; Tue, 21 Dec 2021 13:26:20 +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 C678BB816A3; Tue, 21 Dec 2021 13:26:21 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id BD39FC36AE8; Tue, 21 Dec 2021 13:26:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1640093180; bh=bwhIc2CW6eSSB5kjPKSc77aefUPIhzP9eVdEkv24dl4=; h=From:To:Cc:Subject:Date:In-Reply-To:From; b=MEw4nOQk+pvLr2E3a/HfO+Iu+ulX18D2aPRa8pLRQUt7ZTwpv69ae0AV4d5NjDfAc BkHCKQnNEb2dZTOk4UzUVaZZutSq1Cid6hbiq97H6bXTxj4VenbiEWCAS13wtmoOml 2eYLvOjYOS5xhXxGXYq7GiSnQ4wG7hXuL8/2b7Pl3XvvB5WekIcGvOv2Le9WNr1rcp iqeK42QsW+O8qaqQaOTLGWj/De7Lg82MiMUuhESNoHjoxhKAvD7F0ZqkFirtOs3PIE V6Nl0zaauXHqVHsjx/Cdyo/l7ML4OA8NMwOlpmwkwEqyh3NJMJObQoWMJBI6Dcg0bJ eWFTNPwqveNuQ== From: SeongJae Park To: Baolin Wang Cc: sj@kernel.org, akpm@linux-foundation.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 0/2] Add a new scheme to support demotion on tiered memory system Date: Tue, 21 Dec 2021 13:26:17 +0000 Message-Id: <20211221132617.15064-1-sj@kernel.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: D90AB40009 X-Stat-Signature: yszztfswz9t6943wcdfpweipszey8msq Authentication-Results: imf11.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=MEw4nOQk; spf=pass (imf11.hostedemail.com: domain of sj@kernel.org designates 145.40.68.75 as permitted sender) smtp.mailfrom=sj@kernel.org; dmarc=pass (policy=none) header.from=kernel.org X-HE-Tag: 1640093180-427843 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: Hi Baolin, On Tue, 21 Dec 2021 17:18:02 +0800 Baolin Wang wrote: > Hi, > > 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. I like the idea, thank you for these patches! If possible, could you share some details about your tests? Thanks, SJ > > > Baolin Wang (2): > mm: Export the alloc_demote_page() function > mm/damon: Add a new scheme to support demotion on tiered memory system > > include/linux/damon.h | 3 + > mm/damon/dbgfs.c | 1 + > mm/damon/vaddr.c | 156 ++++++++++++++++++++++++++++++++++++++++++++++++++ > mm/internal.h | 1 + > mm/vmscan.c | 2 +- > 5 files changed, 162 insertions(+), 1 deletion(-) > > -- > 1.8.3.1