From mboxrd@z Thu Jan 1 00:00:00 1970 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 lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id F245CC7EE29 for ; Fri, 9 Jun 2023 09:09:02 +0000 (UTC) Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4QcwHd44gFz3fFw for ; Fri, 9 Jun 2023 19:09:01 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=bvcrHG1M; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=bvcrHG1M; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=redhat.com (client-ip=170.10.133.124; helo=us-smtp-delivery-124.mimecast.com; envelope-from=pbonzini@redhat.com; receiver=) Authentication-Results: lists.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=bvcrHG1M; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=bvcrHG1M; dkim-atps=neutral Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4QcwGc6pkDz3c71 for ; Fri, 9 Jun 2023 19:08:08 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1686301686; h=from:from: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:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=+lS4qtD2LImPdpu4Ozd1FIICWXob78VQWCuBmNpNqeU=; b=bvcrHG1MYQheEk3zspb40bXo5mhVKRFPwiTXbQ2yF37EL4JJ5/yUhyyKDsodAs6xQ/acNg Im01UL1neLLLfwp1Dk+RufSCBLHTOayyT7iLWQf9oS+c+eEGEsXlB74Faisf0v2Yo0pr1Z 8r66UCr26YjbouEWaaVAjf7LN8M4nLc= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1686301686; h=from:from: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:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=+lS4qtD2LImPdpu4Ozd1FIICWXob78VQWCuBmNpNqeU=; b=bvcrHG1MYQheEk3zspb40bXo5mhVKRFPwiTXbQ2yF37EL4JJ5/yUhyyKDsodAs6xQ/acNg Im01UL1neLLLfwp1Dk+RufSCBLHTOayyT7iLWQf9oS+c+eEGEsXlB74Faisf0v2Yo0pr1Z 8r66UCr26YjbouEWaaVAjf7LN8M4nLc= Received: from mail-ej1-f72.google.com (mail-ej1-f72.google.com [209.85.218.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-504-8S9ZSiGnN7eJEgKrR3vfNg-1; Fri, 09 Jun 2023 05:08:02 -0400 X-MC-Unique: 8S9ZSiGnN7eJEgKrR3vfNg-1 Received: by mail-ej1-f72.google.com with SMTP id a640c23a62f3a-94a341efd9aso186737766b.0 for ; Fri, 09 Jun 2023 02:08:02 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686301681; x=1688893681; h=content-transfer-encoding:in-reply-to:subject:from:references:cc:to :content-language:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=+lS4qtD2LImPdpu4Ozd1FIICWXob78VQWCuBmNpNqeU=; b=bQ2ieuhQVTdSTGrYue3m/2nA59/14l1rgbQAfChiOI9gB/87UieROess2MSdqPDU42 qrM/MiPtQOcpr9N7PyAvzhxIDPLea3G5+aSFR8viG05U1eV+r7L9hzKMFYXTYYfHd8ta sU9UBHsygvqnf6viCrMfzQerLob2puSDPJKUNVjfW769MrJkwJ0WR+lFWHimWb/Gc+vZ nPykJtTvWxRihoZ6G/6WYYyCvLbniw1j2kpOBS4tUXIajutxcoDOJw05PohJftQ7HED2 E4pZpVYf+I5cQTzIqFoWUtZbAh2RBBEAffGIl+NtcdTedxnikC4NYLUgxBh5lvgtF2XA 3SQw== X-Gm-Message-State: AC+VfDyo0kAYxJ9rsg4+0q9IFACBdMpp6HgR8UOBtACYt7hpbxbbwTXu YFNfpUoqIIxe/DMWIKzj9O5/PEBbTgOL+wNNa/C8dQg2jeGEJjvOdy/ZiYIKGTN9/oUMNCv+Jrd Pcu2Go5m3ZaH6AlGSJQ34Tzzz0g== X-Received: by 2002:a17:907:94cb:b0:97a:e0c0:2f8f with SMTP id dn11-20020a17090794cb00b0097ae0c02f8fmr315203ejc.65.1686301681485; Fri, 09 Jun 2023 02:08:01 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6fk08I4RsyK9p9wcnjDRbMYLy3XBaoHlqt3xl1DLkFDODgHMHCV4XPzuR/CPTVwoW0y6Qefw== X-Received: by 2002:a17:907:94cb:b0:97a:e0c0:2f8f with SMTP id dn11-20020a17090794cb00b0097ae0c02f8fmr315171ejc.65.1686301681128; Fri, 09 Jun 2023 02:08:01 -0700 (PDT) Received: from ?IPV6:2001:b07:6468:f312:9af8:e5f5:7516:fa89? ([2001:b07:6468:f312:9af8:e5f5:7516:fa89]) by smtp.googlemail.com with ESMTPSA id z8-20020a1709067e4800b00977ecf6942bsm1036209ejr.90.2023.06.09.02.07.58 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 09 Jun 2023 02:08:00 -0700 (PDT) Message-ID: <26cf0b0a-cda5-08a9-a669-6966f9e626b1@redhat.com> Date: Fri, 9 Jun 2023 11:07:55 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0 To: Yu Zhao , Andrew Morton References: <20230526234435.662652-1-yuzhao@google.com> From: Paolo Bonzini Subject: Re: [PATCH mm-unstable v2 00/10] mm/kvm: locklessly clear the accessed bit In-Reply-To: <20230526234435.662652-1-yuzhao@google.com> X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "Jason A. Donenfeld" , x86@kernel.org, Gavin Shan , kvm@vger.kernel.org, linux-doc@vger.kernel.org, Catalin Marinas , Dave Hansen , Peter Xu , linux-mm@kvack.org, Ben Gardon , Chao Peng , Will Deacon , Gaosheng Cui , Marc Zyngier , "H. Peter Anvin" , Jonathan Corbet , Alistair Popple , Jason Gunthorpe , Ingo Molnar , Zenghui Yu , linux-trace-kernel@vger.kernel.org, linux-mm@google.com, Thomas Huth , Suzuki K Poulose , Nicholas Piggin , Borislav Petkov , Steven Rostedt , kvmarm@lists.linux.dev, Thomas Gleixner , linux-arm-kernel@lists.infradead.org, Fab iano Rosas , Michael Larabel , Sean Christopherson , linux-kernel@vger.kernel.org, Oliver Upton , James Morse , Masami Hiramatsu , Anup Patel , linuxppc-dev@lists.ozlabs.org, Mike Rapoport Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" On 5/27/23 01:44, Yu Zhao wrote: > TLDR > ==== > This patchset adds a fast path to clear the accessed bit without > taking kvm->mmu_lock. It can significantly improve the performance of > guests when the host is under heavy memory pressure. > > ChromeOS has been using a similar approach [1] since mid 2021 and it > was proven successful on tens of millions devices. > > This v2 addressed previous requests [2] on refactoring code, removing > inaccurate/redundant texts, etc. > > [1]https://crrev.com/c/2987928 > [2]https://lore.kernel.org/r/20230217041230.2417228-1-yuzhao@google.com/ From the KVM point of view the patches look good (though I wouldn't mind if Nicholas took a look at the ppc part). Jason's comment on the MMU notifier side are promising as well. Can you send v3 with Oliver's comments addressed? Thanks, Paolo