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 CD065C433EF for ; Fri, 18 Mar 2022 08:40:51 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 5E3D98D0002; Fri, 18 Mar 2022 04:40:51 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 5932D8D0001; Fri, 18 Mar 2022 04:40:51 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 45A6A8D0002; Fri, 18 Mar 2022 04:40:51 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0148.hostedemail.com [216.40.44.148]) by kanga.kvack.org (Postfix) with ESMTP id 370468D0001 for ; Fri, 18 Mar 2022 04:40:51 -0400 (EDT) Received: from smtpin22.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id D7FDB18264856 for ; Fri, 18 Mar 2022 08:40:50 +0000 (UTC) X-FDA: 79256861460.22.4789AD6 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by imf08.hostedemail.com (Postfix) with ESMTP id 6A53516001C for ; Fri, 18 Mar 2022 08:40:50 +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 40390B82195; Fri, 18 Mar 2022 08:40:48 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4AF8BC340EC; Fri, 18 Mar 2022 08:40:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1647592846; bh=xJBQDlqFBXax04cp7hOQvnVKZ6NiGsFEY3WOnqxW2E8=; h=From:To:Cc:Subject:Date:In-Reply-To:From; b=LMs11+rR98X2oRKX9OnwUUF04p026YBDauZ9lqxwN8foHG+6lAUQ6tDRZsgmPz7k4 cpyU5sMzVa9l1X18tSDdebc9SlXxMuXIcXCZ2CtEIWDqsnOBCKBVVO7AZVDGfysV6N GMI8i2UbUwih6X5PAgfyGKkOr5DVcR+98V+5yhUylH4Jz3RrGo1QhTyYtJsqQj4whP ngPJ5uZ5nY1ZMYVlBEqHsilJnez+FhdZ1efBXWyAVfEvNgPur04HpIpRt3l1ZWKka8 ALLYPIT2g+cB9xO4BQwoG67SHeT7dye5I8kv5FeRn5JL4bwaR8Q9MkUhikG79DHXsT 8E82IY7A9ixNg== From: sj@kernel.org To: David Hildenbrand Cc: xhao@linux.alibaba.com, sj@kernel.org, rongwei.wang@linux.alibaba.com, akpm@linux-foundation.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Baolin Wang Subject: Re: [RFC PATCH V1 0/3] mm/damon: Add CMA minotor support Date: Fri, 18 Mar 2022 08:40:41 +0000 Message-Id: <20220318084041.25949-1-sj@kernel.org> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 In-Reply-To: <5c46548a-04b9-607e-f43a-63545131d336@redhat.com> Content-Type: text/plain; charset=UTF-8 X-Rspamd-Server: rspam01 X-Rspamd-Queue-Id: 6A53516001C X-Stat-Signature: 4rjpkdwzdrk38yjthrxfo6r9o5ima3nm Authentication-Results: imf08.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=LMs11+rR; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf08.hostedemail.com: domain of sj@kernel.org designates 145.40.68.75 as permitted sender) smtp.mailfrom=sj@kernel.org X-Rspam-User: X-HE-Tag: 1647592850-666419 Content-Transfer-Encoding: quoted-printable 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 Fri, 18 Mar 2022 09:29:20 +0100 David Hildenbrand w= rote: > On 18.03.22 06:13, xhao@linux.alibaba.com wrote: > >=20 > > On 3/18/22 12:42 AM, David Hildenbrand wrote: > >> On 17.03.22 08:03, Xin Hao wrote: > >>> Hi David, > >>> > >>> On 3/16/22 11:09 PM, David Hildenbrand wrote: > >>>> On 15.03.22 17:37, Xin Hao wrote: > >>>> > >>>> s/minotor/monitor/ > >>> Thanks, i will fix it. > >>>>> The purpose of these patches is to add CMA memory monitoring func= tion. > >>>>> In some memory tight scenarios, it will be a good choice to relea= se more > >>>>> memory by monitoring the CMA memory. > >>>> I'm sorry, but it's hard to figure out what the target use case sh= ould > >>>> be. Who will release CMA memory and how? Who will monitor that? Wh= at are > >>>> the "some memory tight scenarios"? What's the overall design goal? > >>> I may not be describing exactly what i mean=EF=BC=8CMy intention i= s to find out > >>> how much of the reserved CMA space is actually used and which is un= used, > >>> For those that are not used, I understand that they can be released= by > >>> cma_release(). Of course, This is just a little personal thought th= at I > >>> think is helpful for saving memory. > >> Hm, not quite. We can place movable allocations on cma areas, to be > >> migrated away once required for allocations via CMA. So just looking= at > >> the pages allocated within a CMA area doesn't really tell you what's > >> actually going on. > >=20 > > I don't think so, the damon not looking at the pages allocate, It is= =20 > > constantly monitoring who is using CMA area pages through tracking pa= ge=20 > > access bit > >=20 > > in the kernel via the kdamond.x thread, So through damon, it can tell= us=20 > > about the hot and cold distribution of CMA memory. >=20 > I'm not sure I follow. With random movable pages being placed on the CM= A > area, the mentioned use case of "cma_release()" to release pages doesn'= t > make sense to me. >=20 > I assume I'm missing the big picture -- and that should be properly > documented in the patch description. We don't add stuff just because it > could be used somehow, there should be a clear motivation how it can > actually be used. Same opinion from my side. The purpose and usage of this patch is unclea= r to me. Could you please clarify more, Xin? Thanks, SJ >=20 > --=20 > Thanks, >=20 > David / dhildenb