Received: by 2002:ab2:1689:0:b0:1f7:5705:b850 with SMTP id d9csp18828lqa; Fri, 26 Apr 2024 12:53:07 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCX2o2qZrpzsdpon80Brkmc0NPWmJDRp7l0rvDj948tfSebOIeddVDGeHV9qeluN3VR79OPOS4eCO2tbrHcilHjQXP5BQA2hLFcCh3Q4Bw== X-Google-Smtp-Source: AGHT+IH0ffdLQg/I5xzBeKW2bE8G0nrBoG4IpTWMe1KnympcH0TXO/BzIUcB9I+gvae99Ft0m+CK X-Received: by 2002:a05:6214:501d:b0:6a0:9f54:6013 with SMTP id jo29-20020a056214501d00b006a09f546013mr4180825qvb.2.1714161187351; Fri, 26 Apr 2024 12:53:07 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714161187; cv=pass; d=google.com; s=arc-20160816; b=OfiuE5JO1/bHq5Uui+u/1Jz8dA8iyy76Eu4YYqEz3Xnw2lkLvSYsOAAh/veA+fdnBl aZRkoeaxi8v9azkkvzLfsY3gazD8Do1vV2ju3rKt9vFRT+dfQcxDdqZT+El2hC/wP1hB mBn/02w9ostOyXDcErw4NvU1lPd80zuCxSCheeiENagasSXHHww9vOztBC6S6tAtNQVF X/a2vi2iyvMaX9dEBIj4ZKNbASzKrmDvghGm7wa8E7/AoXWwZS/cucBrHkk7c3hJdyQZ p0ljxmnxVDV7+kdszCQVJhPIMyIMoJM76TmkERdWzpNarMNpBob5GIrRmyKHG3m9S9Mg xkAg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=5nVREtd0aJ2AfnMkIMgDH0zHIL0ORKSsXBvwLFfiYxc=; fh=jKijsxc1Z2CHKVFf4S4lB42jMLcn6gTpewOn4Tq1/VM=; b=mX7PMDRQNovDa52x9cweeKfkfv9PT8Mci5FfMLKuYpSNeEo1uVNRfVPKhHuhER2PHz V8mBPT4rJS1FK+yZrXTEHKpv5Bb5ca0RJTtdQljnp30RblYVXbqqybbHdF+8KUX13ZIT gd6qR2sqOb+DMeEM0m8u9RsRgAoea01Aq4W34ii7AviHfHBZGl1CSiBP45H6NJZ1BV6E yjGwfFZHNRtIOjLXpY7EspjTD6TThvtZLU9h0a2tzEXn+jCKV8S4nmZ1z/zxTcvhqLla 4RWWZ0RYGpyXP8roA/mWO4JtnO3AaiwuZlpoS894N+2Pd/NDXLuXBHq0xYKMy4gtrrvM GgMQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=BVVGWpEo; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-160633-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-160633-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id i12-20020ad45c6c000000b0069b6afaf166si20863255qvh.131.2024.04.26.12.53.07 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Apr 2024 12:53:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-160633-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=BVVGWpEo; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-160633-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-160633-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id E4B741C21D83 for ; Fri, 26 Apr 2024 19:53:06 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 631A8208D6; Fri, 26 Apr 2024 19:53:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="BVVGWpEo" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 883A1BE4A; Fri, 26 Apr 2024 19:53:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714161180; cv=none; b=fvRfvWaBlEdDwiY5xXC5MeuoBqcfaV0mKZXKyd+Cu/gbgDdbQNeCaDTQh664jYLGngT9XNOQvwXdwgTAQhFv3/l9+gE99zShdPn6q2pVljbdoCakTCWPOPUhSmwFOy5CkJeskUPNXnx5bWjKI2ZFYEfvmw45bziH6iv9lJjhvPg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714161180; c=relaxed/simple; bh=KDQABXFXICsHnj+v3YhXIoEGy+Tp7EqKpAZ8dhNvvfY=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=LZHIra1oLEoZc1QKFY1zrrdYAEBGtZbHBtIljPRDVrcpnn/TAe4nxa45rKFMIpkD7+2qHdzhiB83Eec6HwgsaRZS/4ZBOBbcxN21hjuQconFNNvmQye/sg/9rxeexKIlHXAsb0Yh482oZ/C2By/l7YR2+ssccjF1sKNbDc1rCEc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=BVVGWpEo; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7F525C113CD; Fri, 26 Apr 2024 19:52:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1714161180; bh=KDQABXFXICsHnj+v3YhXIoEGy+Tp7EqKpAZ8dhNvvfY=; h=From:To:Cc:Subject:Date:From; b=BVVGWpEoAs/HVIHW1jVbh/MGwqLjrbJJESwz32Kkj9LuwJ2IL5OXifVSlfWAbA5Ce eECBaZlWlXZF+bSDyrZlFkjGOW4iDt41a/tmJEaGcI/iDhioMwYsXYr/Owm3d0OTyR y+m4GRFg5UXOJKz58ElhqUoqEDxSmOFWLDTtSHiPi2pHWM+VTGbmMk6bU19VkD74m3 snsA/YQyeJQLeZIknVZcuxpLWlGx/U6PNcEM4UqVF/jmIGZAJQIOv6US7qQs3TRcDh xlBqfihJ81nPUHd5Tl8XMItzJDDpmZzyxY27WnknsG1uuK7ipjIezKg9PR6aT9T8Xi O8hDAE9+BMYzg== From: SeongJae Park To: Andrew Morton Cc: SeongJae Park , Jonathan Corbet , damon@lists.linux.dev, linux-mm@kvack.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 0/7] mm/damon: add a DAMOS filter type for page granularity access recheck Date: Fri, 26 Apr 2024 12:52:39 -0700 Message-Id: <20240426195247.100306-1-sj@kernel.org> X-Mailer: git-send-email 2.39.2 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Changes from RFC v2 (https://lore.kernel.org/r/20240311204545.47097-1-sj@kernel.org) - Add documentation - Add Tested-by: Honggyu Kim - Wordsmith commit messages Changes from RFC v1 (https://lore.kernel.org/r/20240307030013.47041-1-sj@kernel.org) - Mark the folio as old if it was young - Rename __damon_pa_young() to damon_folio_young_one() DAMON provides its best-effort accuracy-overhead tradeoff under the user-defined ranges of acceptable level of the monitoring accuracy and overhead. A recent discussion for tiered memory management support from DAMON[1] concluded that finding memory regions of specific access pattern with low overhead despite of low accuracy via DAMON first, and then double checking the access of the region again in a finer (e.g., page) granularity could be a useful strategy for some DAMOS schemes. Add a new type of DAMOS filter, namely 'young' for such a case. It checks each page of DAMOS target region is accessed since the last check, and filters it out or in if 'matching' parameter is 'true' or 'false', respectively. Because this is a filter type that applied in page granularity, the support depends on DAMON operations set, similar to 'anon' and 'memcg' DAMOS filter types. Implement the support on the DAMON operations set for the physical address space, 'paddr', since one of the expected usages[1] is based on the physical address space. [1] https://lore.kernel.org/r/20240227235121.153277-1-sj@kernel.org SeongJae Park (7): mm/damon/paddr: implement damon_folio_young() mm/damon/paddr: implement damon_folio_mkold() mm/damon: add DAMOS filter type YOUNG mm/damon/paddr: implement DAMOS filter type YOUNG Docs/mm/damon/design: document 'young page' type DAMOS filter Docs/admin-guide/mm/damon/usage: update for young page type DAMOS filter Docs/ABI/damon: update for 'youg page' type DAMOS filter .../ABI/testing/sysfs-kernel-mm-damon | 6 +- Documentation/admin-guide/mm/damon/usage.rst | 26 ++++---- Documentation/mm/damon/design.rst | 20 +++--- include/linux/damon.h | 2 + mm/damon/paddr.c | 64 ++++++++++++------- mm/damon/sysfs-schemes.c | 1 + 6 files changed, 70 insertions(+), 49 deletions(-) base-commit: 4b4dd809460911d6c406bb45d2c627a9e5734468 -- 2.39.2