From patchwork Wed Jul 24 01:10:29 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Houghton X-Patchwork-Id: 13740500 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 00C03C3DA49 for ; Wed, 24 Jul 2024 01:11:25 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 8DCFF6B0089; Tue, 23 Jul 2024 21:11:20 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 863856B008A; Tue, 23 Jul 2024 21:11:20 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 6423A6B008C; Tue, 23 Jul 2024 21:11:20 -0400 (EDT) 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 315806B0089 for ; Tue, 23 Jul 2024 21:11:20 -0400 (EDT) Received: from smtpin11.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id D5A7916053B for ; Wed, 24 Jul 2024 01:11:19 +0000 (UTC) X-FDA: 82372867878.11.87B13BF Received: from mail-yb1-f201.google.com (mail-yb1-f201.google.com [209.85.219.201]) by imf29.hostedemail.com (Postfix) with ESMTP id D528312001C for ; Wed, 24 Jul 2024 01:11:17 +0000 (UTC) Authentication-Results: imf29.hostedemail.com; dkim=pass header.d=google.com header.s=20230601 header.b=CXKDgTUW; dmarc=pass (policy=reject) header.from=google.com; spf=pass (imf29.hostedemail.com: domain of 3tFSgZgoKCBsAK8FL78KFE7FF7C5.3FDC9ELO-DDBM13B.FI7@flex--jthoughton.bounces.google.com designates 209.85.219.201 as permitted sender) smtp.mailfrom=3tFSgZgoKCBsAK8FL78KFE7FF7C5.3FDC9ELO-DDBM13B.FI7@flex--jthoughton.bounces.google.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1721783425; 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-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=yD4XBA3wulmfL9cZplrhNjvZpnpcy308OK8qykR4vJ4=; b=uCvcxMl9yPW8jni/I3Jik+Kq4bh6aGp39V331tPJpi0mL8PPUxxDcZ79oYg8HG6sTxu0MF TfsQ/vseP6aAmrzOmXSAMhdDSzlSlKXOaeJcwUsvMX9jja9fScVvxgbw1fcy3XV6Msq9LY qaFsMYfrfD08IiSGLlcC1w1tv2WOlk4= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1721783425; a=rsa-sha256; cv=none; b=H1G3+K3J5QsY16nhH6eYajIu33zroLF8cbqzFz5v0825ucMtapwATiBdh8uW6uf8W+6fkz GPBOFBMTqcA0Opk1u/JnxHZuL8lMDDh4S+RMe6T9dyGATfMIAXK8Q7Lg+NJTRsm9L8isW9 B15b0ZEt7ZAwAXHsjeUj7unFLfiA1+g= ARC-Authentication-Results: i=1; imf29.hostedemail.com; dkim=pass header.d=google.com header.s=20230601 header.b=CXKDgTUW; dmarc=pass (policy=reject) header.from=google.com; spf=pass (imf29.hostedemail.com: domain of 3tFSgZgoKCBsAK8FL78KFE7FF7C5.3FDC9ELO-DDBM13B.FI7@flex--jthoughton.bounces.google.com designates 209.85.219.201 as permitted sender) smtp.mailfrom=3tFSgZgoKCBsAK8FL78KFE7FF7C5.3FDC9ELO-DDBM13B.FI7@flex--jthoughton.bounces.google.com Received: by mail-yb1-f201.google.com with SMTP id 3f1490d57ef6-e0875f9f7ceso801581276.1 for ; Tue, 23 Jul 2024 18:11:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1721783477; x=1722388277; darn=kvack.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=yD4XBA3wulmfL9cZplrhNjvZpnpcy308OK8qykR4vJ4=; b=CXKDgTUW27Z5zrbIeeYEdA7LLPJw8ggOAZKTxhVB1iS5yy9wDsMVq/+6+IFDo/VRuY wkbO+b0L0/ilryhSqQ0lLxzG9bxRJDJgNekZTIap4Gu0qSZG9ssUiqZQqG8jwWmuEMvY QXCdE2Z9rCMuS8tH5KEqgYpHpQ+Jex1yAWJ9r86etr+DvD7tv8rgOVJcaIbMaAtQU1iz PT5+w0PG94NYSKAoMSIQUtP3inQyYAt1dP+YDc+OhStqu4t7iAxeSmzYc4Y5Un9X3Qhq BXY/Nev1nHnRu6Quqs7xKrIMJ+qoaiYxpJCdhGtHUChbSK6J9K/ys/7ncGtK4zhrRTlF N0Cg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721783477; x=1722388277; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=yD4XBA3wulmfL9cZplrhNjvZpnpcy308OK8qykR4vJ4=; b=wnVjyaaT18Uc75jzUinnfCS682GC+pLRLNl42LBRUD2lpxMQGeq0sKZo9gDIJZfab3 jgJwFIi+7ux+AnM6xXyk7zCsn6xCmIySXBQ4qrJiykpzIDcjyC47ksR7xtNOBbKwDapd KoaetuQAOYDhzEwauypLceWegiUGZ+bL0X73FZssWhaQL5jJOdS3yRew1bDpSh7dWcyI fEeeQkewg3CSnyTIni3MbD+eVipVR3c8/h2594kYpaWX7ppazXoM85KC2QqUGgXr+qjj 3IeBMLl4h0XJy/R5j0rTQmtCTHRcI3m3qjlY7/3I3hFCYWIq3Emjk6yqtRnWn7VF4vNT J7Pw== X-Forwarded-Encrypted: i=1; AJvYcCXTwPOiqVVSPHrEdjsAQClfbk3DTnTStuOQCYVmi7lW7MqXPHwW7ANajpql1d/jwz59C5/wC1JilpLr+roiKkMg+y0= X-Gm-Message-State: AOJu0Yy9yRWj2XZm/JL4cgalLMAe76YCtMCQE9MK9bZCgRDQ77sdrPQ1 sDVEv5ZqIyxvqjNLF03CKvG1DSvNLKjlSCkZq8e5BIhHXq8ai354VpcWaPZZtQ+4BByrSYM+r+Y MHzLhCp4dcN9XvQt33g== X-Google-Smtp-Source: AGHT+IGa8qCTH1LNH/hmEAmVML0lM3qLC3vgS4lo0iysyChD5iecelBKp5Dde0rCv2FIne41yj4Q4w4VDl3wLvaY X-Received: from jthoughton.c.googlers.com ([fda3:e722:ac3:cc00:14:4d90:c0a8:2a4f]) (user=jthoughton job=sendgmr) by 2002:a05:6902:72b:b0:e05:a1df:5644 with SMTP id 3f1490d57ef6-e0b115446e0mr18142276.2.1721783476871; Tue, 23 Jul 2024 18:11:16 -0700 (PDT) Date: Wed, 24 Jul 2024 01:10:29 +0000 In-Reply-To: <20240724011037.3671523-1-jthoughton@google.com> Mime-Version: 1.0 References: <20240724011037.3671523-1-jthoughton@google.com> X-Mailer: git-send-email 2.46.0.rc1.232.g9752f9e123-goog Message-ID: <20240724011037.3671523-5-jthoughton@google.com> Subject: [PATCH v6 04/11] mm: Add missing mmu_notifier_clear_young for !MMU_NOTIFIER From: James Houghton To: Andrew Morton , Paolo Bonzini Cc: Ankit Agrawal , Axel Rasmussen , Catalin Marinas , David Matlack , David Rientjes , James Houghton , James Morse , Jason Gunthorpe , Jonathan Corbet , Marc Zyngier , Oliver Upton , Raghavendra Rao Ananta , Ryan Roberts , Sean Christopherson , Shaoqin Huang , Suzuki K Poulose , Wei Xu , Will Deacon , Yu Zhao , Zenghui Yu , kvmarm@lists.linux.dev, kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org X-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: D528312001C X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OGEltolcSb4SUTqoh1Lc2agDgB3huJnpMnwekSyst9V77eUhj2w6Cl6ie8+8SZyZtyG5tyAt1vLKDDA1pUlQEWuDD+/CTx1NU5ntsE++H4xlPW0MCA6YeEUFmTWnYOtTr2uQb+qtVRnEk5JlxOFG06yFeRKSDfr1hH+geUziS6zUggOavGW3gmvus1XA3OVblVi5DGvow+jNV8X/syZJO6Tx0eu16XaOu8Lj4Tgd/ZGQhYwHwu9nzN68/jkQUiowkMAz2gIp/GMXyUpVX0RZaSrWZ/+egIOTXJQVk7jrQgdXOwgP0DntXjEicftSjaVOT7oe6BtMdg0lfvg4ZO8GMqSoxeOn0p/XEY89TObmzC94QMw40yoBYXH9I+giaZxco2gDSmNNpRkP3W0ePGZufY34vRxEmokekmW64eevQULjlgquslbDPoHTIYt6QNL9A5+O6d0jq1D0elCTi0aG214V2U5S/EceCSLYiNsqnT59C6+F/kUY2AlIwHvMUdKGT5ZlghIb06KHma49U81mVFduLGjWcZ0+RvyYCFXfke07Eqx3b/IgpYSZ77xLJtoFbf6bfcKiWutKijiLGtivqTyjhjTbLBy6JSvUjnyQEiLDkSYDUbD1tPAEV0eS20v 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: Remove the now unnecessary ifdef in mm/damon/vaddr.c as well. Signed-off-by: James Houghton Acked-by: David Hildenbrand --- include/linux/mmu_notifier.h | 7 +++++++ mm/damon/vaddr.c | 2 -- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/include/linux/mmu_notifier.h b/include/linux/mmu_notifier.h index d39ebb10caeb..e2dd57ca368b 100644 --- a/include/linux/mmu_notifier.h +++ b/include/linux/mmu_notifier.h @@ -606,6 +606,13 @@ static inline int mmu_notifier_clear_flush_young(struct mm_struct *mm, return 0; } +static inline int mmu_notifier_clear_young(struct mm_struct *mm, + unsigned long start, + unsigned long end) +{ + return 0; +} + static inline int mmu_notifier_test_young(struct mm_struct *mm, unsigned long address) { diff --git a/mm/damon/vaddr.c b/mm/damon/vaddr.c index 381559e4a1fa..a453d77565e6 100644 --- a/mm/damon/vaddr.c +++ b/mm/damon/vaddr.c @@ -351,11 +351,9 @@ static void damon_hugetlb_mkold(pte_t *pte, struct mm_struct *mm, set_huge_pte_at(mm, addr, pte, entry, psize); } -#ifdef CONFIG_MMU_NOTIFIER if (mmu_notifier_clear_young(mm, addr, addr + huge_page_size(hstate_vma(vma)))) referenced = true; -#endif /* CONFIG_MMU_NOTIFIER */ if (referenced) folio_set_young(folio);