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 9CF3FC021B1 for ; Thu, 20 Feb 2025 17:24:20 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 203F22802FB; Thu, 20 Feb 2025 12:24:20 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 1B3F52802D6; Thu, 20 Feb 2025 12:24:20 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 0A3862802FB; Thu, 20 Feb 2025 12:24:20 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id E0AB62802D6 for ; Thu, 20 Feb 2025 12:24:19 -0500 (EST) Received: from smtpin07.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 636E1B118A for ; Thu, 20 Feb 2025 17:24:19 +0000 (UTC) X-FDA: 83140996638.07.D502CD4 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf18.hostedemail.com (Postfix) with ESMTP id ACA591C0011 for ; Thu, 20 Feb 2025 17:24:17 +0000 (UTC) Authentication-Results: imf18.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=F9lrXfLo; spf=pass (imf18.hostedemail.com: domain of sj@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=sj@kernel.org; dmarc=pass (policy=quarantine) header.from=kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1740072257; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=9DUhOvrtVJJrgRATMrUDvj1/cfD5KYUZxs8+d3gIHOU=; b=3NFmfazrfEeQvQzTCJG2Qr253fYUsTvqyQ4+2eiZLa2jYdPc5YP3tUMo3lZsXlJUKKSI3V w3g7SFj4KKEwmOEzQNMzD4p9HdTD+jEOpAniUqb2lH3tP0VFIX/bu5JgVDZJ9WQhuwttsz aaYbgBZBlALMCsQnQ1RikJG/TAWBR/0= ARC-Authentication-Results: i=1; imf18.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=F9lrXfLo; spf=pass (imf18.hostedemail.com: domain of sj@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=sj@kernel.org; dmarc=pass (policy=quarantine) header.from=kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1740072257; a=rsa-sha256; cv=none; b=IMmuQYCvBC+inOrwrX3JmqJlAe0G2xyJqQGJk0zpr4e4QRCS1xRV+DTYnYrgrFYbMKx3r0 kbNsM07eopXgq7b183H5hOHmDROre0/cwVaF0CitYp1XnwHIHg5XbbUG5+wZkvDBuwfwoc UnF00F/+Su3M3NUp3/uKpzLEzCrqAD8= Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 893B15C02AB; Thu, 20 Feb 2025 17:23:37 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 343D3C4CED1; Thu, 20 Feb 2025 17:24:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1740072256; bh=0vTN9kKsGessHSXK1lGUwEF13I3IstE4YbEVN7z6DeA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=F9lrXfLoGKdONQDtLR43hvtGmLom/4cETRb9HKRvYXfvtFGfPuB16JSU+eQDALYlt D4CkkHb1drhep3lxmYtX80KPSknuY2OlDgVJXUN5cOHSTwYBUsoJNOA8dz3Y0T9HRi nxfEqVhfKxuJLeNDR1p+nwJ8VxR21jKCDY5p4n12JUT5HnvGyYuDnCVV4d0dSjOz9j G8KFmasxukad5p+neYT67aQ1OiZ7LEi255kov736QD/de0+sW9+lno55E4djrkX4iV OmFJCaZEX2cp3y6l5gLt1gJ7LV3pl5jfg6NpIl4IGmvrc3GCS9YF/IRFJbxLWEV/9g t8LcST/cB8zOw== From: SeongJae Park To: Honggyu Kim Cc: SeongJae Park , Andrew Morton , kernel_team@skhynix.com, Jonathan Corbet , damon@lists.linux.dev, kernel-team@meta.com, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCH 0/2] mm/damon: introduce DAMOS filter type for unmapped pages Date: Thu, 20 Feb 2025 09:24:10 -0800 Message-Id: <20250220172411.41010-1-sj@kernel.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <93792bf7-9507-474f-a8b0-ccd4d59742dc@sk.com> References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Rspam-User: X-Rspamd-Queue-Id: ACA591C0011 X-Stat-Signature: 9e1ec1o9cadxaz4p7ws7du3f3n5bggwu X-Rspamd-Server: rspam03 X-HE-Tag: 1740072257-559910 X-HE-Meta: U2FsdGVkX1++zWj+IS/uj5ndo/tSqbkMWnd1r88lQkO29NnZ6mqOTwooliGteBK/UyNYpvnCqNjWjXzVY+pMZrhpfrt3k+339IIvBzy3S/ZTLbA3jHmQXOzhX9y8H/zR16yUr8kqO8gSmhk1+E50Ijtwy/ieq0Z5pXRoLWBS2B+lBUvx74V7y1h/PCMj1bTaTX18z6PG65ryYwZRFP38Ec8RqUz4A2IsdYa2ZJcHNShx4gJqfhso1oGpq1uLSKJr48ds1waZww9sNXprTzas7TaMoO3AgMKFUiMf05NPuzKFu7+ACcvAhGLdfOCY1QsY/xWR0XUKUC0AwkA7x3eDgvYgidPyvjOhuJs/M5IEo3Gi1l26H1wmx2ESFV4yxZsk50qG8ijYEp0cz3+ubBFNn+40l47GQbblJp4cithoHX6cfc1Kz4XVlVJZpP2iZ2vn6ddw6Wi4ORYsMTzrzF3o5JqoIM+baV0oaxEjihDeEo7XDhL83+HqezswQKfGpK3N5MbVq7sU2ljjm8q6+Hny58+mFO2utLxD3on/87dM/lGlw+N/IwU91taXBjx+DTsWUUlgxAbacdMdTKlB6AOzC5ecSEXGQZvEWiq24W9cHU7ENI8Z0T0DSTz1g7qvxZxDyIyfSl5+517Kx9nblqMs9X964LNADb4C855aVu1sX8S5/rKnrNqC/EMILpZj4qYBnB5cZvnKAA8aaLuDRNoSp2uDYsYI0pIgBjUBtPlR76N6eluKJWm4o4/EmKxBAO7x80RG5w3s49tUWjmYhnVspiCfQat5nv9sIcum9xtzVJlfuZTjkRi1kSvB+8YyvFY+hfrSGgAyXyoDjUN9kYa2qyz7QpH9YJPUa6IISukYJtESWFNI265lkoR5E2JUvhMQw8Z0zUnbHP4v7rY9J7UG6B2OiZuZqnEnJ8qEXuFMtuXWAvsjci1VuTWGNhTyPCtMuACyqCuSN2EYdCmjRC7 DJo7D3ut RMh0efQu/p0T0L+2kstHfc3agcZJe7B3OLRJv9Z86tdeJKdQrfKRngARIkSUqEp+Q7gwzFYyipTdSMmrjVVphqAvOSGZBut3CZtGdlSd8OTYVf72ItwLtgt+nya/Db9UiEipR4toldCVac9GxRpPz4kIdnZj2ROyFCNZTlPsPTyLTFyxdjgVgtuVVAF5ROZ0fjjj3r0OKK0EPQeIbFpXJ8VlQk4Ym+C7pLTa3yjC/Rz4riAJtPMUoIAwIzje1VmT5EGggM7WahwJ6Tn/P/LMGRu0d3vC9pL+uA+vplmj6ZeP99WX+zLWgfPYfGQ== 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: List-Subscribe: List-Unsubscribe: Hello Honggyu, On Thu, 20 Feb 2025 16:45:56 +0900 Honggyu Kim wrote: > Hi SeongJae, > > On 2/20/2025 7:01 AM, SeongJae Park wrote: > > User decides whether their memory will be mapped or unmapped. It > > implies that the two types of memory can have different characteristics > > and management requirements. Provide the DAMON-observaibility > > DAMOS-operation capability for the different types by introducing a new > > DAMOS filter type for unmapped pages. > > I asked it before at https://github.com/damonitor/damo/issues/13 about > monitoring unused paddr area but I see this patch series is related to > applying DAMOS action. My understanding of "unused" memory that you mentioned is memory that not allocated for user data. This memory cannot get accessed by user, so DAMON treats this memory as always not accessed. "unmapped" memory I'm saying about here is memory that not mapped to userspace. For example, unmapped pages in pge cache. This memory can be accessed, for eaxmple through page cache using read()/write() like system calls. So I think this is not really related with the GitHub discussion. Please let me know if I'm missing something. > > Regarding that, do you think we can skip those unused memory area using > this filter before applying DAMOS action? So, no. > > I'm not sure if the current DAMOS tries pageout/migrate action for those > unused area because they are detected as cold area although those will > be imediately skiped inside action scheme. This is the current behavior. DAMOS will try to do whatever action to whatever region if requested, see the action is not applicable to the page, and move on to the next page. Please note that filter-based page level skipping is not that different from the page level action applicability checking. If you know where "unused" memory located, and you want to make DAMON/S entirely ignore it, you could use DAMON target address range, or address range type DAMOS filter. I'm not sure if this is what you're looking for, though. My understanding of your concern about "unused" memory on the GitHub discussion was more about adaptive reions adjustment efficiency. I recently posted[1] some ideas to improve the mechanism. Any feedback about the idea will be welcomed and help prioritizing it. [1] https://lore.kernel.org/20250213222303.244724-1-sj@kernel.org Thanks, SJ [...]