From patchwork Thu Sep 26 01:34:59 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Houghton X-Patchwork-Id: 13812686 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 718BCCCF9EB for ; Thu, 26 Sep 2024 01:35:54 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id EED4B6B00C3; Wed, 25 Sep 2024 21:35:31 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id E9DA56B00C4; Wed, 25 Sep 2024 21:35:31 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id CF03C6B00C5; Wed, 25 Sep 2024 21:35:31 -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 ACFE26B00C3 for ; Wed, 25 Sep 2024 21:35:31 -0400 (EDT) Received: from smtpin15.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 5BD7A16071F for ; Thu, 26 Sep 2024 01:35:31 +0000 (UTC) X-FDA: 82605172062.15.4DBB289 Received: from mail-yw1-f201.google.com (mail-yw1-f201.google.com [209.85.128.201]) by imf09.hostedemail.com (Postfix) with ESMTP id 7E2FA140018 for ; Thu, 26 Sep 2024 01:35:29 +0000 (UTC) Authentication-Results: imf09.hostedemail.com; dkim=pass header.d=google.com header.s=20230601 header.b=nzrkjRsR; dmarc=pass (policy=reject) header.from=google.com; spf=pass (imf09.hostedemail.com: domain of 3YLr0ZgoKCOUQaOVbNOaVUNVVNSL.JVTSPUbe-TTRcHJR.VYN@flex--jthoughton.bounces.google.com designates 209.85.128.201 as permitted sender) smtp.mailfrom=3YLr0ZgoKCOUQaOVbNOaVUNVVNSL.JVTSPUbe-TTRcHJR.VYN@flex--jthoughton.bounces.google.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1727314493; a=rsa-sha256; cv=none; b=fNi17HC2k1MEylOUlVqLLD5Mw5b4xu/6RzQhPTxFtlJVFeGkQT+uuQs0tI7UXH0XXY9rhE BAlwLzqKZ97fd1/lvNiCmVeieyOGqHtheb36q1DIbRtJLSYpydaYAfxcwVsrERyE2YCUcq kfLCMEeIlqgp1HZIkpyil0z1xQetn0Q= ARC-Authentication-Results: i=1; imf09.hostedemail.com; dkim=pass header.d=google.com header.s=20230601 header.b=nzrkjRsR; dmarc=pass (policy=reject) header.from=google.com; spf=pass (imf09.hostedemail.com: domain of 3YLr0ZgoKCOUQaOVbNOaVUNVVNSL.JVTSPUbe-TTRcHJR.VYN@flex--jthoughton.bounces.google.com designates 209.85.128.201 as permitted sender) smtp.mailfrom=3YLr0ZgoKCOUQaOVbNOaVUNVVNSL.JVTSPUbe-TTRcHJR.VYN@flex--jthoughton.bounces.google.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1727314493; 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=V1Z3PBXE4Aegel3/riahgcLFAyLXvOzS5uEE7fXt5qw=; b=CuCPY/2fd+nK9t6pTTNpfguZSAVPNY39XlUCvCF2UHSRTS2IR+tOtTqxrVesnIqI2h1RgL UcT9OgxtaH1lKFc0xf9UbR4DLQ6MI07wL3oGnhUbvWYdnEgZw/F9P0new6na5O1pBzCTJH INuvWdcyloRP/fP8A97AKKuh2Ed/ikY= Received: by mail-yw1-f201.google.com with SMTP id 00721157ae682-6e2146737ccso12364017b3.2 for ; Wed, 25 Sep 2024 18:35:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1727314528; x=1727919328; 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=V1Z3PBXE4Aegel3/riahgcLFAyLXvOzS5uEE7fXt5qw=; b=nzrkjRsR5w7kb/dy2dqchO8tsWBXD4eLxRQpRv5bE9rVyQKWiRR3N9YtvyEaKsIKlj kodQ6G0aRLWIIdbfnpruTHGI4xzvuxq3GCTmXo9mWJhUB3NyZdhr429ebWZsmzT5QQLf WZaLeyaF9dxkee5bVUBLZQQwSbQQ3ypsN6CpvxV7hZ1b9dfN7mADbyeNG/GImYjhlYPk mrg1zPeCd7+XH4OpNE8WAhO3DoEyGt539ZmbTD5QMhGbePPVO9yBeaqp6DHKdT/0Lmq5 OLFdP8BIIDgpKEKVSIOjNtOsXfIlu+HAJmXkJtUrzAWWn/do99d+z3Oazh7F1EK/B/jh AiPQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727314528; x=1727919328; 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=V1Z3PBXE4Aegel3/riahgcLFAyLXvOzS5uEE7fXt5qw=; b=Y+o5xymL9m+JuNrK1C1CYQiYmsV4/ZantEKB9poEvbAqZl2VVyr1HdStuhLp9EUzF4 JaH0oo/OvqTTqQGveHl3OWsQA3wTuj67sIViIHtOYp9bfjGoov20B94iewlWDe7O3o5Q mlzQOyROwSGx9FJaB+z0rVmkPg1RYFZ/NUnIEYny8bO2/wuAwlGw4hz5uq/8Hvy6D0Fg HFGeGUrc/5b1WoDxCoU9LPrcOw7NtUxVZ0FmiXq+0Tw7l1ClSnglt/sa8J6ZI7ccT12o hwjsJxNPCiWIwBAkfWTV+gZ8OBg61f91a/EcKyG4R7edfdmLjmuwDbhzJueIdA6JzdEY Wuww== X-Forwarded-Encrypted: i=1; AJvYcCUjlJmLaT26d5ZvUzKNbMmh6eIQqxzwMVRZTqidxqnDoE0xlAVBBX6dPQR+S/ezSHCVAplYhy2qbg==@kvack.org X-Gm-Message-State: AOJu0Ywk3a+gPqV6qQ15bbxDu8Ll0AUyQPMKEtq70QoVlSDtK79CS4Lx 7CoxpG/tXAB7RU/TmPx/gF/LJDhc0VQL+wck2TtU23F1adZ3bW+X9JD4vcNS1eUd5aZMMgIrUIn TXZ60IIhL/hi8hvlzCw== X-Google-Smtp-Source: AGHT+IEpNqlcby3XCzPxmMXEa3yAsp88MrqHgIHgIiYwCpactoczoPP9Ca8XqrYS/AN0Db4KS1YJcToucGPf0cLH X-Received: from jthoughton.c.googlers.com ([fda3:e722:ac3:cc00:13d:fb22:ac12:a84b]) (user=jthoughton job=sendgmr) by 2002:a05:690c:2892:b0:648:fc8a:cd23 with SMTP id 00721157ae682-6e21d6e1f34mr309987b3.2.1727314528595; Wed, 25 Sep 2024 18:35:28 -0700 (PDT) Date: Thu, 26 Sep 2024 01:34:59 +0000 In-Reply-To: <20240926013506.860253-1-jthoughton@google.com> Mime-Version: 1.0 References: <20240926013506.860253-1-jthoughton@google.com> X-Mailer: git-send-email 2.46.0.792.g87dc391469-goog Message-ID: <20240926013506.860253-12-jthoughton@google.com> Subject: [PATCH v7 11/18] mm: Add missing mmu_notifier_clear_young for !MMU_NOTIFIER From: James Houghton To: Sean Christopherson , Paolo Bonzini Cc: Andrew Morton , David Matlack , David Rientjes , James Houghton , Jason Gunthorpe , Jonathan Corbet , Marc Zyngier , Oliver Upton , Wei Xu , Yu Zhao , Axel Rasmussen , kvm@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, Jason Gunthorpe , David Hildenbrand X-Rspam-User: X-Rspamd-Queue-Id: 7E2FA140018 X-Rspamd-Server: rspam01 X-Stat-Signature: t615xxst5cjgpa77ju6huphoy31g18sy X-HE-Tag: 1727314529-778611 X-HE-Meta: U2F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3dwI2TVV3ve+6hcI2nBzrdjc0BMpcTvHVahEs+wQD3+MvhuRIDYw5Ic1Bd7i2AwcvChYfbdLjD4hJ28w5gYpT0F85JnrXnpf9dtkyihtPXkKG7HLhEF8Xd3+4Fm3jsM2eM6xmYZYY9k2H9QPGf/Z09uVaanpbf9H6Qc6uH7WiT8pKsJNW06ihMg2X6jwcvedpUkbA8/0XhLeNNw2rJHfzT8k4HkxtRAKOmh3wsF/RulCjaxIopg+D8o49Q/Aompv3qexKUeO786SQjZRhXjawq6jANTJ2nJqsnfXNWqyhdYrZh2UaUmofsmjxz/HQVrA6Y15YEHXwnooUMwM5CRQz3qOTPVBIUKgMpuk2ZevGFRvz1weDEhlOtGuot/ypnEPdN64jq+1CfP3tM/msSiL0aQKxduoRnERuL9xaRLaQMb1aBr27U3Zg2inCrYgXW7k2x12NfBB5bd+Vq0W7aYPGlBnRIyJTIVAgw7D/6+pN4weRKxUTbSMWn9oDB5A0OC5cYNgpr9szYURR7620BaaTMiwCwEGQqa+KVa6553oX35vFEduCakNDRk0mJXFNIOw+8oQsJFFOUyqRKIdzRIDZZgGHIJT8Rtz8a0DHzPxngui7dEHXf4JerT7no3q/daukg== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000002, 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 Reviewed-by: Jason Gunthorpe 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 58829baf8b5d..2d5b53253bc2 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);