From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-f178.google.com (mail-pl1-f178.google.com [209.85.214.178]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4D3C81BF2F for ; Fri, 12 Apr 2024 18:41:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.178 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712947278; cv=none; b=JQ09hVbYc+OotMyj6mNfnsYBxxZfvtIt2NSDdXsFM1L5+uO3THM/+AI0eEUNpnBqU7UlkpsuRzG9b+kMY/LQgifS8Tx4IZaK2TYbrmJZsd29mT1M5NaJzapPBPfstfMCWL8rD8XRjZhPbtP6mZOQpQ4S5mmM/7/g36EjuT3MYTw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712947278; c=relaxed/simple; bh=tE1aWPCZZJl7MoElbd+5YmoN+nAf47vnVFjNHq6stP4=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=X8YC45vh40rOrEAoU97Krdizrfl+Qss0gn69me16ga/SVy2GKFMqYOAV6eeRwUi6VSFRvMKj7OuG7iA/q8YCw5oXGFqfm9oP8FFraVYOqunDAcyuWT2UM+XpIfnAIEWPRk4xpYBEVGqlRXbp5UahWKNJ4XY8+6OSpFJC8pza1Xo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=i07hf0iR; arc=none smtp.client-ip=209.85.214.178 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="i07hf0iR" Received: by mail-pl1-f178.google.com with SMTP id d9443c01a7336-1e411e339b8so9844455ad.3 for ; Fri, 12 Apr 2024 11:41:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1712947277; x=1713552077; darn=lists.linux.dev; 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=tE1aWPCZZJl7MoElbd+5YmoN+nAf47vnVFjNHq6stP4=; b=i07hf0iRXC8CGRTA9vJiw6xdWFBVfyIrwfbq9MHgLom5vvqzqxC0hAS/P08iw/8vfA FzVu+Z1mr7XVMZMWYUXv+QCM7d5GWdiZwDDqEs/VGgADYBLtV3rvHkURQ4e70y/MFKsc gLN1I7em2AKPAzruSiidRD9IgG1HFtRi1YdnZjux8R0vRM2Gnz9QTGHBSC4iuuCyc8XQ eQN96z8YCRU7E0AN1kUu0RXn131ysdLIjQ18dxkNvi7mA7SX3fozrS7cNGp9gXz2gRZY H96Fs8m98brWjAcA3d2TrqZS/ncXirpLGJROfP+mTt3Qs3/9TpatdiIgAghNVvwbjXzS 47uA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712947277; x=1713552077; 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=tE1aWPCZZJl7MoElbd+5YmoN+nAf47vnVFjNHq6stP4=; b=nuxC/YxPqgl/LpR2ajkVsZlThASa6RqcuSMIqrvD8q/IjfUBln/EeTNPUWjLHsQAlm vCQ7IcldMl50OuPdo3ZeShS82TUbqb73Nk3YcdYLROE1SR7REv6YYXJEtIpe3BbhAWcg jG8VdlZSCqTqIHLswe5qqqGzuGXXo/BWFi+r6yNcKIIr9QdQcQhiczezmRNQi4z+aOnp RWWQSB94uPTnGuclJUa1i4s0mKpsj+6oraFQNiWJZV9IPQOOBWNye8mWvCYMhjkj6tJL xdqeaP+OMUUJYgCMYzICUqYJoBIjBcw5t7PMcCMaptUaU7kbvnmg8CMkFVhnrvBEFAni O3tw== X-Forwarded-Encrypted: i=1; AJvYcCW1ptTqXaLReFILp+8sNByCcsXPSMudtm9rVz7pn8Tz9HxZ9yAOGAcm3vs4Qy2dNqK+O1hHaVrP1pt5RzANwFny7tPAHi/v X-Gm-Message-State: AOJu0YwIJVsFGNYYhuU5GynwpEet3Ljer3/lOtD72ByNnzH4kMaOk/ZH ud+rtX1a/Tad+N4nhIEaZTICvAzd2288nizcrk6LDZ7qAE4P7LPh/FlWuIFJnw== X-Google-Smtp-Source: AGHT+IGQO04VC0zqxkXl9HI81WqEqxeP4e4k3T6O5AVuAZB5k5Q3DvX9OiYo61rtrsCcY43kj4509A== X-Received: by 2002:a17:902:650a:b0:1e0:a1f4:95f with SMTP id b10-20020a170902650a00b001e0a1f4095fmr3460792plk.14.1712947276396; Fri, 12 Apr 2024 11:41:16 -0700 (PDT) Received: from google.com (210.73.125.34.bc.googleusercontent.com. [34.125.73.210]) by smtp.gmail.com with ESMTPSA id q6-20020a170902a3c600b001dd0d0d26a4sm3384097plb.147.2024.04.12.11.41.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Apr 2024 11:41:15 -0700 (PDT) Date: Fri, 12 Apr 2024 11:41:11 -0700 From: David Matlack To: James Houghton Cc: Andrew Morton , Paolo Bonzini , Yu Zhao , Marc Zyngier , Oliver Upton , Sean Christopherson , Jonathan Corbet , James Morse , Suzuki K Poulose , Zenghui Yu , Catalin Marinas , Will Deacon , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , "H. Peter Anvin" , Steven Rostedt , Masami Hiramatsu , Mathieu Desnoyers , Shaoqin Huang , Gavin Shan , Ricardo Koller , Raghavendra Rao Ananta , Ryan Roberts , David Rientjes , Axel Rasmussen , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, kvm@vger.kernel.org, linux-mm@kvack.org, linux-trace-kernel@vger.kernel.org Subject: Re: [PATCH v3 0/7] mm/kvm: Improve parallelism for access bit harvesting Message-ID: References: <20240401232946.1837665-1-jthoughton@google.com> Precedence: bulk X-Mailing-List: kvmarm@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240401232946.1837665-1-jthoughton@google.com> On 2024-04-01 11:29 PM, James Houghton wrote: > This patchset adds a fast path in KVM to test and clear access bits on > sptes without taking the mmu_lock. It also adds support for using a > bitmap to (1) test the access bits for many sptes in a single call to > mmu_notifier_test_young, and to (2) clear the access bits for many ptes > in a single call to mmu_notifier_clear_young. How much improvement would we get if we _just_ made test/clear_young lockless on x86 and hold the read-lock on arm64? And then how much benefit does the bitmap look-around add on top of that?