From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-f177.google.com (mail-pl1-f177.google.com [209.85.214.177]) (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 505E2148313 for ; Fri, 12 Apr 2024 18:41:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.177 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712947278; cv=none; b=VOqSqxwR939EDbpBENdR5ngUqrwriou/rkpa94JOqlnx4hE7VnmW14IO4ECVARIQeFp+VuabvEhN4O2vs9qkbqlOUmn1DcWkj8ysjDMQls2qAl+J0dms/IVnPg74lrbMA0MRqsCmkuY5AjHV46ajm9MSuXlSJ1b1NP1RW68p0nQ= 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=l26RIRZ4; arc=none smtp.client-ip=209.85.214.177 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="l26RIRZ4" Received: by mail-pl1-f177.google.com with SMTP id d9443c01a7336-1e411e339b8so9844445ad.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=vger.kernel.org; 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=l26RIRZ4eCzxi0G54QsV1tN3DWAZAO9tvG6qBXVNlzkcbSDDrb/Zos8YXzxelXJf8V XDhre1ImCXQPFJaKJS+twP0WAqoVo4EUsxgAs/9NDL3OZjGrAGXWH1J3ZNi54bkbQrCx 3/8wRsn1vJxP8lwTWV3HPKLWI/xhF1W5VoVkN2o2ZUNCR5HFd3ZiGqMmYLJd+hAkPnCu edXOYMUy4nN9WuUHlDdLhg5cObvrfIKB5Eo3zJCcOuAsHkAkLfGr3/fH6NJNl/i+bNo+ xJDihT7hERjqJTcTLyCK0Wq12d9LK5+yT5lVQeT/hnQ90zC6O3faWI6KZaHO5TOSP+CR hMyA== 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=knGkaBK/DKAsdiT8SCETfkaMBnNSeHlb8oFjH9SIOh4R1SFlAMSF91k35NrJib2YVA xhEkotUVFvZAf/I7PHbNbaRLLekwyhqZdYSeYV1DIzG6LyctDfZVoC+Oj7CeeaQNsJVP 93Og3bcg/8Eo/JMBzWLuxJWlnPYxTvew75qQigA8CQ9QGzjDjvBOVJPuZKX1TU4auCZl mr7yzKYmaR65keImBpgc8owofcWtRLc36kCDIlu/iVHhTGl9lgllHasY26kaM3tVXVhD nWoqwHOPWBCI58n0GNTtnf/tQZgxoeos9NZRGoggfoJw9QbmZArRIz62/Xh/+PSJ0QOw NPLw== X-Forwarded-Encrypted: i=1; AJvYcCWSf5qsFhyihMylexdUn8B4rcX3px58QyuPzob2eYZqbEaZPhyYEpt1pcr7kNFTTcu9caiY9Vrp63tTtzOYzpSW8jZ5tgpeZocAucetMpP2VFvi X-Gm-Message-State: AOJu0YxSHYmFzvKxrarlao0NR04BF6Qu/IqPMQs47VkCZJZEq4VAR5Uv lMDCdiSYANndiL40NAtXIZEnplcz6xl9WkkvR2C1G9fRNNW1hzTKB/GX62Tswg== 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: linux-trace-kernel@vger.kernel.org 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?