Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1348147rwd; Wed, 31 May 2023 12:35:30 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5fAkx+azCl8jeG/c4VJ4pBlrykXOQF/RMczUmbN3QJGTw0W2O5PLSWlcCv8lIjd6NRo7SA X-Received: by 2002:a0d:d996:0:b0:565:99c0:a690 with SMTP id b144-20020a0dd996000000b0056599c0a690mr6822596ywe.36.1685561729907; Wed, 31 May 2023 12:35:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685561729; cv=none; d=google.com; s=arc-20160816; b=iqyVMmYF6hyYaxjNjyHM9dkAi7zR6ZlFeUAZKQSuTr9pVuIbAhphcxKna0r5wm9Rmc RqCr03RF2RC6V45NPXAfU/bpbF68LKZHJuPvwlrrVXNIS4raEjBhPR2YyL7bIn4zqfcs /V7Q64NAQF8LUPArFsjsx6RJX+3jE+u4ei0oMq+74t8kpe8IEJT9gCzof5XFZb9xQWJs XxJKvfnN61IUdsmJlx/04U2WzJCM35LtujL8qnPBL+Zga958/zC9CYegZArAAIQhTAaR 5pOccva/miK35mz7/QVgQWVCfC5Hux5VioBY+WTNcsXm0cTmfQ7+Rn7c30evyfKwPGfW EX0g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=49Ctqz+Z6/EpgEVzBMBiySSOETw/gRZF7F8sKc0/gW4=; b=JFXJ+gymFitELJHlpr9Qt8sCEoE4ZtfG62gyf8zLRAVuOyUQXSUJVstmwlP+0rOcZr i1XtTJlgj25MGpSW7HaKwVdHSxpNy3l3rKKkiWMqF36eq+qs8MsdaKAt2gVwgLlEQ66a cHqFvSj+PEjWl4vGCe/twIPaAv5S/bojV46QCwfNiVvni9bpMfiNj82YT/759I7NIH8+ HMqzYXz/N7LqRb73hntAgXogim9wh1Dgazthq4pp80dbKOMLvV5BeVN0yCmNoRGaVew3 E9THyPNNFl/EF78NM3ShCmeuXJIcMMUVEbVNf+nErfHho7PeYateJofQiIp08uk+FSf7 a3ag== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ziepe.ca header.s=google header.b=SCXzv5NF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t7-20020a63b707000000b0053f19be2174si1359698pgf.791.2023.05.31.12.35.14; Wed, 31 May 2023 12:35:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@ziepe.ca header.s=google header.b=SCXzv5NF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229683AbjEaTUO (ORCPT + 99 others); Wed, 31 May 2023 15:20:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51758 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229543AbjEaTUN (ORCPT ); Wed, 31 May 2023 15:20:13 -0400 Received: from mail-pf1-x434.google.com (mail-pf1-x434.google.com [IPv6:2607:f8b0:4864:20::434]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 512FD126 for ; Wed, 31 May 2023 12:20:11 -0700 (PDT) Received: by mail-pf1-x434.google.com with SMTP id d2e1a72fcca58-64d5f65a2f7so106616b3a.1 for ; Wed, 31 May 2023 12:20:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ziepe.ca; s=google; t=1685560811; x=1688152811; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=49Ctqz+Z6/EpgEVzBMBiySSOETw/gRZF7F8sKc0/gW4=; b=SCXzv5NFJkdSd2DBch3tBur6rt87sHZadMvllcCYrBSlAnujqsn2w6NYfs8kRw7zEH UUy5B5M3fdwqVh4cJAPUbO4ymzbGUQhjG0wsWvcB0rzXrJuUXqSQWExeBcxLh5dnJ4hW JdIcMLBU2Wr5PTX+4Sgey8hL0W2zyc7yeXyBOoy9FNA13tz08zsvGn7+DUiMDrwaQkpg hdZvFD7p3uuyL6jZGaitCwZEBXvEijJ+fMG39fXax6zGLA/zH3JFxhLgU8GjKTvmwn3U cfKL4OTNs21hoPihFH4rxpZz8Ex23V4vNxSxIHe04E18MS+FM6lfIrpkz5m+NwO2u7KZ /PHA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685560811; x=1688152811; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=49Ctqz+Z6/EpgEVzBMBiySSOETw/gRZF7F8sKc0/gW4=; b=kIiXlHsA0CqXk67zBsHLIcSh8Cal4ehb6y2cuD0qGFTCZ2HfAqR2H+jEZ2STWr+aXH Rb8FBcSlFUJ/8T6LsUF723iHMLaxYfy37uacCfXp0aNgThQg7/UpWM9ySKV/B732H06a EZMn1Q3whWfrhF1TZDjWpZBQIpXfucDMTZQcwF1MiptLtj83Ou7pVfPEsybBxNiy0cOf eqjxQyr+E1VRNZz+Kh97KAeb50pV/aVsG5tRGrS7x2N24zgn4Odm4QuOVBkhYE/QBH9b 6EYeEU8TUVOvEgpxGzE92VgDlWNgVYNZZZPbAqE1pYgY/HIP45vfmD+FHhdgsSidCgIL h3Pg== X-Gm-Message-State: AC+VfDz0fAShVm7sJ32IYTdri8qkdI0pq/Ik0JXMxpK9ndb/8Cvhd9X8 J3dmneULPYuNZoGo9bsjvgorsA== X-Received: by 2002:a05:6a00:1344:b0:647:e45f:1a4c with SMTP id k4-20020a056a00134400b00647e45f1a4cmr5931413pfu.11.1685560810753; Wed, 31 May 2023 12:20:10 -0700 (PDT) Received: from ziepe.ca ([206.223.160.26]) by smtp.gmail.com with ESMTPSA id 15-20020aa7920f000000b0065017055caasm918208pfo.210.2023.05.31.12.20.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 May 2023 12:20:10 -0700 (PDT) Received: from jgg by wakko with local (Exim 4.95) (envelope-from ) id 1q4RMe-0017g6-KI; Wed, 31 May 2023 16:20:08 -0300 Date: Wed, 31 May 2023 16:20:08 -0300 From: Jason Gunthorpe To: Yu Zhao Cc: Andrew Morton , Paolo Bonzini , Alistair Popple , Anup Patel , Ben Gardon , Borislav Petkov , Catalin Marinas , Chao Peng , Christophe Leroy , Dave Hansen , Fabiano Rosas , Gaosheng Cui , Gavin Shan , "H. Peter Anvin" , Ingo Molnar , James Morse , "Jason A. Donenfeld" , Jonathan Corbet , Marc Zyngier , Masami Hiramatsu , Michael Ellerman , Michael Larabel , Mike Rapoport , Nicholas Piggin , Oliver Upton , Paul Mackerras , Peter Xu , Sean Christopherson , Steven Rostedt , Suzuki K Poulose , Thomas Gleixner , Thomas Huth , Will Deacon , 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, linuxppc-dev@lists.ozlabs.org, linux-trace-kernel@vger.kernel.org, x86@kernel.org, linux-mm@google.com Subject: Re: [PATCH mm-unstable v2 02/10] mm/kvm: use mmu_notifier_ops->test_clear_young() Message-ID: References: <20230526234435.662652-1-yuzhao@google.com> <20230526234435.662652-3-yuzhao@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230526234435.662652-3-yuzhao@google.com> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, May 26, 2023 at 05:44:27PM -0600, Yu Zhao wrote: > Replace test_young() and clear_young() with test_clear_young(). > > Signed-off-by: Yu Zhao > --- > include/linux/mmu_notifier.h | 29 ++----------------- > include/trace/events/kvm.h | 15 ---------- > mm/mmu_notifier.c | 42 ---------------------------- > virt/kvm/kvm_main.c | 54 ------------------------------------ > 4 files changed, 2 insertions(+), 138 deletions(-) > > diff --git a/include/linux/mmu_notifier.h b/include/linux/mmu_notifier.h > index dfdbb370682d..c8f35fc08703 100644 > --- a/include/linux/mmu_notifier.h > +++ b/include/linux/mmu_notifier.h > @@ -104,26 +104,6 @@ struct mmu_notifier_ops { > unsigned long start, > unsigned long end); > > - /* > - * clear_young is a lightweight version of clear_flush_young. Like the > - * latter, it is supposed to test-and-clear the young/accessed bitflag > - * in the secondary pte, but it may omit flushing the secondary tlb. > - */ > - int (*clear_young)(struct mmu_notifier *subscription, > - struct mm_struct *mm, > - unsigned long start, > - unsigned long end); > - > - /* > - * test_young is called to check the young/accessed bitflag in > - * the secondary pte. This is used to know if the page is > - * frequently used without actually clearing the flag or tearing > - * down the secondary mapping on the page. > - */ > - int (*test_young)(struct mmu_notifier *subscription, > - struct mm_struct *mm, > - unsigned long address); > - > int (*test_clear_young)(struct mmu_notifier *mn, struct mm_struct *mm, > unsigned long start, unsigned long end, > bool clear, unsigned long *bitmap); Oh, you split the patch. This MMU notifier stuff seems OK for both patches then, and KVM is the only user: Reviewed-by: Jason Gunthorpe Jason