Message ID | 20221221180848.20774-4-vishal.moola@gmail.com (mailing list archive) |
---|---|
State | New |
Headers | show
Return-Path: <owner-linux-mm@kvack.org> 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 DD42AC4167B for <linux-mm@archiver.kernel.org>; Wed, 21 Dec 2022 18:10:06 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 810788E0006; Wed, 21 Dec 2022 13:10:04 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 7997B8E0001; Wed, 21 Dec 2022 13:10:04 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 661968E0006; Wed, 21 Dec 2022 13:10:04 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 424DD8E0001 for <linux-mm@kvack.org>; Wed, 21 Dec 2022 13:10:04 -0500 (EST) Received: from smtpin20.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 15F3E1C654F for <linux-mm@kvack.org>; Wed, 21 Dec 2022 18:10:04 +0000 (UTC) X-FDA: 80267102328.20.4D376EE Received: from mail-pl1-f172.google.com (mail-pl1-f172.google.com [209.85.214.172]) by imf10.hostedemail.com (Postfix) with ESMTP id 5369CC0005 for <linux-mm@kvack.org>; Wed, 21 Dec 2022 18:10:02 +0000 (UTC) Authentication-Results: imf10.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=Kg1XMQEX; spf=pass (imf10.hostedemail.com: domain of vishal.moola@gmail.com designates 209.85.214.172 as permitted sender) smtp.mailfrom=vishal.moola@gmail.com; dmarc=pass (policy=none) header.from=gmail.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1671646202; a=rsa-sha256; cv=none; b=d7qUwzZgm8WtabOAI/Ts4BBWPfzlRo9IaEV5AAFmjHcuXrK+h4Ig0lVTd5xaq9XPFeuLY4 cGXLUCrF07f9wJtQZ0hKv2FxjNjU1y6col8phyS/3RQJ7YX75pYiJAlgkdh1yuCU2awo0a +21D21Aql7SCeDBbmZTGsY1wlTJ5lmw= ARC-Authentication-Results: i=1; imf10.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=Kg1XMQEX; spf=pass (imf10.hostedemail.com: domain of vishal.moola@gmail.com designates 209.85.214.172 as permitted sender) smtp.mailfrom=vishal.moola@gmail.com; dmarc=pass (policy=none) header.from=gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1671646202; 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=FV2WgQnkGF47aHXwNmitYREK9VpntY4pGASooxA0vsY=; b=DzmH9XyDZIRxbw4CjIgpZdRHtQw3y38PfBpB0bFueR8wU5QRLSWWbDQW5kGLPnGDBqevxB FJaegNScGsrh82VWwRv72uFhBdBvIGS7ZzUXmVuFAmfdUkLxf+NbXccAEsiyJznbJXNnY9 kAjAMyhkmTnuaiwpqCGUhB+BieKE500= Received: by mail-pl1-f172.google.com with SMTP id d3so16273923plr.10 for <linux-mm@kvack.org>; Wed, 21 Dec 2022 10:10:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=FV2WgQnkGF47aHXwNmitYREK9VpntY4pGASooxA0vsY=; b=Kg1XMQEXGj1P5eOMqXh9QBRNWX72E0HNrH5TCgKFnOpXQ2PKPJ/sz6VxqwbRyP/31V MEmCQ6M7lOfXMYadzVs6SjgDmAss0zjsmJK+uqicKnmQ9sdkMbv2Ozm+wTTKQB8ApVST qq80B8WfhDV5+VU0L4rDCOu8K1aHQgwVp4S65V4p5WDwKqRzhkAxDvZFe797MPsGnHxP Ju6eeykfM32/T1VluTLvZsUJWDesdEtZMnarwoMvG+YbjVXTJM3LBa7W/XXgkEshQssx +VSCbILH93R98OybhCiHIVOpLPyUmZHjaoADCn3LxYw9gPFLuWf1FUY6p2QDR1t71LWv W+Tg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=FV2WgQnkGF47aHXwNmitYREK9VpntY4pGASooxA0vsY=; b=g6IiBXlXU2vWYCFxAaSsD2NI1JLf4FyOZQtPRxEVOqNy1NqlVZLqd0QfXwIfXK1Zui 9YKdA2l24EpfSBxQQaWoCKkhYZu2Nqu3j+r6dbm1N6eyjO0ZIvF+eSUKG4nVqiWFoZ+t n5w0bRaig8GIACms46lIkSsddCQm/jFyxT7iUyIaqCnGQG61fOxbGz3J1RHjb70oMytd s5QVG/9WXLWGlqnU3bZlPwOzrog6nKijUuafSWfLTOWmZ0GOi3d9mCiPi6cHrC4PVI5u CYCumeQP0lqoy5TFgxpNFFQMQ22DoVL1gSKBvtV0u370HVXNedUAGcnMte3krUVribzE VbXQ== X-Gm-Message-State: AFqh2krzkpP/WLcgqeVvdyabV3ZDkKNEwPrOGoNYotLmZF5c7byLTyyu 3n7SRryg3mTrzHJn+QRh84pTR3xBiVhBag== X-Google-Smtp-Source: AMrXdXu5VDOIqKGM3A+JT0KCVz3Bkip3v+cF2w+L6Cyr9LUNlLEY5S39vnlLyv1Nvgic1ZQTYgvR9Q== X-Received: by 2002:a05:6a20:d38c:b0:af:a276:2f94 with SMTP id iq12-20020a056a20d38c00b000afa2762f94mr3868375pzb.35.1671646201070; Wed, 21 Dec 2022 10:10:01 -0800 (PST) Received: from fedora.hsd1.ca.comcast.net ([2601:644:8002:1c20::a55d]) by smtp.googlemail.com with ESMTPSA id e26-20020a63745a000000b00477bfac06b7sm10110732pgn.34.2022.12.21.10.10.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Dec 2022 10:10:00 -0800 (PST) From: "Vishal Moola (Oracle)" <vishal.moola@gmail.com> To: linux-mm@kvack.org Cc: damon@lists.linux.dev, linux-kernel@vger.kernel.org, akpm@linux-foundation.org, sj@kernel.org, willy@infradead.org, "Vishal Moola (Oracle)" <vishal.moola@gmail.com> Subject: [PATCH v4 3/4] mm/damon: Convert damon_pa_mark_accessed_or_deactivate() to use folios Date: Wed, 21 Dec 2022 10:08:47 -0800 Message-Id: <20221221180848.20774-4-vishal.moola@gmail.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221221180848.20774-1-vishal.moola@gmail.com> References: <20221221180848.20774-1-vishal.moola@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Rspam-User: X-Rspamd-Queue-Id: 5369CC0005 X-Rspamd-Server: rspam01 X-Stat-Signature: 5g3t7nxmteuqcffkpfhw6dbxodu6mote X-HE-Tag: 1671646202-408857 X-HE-Meta: U2FsdGVkX18/ZxRYTLSeLzv+iqvreFqKbmGe6WBac3P97zxN9b3RhWREdAwlBStz0dmB7K1x7kSlcv8t5XEs7fWeEwK94bw/UodmAannEzfuj+7r5SYeF9UDPbj5YBWPaMLu36q8jTmk/PwWVyvnpgXil/MOYWASmCoXEKu6L+k90ymcD+3uUc3+1PGXtyH2qQ17J/wpV+z5WgPPWfZ01oshNfubwQxA/VHxEcjGG6fwM0D5iYC9+Q93wkleT8tMXd8eVJ7KVeVwPKbT+eqU77iKBFtmZOGm1fpmeLXS37DQ0H8374+EdRiGwoLdsAmH3N9P26T4dkWqYJRSua6NqDqG/0k/AY8Hw4jJ6DZFKfhJUxDEKBN3XrGiaX+CoiQGe+lcR8tk9ivOKEW5J92bIU9kwkeYYbGZt5+4eQ/q7Npscs56a/WhUVHrHKvcKP79q/mgw2f/C6xKUXZNWRSfpVtTC9aEoYRIwAP/wVh2WuESjFi9rlpWDtyXLh4cnJe2s9uLQk6aKX7GanYVvL9swoFUrsfiU4dwSySjJRl7AOblvEdgQ4CdPi57NZbp+u0X7NDTkrobnxBqz2NmjW3JtrLCGUJB+lz5qpmwlmW5V6rTqUapOyWFNdVAgKp8zCEN6ECxYkjGmOhHRUCH6rfXJp66nnKSln/HkrV0/6oqhU2QTOYXuLp696m08rU+PMSYVqUvs5NByRISdUBdIjaRxBWz5bZYWS1Df5/OrZwYjEeIegW0Pp+DySdkIEcT8uvkqMEo3ycIGqHQBIYbmNhxS8LczAJN/vLTTSBrCNWPAh2KuzTlrzCCG4K/Ez30N0TGK8pdTr5FMsCI+ozkjbQdrtPJRf3E6qQsKk33eBPJhCE1C3edzIp5wO/0BLn5YQO1JSfJLfd8iG4n5fTkZGodotgRyY30aDo+SlGpgZ4k/ERZPruuWToRJ7sN7SeVvcsQSr391vIwefin5M/s7sW kwgl6M66 /V9a84QfhKHXd/iYllVV+tgspjXpPhMRDhr50mRQwnomfDPZv0trmPXQHVvHh3OzFdQ1NYRJTIKy9KmAcFczDJuX9gbqx5CXMJBO8dHCQ26jOH/XhHzTQyr/3qAyhNgWoY+ZIpk9LyJkKDcMCFYvGoNgpsB/PMA6bSvDkJ33VLfFpZNCILyLG5Mys2CLbVG3SrKADx3R244h+rb2mzlpQMnZ0ZoJGl6y05X1kWIwq6Lea1GfdzmKB+AduXObKCilDOGZz1Td3QadbPKnTaXWcjN5Jvw== 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: <linux-mm.kvack.org> |
Series |
Convert deactivate_page() to folio_deactivate()
|
expand
|
diff --git a/mm/damon/paddr.c b/mm/damon/paddr.c index ebd1905eed6f..884c8bf18b12 100644 --- a/mm/damon/paddr.c +++ b/mm/damon/paddr.c @@ -283,21 +283,23 @@ static inline unsigned long damon_pa_mark_accessed_or_deactivate( for (addr = r->ar.start; addr < r->ar.end; addr += PAGE_SIZE) { struct page *page = damon_get_page(PHYS_PFN(addr)); + struct folio *folio; if (!page) continue; + folio = page_folio(page); - if (damos_pa_filter_out(s, page)) { - put_page(page); + if (damos_pa_filter_out(s, &folio->page)) { + folio_put(folio); continue; } if (mark_accessed) - mark_page_accessed(page); + folio_mark_accessed(folio); else - deactivate_page(page); - put_page(page); - applied++; + deactivate_page(&folio->page); + folio_put(folio); + applied += folio_nr_pages(folio); } return applied * PAGE_SIZE; }