Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp209707pxf; Thu, 8 Apr 2021 00:54:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzRTnNWylDjzqklh/hY5EZLoGCGbXT4BQ+Nw+nta21S6PWnjEr+yD7znvT6cgseM/Fm0kh2 X-Received: by 2002:a17:902:9f94:b029:e9:68a3:8551 with SMTP id g20-20020a1709029f94b02900e968a38551mr5532832plq.35.1617868489879; Thu, 08 Apr 2021 00:54:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617868489; cv=none; d=google.com; s=arc-20160816; b=Sa3hYiO4r0majbrdJC3RQ+zTvQ6hgdcWfdwwvKoSzQgRA9EnhZZSAE7OwSlZl3m5M6 Ba0AE+/Ex9Fvr1EWnDV8gOneDlKh3t9Lr/0BrxJ0h8GdHbRx+UmzK1cWzvZpoFOxlp3W B+hi/qHMO9iyiLajFM7Kk2o8HQg806sDzTA2yCuMZNNSiRuxGgpmVWQYamhCrPjLR6Nc 8se9ebr+DJmt3mdI2Hm8KEi2c2TcznjL6fG0nV3K0GqPSud+XfVhsbt5lhFwRZq/09KX pFvqqEaZzwMKr3+TfUgQDqeyluzRCdgfYYiAiQJJyIJds1wDiBEQiG8fSU8cBINSHq6u stmA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature:dkim-signature; bh=Wculb6jHNxHFT1NPFrH00eMZhPzMfIJ/lXQBt4FvWDY=; b=xFwxf8eaOZLHv2ULQcvxYcOzn9mXiTNxi1pscGjyAe1MspakNa49vQcuaW1PcvhlOA UyBBkC+NH0YP8pK+06Xmx1inrWW4kJCSqOro7sYEeo4uuhsUxVgvZK+2Y58FZmQF6bes NPUoInt7CXOllM+2MMn8FX3vlpD2iwdMiMnC8M+kL6eOkPwXK5sgmE+3whH6uhaRhfBI q5nOLfVZ1ZSPhIiL1zNNmd60cigg0pZGwrhZNEPJSMU6qF8uJyaN3VKtsRQeENQk0RIY pHox2d4aD4wLLXYbqeO1eE4k3Uumd94hZnBj66V/zFVOoFyxFRwRqSa2LsyuLR3Ye5NY /29A== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (no key) header.i=@lespinasse.org header.s=srv-11-ed header.b=cY8nm20t; dkim=pass (test mode) header.i=@lespinasse.org header.s=srv-11-rsa header.b=agZWXwP+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lespinasse.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e1si25212378pgo.3.2021.04.08.00.54.37; Thu, 08 Apr 2021 00:54:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=neutral (no key) header.i=@lespinasse.org header.s=srv-11-ed header.b=cY8nm20t; dkim=pass (test mode) header.i=@lespinasse.org header.s=srv-11-rsa header.b=agZWXwP+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lespinasse.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230237AbhDHHxz (ORCPT + 99 others); Thu, 8 Apr 2021 03:53:55 -0400 Received: from server.lespinasse.org ([63.205.204.226]:42323 "EHLO server.lespinasse.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229505AbhDHHxz (ORCPT ); Thu, 8 Apr 2021 03:53:55 -0400 DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=lespinasse.org; i=@lespinasse.org; q=dns/txt; s=srv-11-ed; t=1617868424; h=date : from : to : cc : subject : message-id : references : mime-version : content-type : in-reply-to : from; bh=Wculb6jHNxHFT1NPFrH00eMZhPzMfIJ/lXQBt4FvWDY=; b=cY8nm20t8S6Lk/q03f68dYSwJLTlY/tLBudnSuwx5ICtI/So/PXq5zz9VfPvs67OXtfI9 CCWeyrYACiZ2W0xAg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lespinasse.org; i=@lespinasse.org; q=dns/txt; s=srv-11-rsa; t=1617868424; h=date : from : to : cc : subject : message-id : references : mime-version : content-type : in-reply-to : from; bh=Wculb6jHNxHFT1NPFrH00eMZhPzMfIJ/lXQBt4FvWDY=; b=agZWXwP+zplT0eY6G7B62LayXa+AEyPxWaG++zb8gm5AeDgBPvl923CbpQPVEhR/p/p1P SEGZ/DGm8o+++EWUvEbDpAH+jWTrCv8Lko7x9NyJYtMAGM6Jt/YI2LzUpG9T5MMTwMRohqa HqA3NHDv0imxpmmewspsowtlXzb4LgXBahwb0jBgnciBTtcqyNPWt0Ely7B2VinQYKSNHZV fuxDf7hCG7+tllz/xN27Zcqxs+JLHPKTkAr1gmms7SqkQxXLIW5OxPjgzPtioFRXjdexO5c nbk+zPZx6q7oxZibyAHLb2NpW0eyNWKCT3oAjTw9AWD9naR5dsF8MVcLp1eQ== Received: by server.lespinasse.org (Postfix, from userid 1000) id 48066160253; Thu, 8 Apr 2021 00:53:44 -0700 (PDT) Date: Thu, 8 Apr 2021 00:53:44 -0700 From: Michel Lespinasse To: Matthew Wilcox Cc: Michel Lespinasse , Linux-MM , Laurent Dufour , Peter Zijlstra , Michal Hocko , Rik van Riel , Paul McKenney , Andrew Morton , Suren Baghdasaryan , Joel Fernandes , Rom Lemarchand , Linux-Kernel Subject: Re: [RFC PATCH 34/37] mm: rcu safe vma freeing only for multithreaded user space Message-ID: <20210408075344.GA27824@lespinasse.org> References: <20210407014502.24091-1-michel@lespinasse.org> <20210407014502.24091-35-michel@lespinasse.org> <20210407025006.GB2531743@casper.infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210407025006.GB2531743@casper.infradead.org> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Apr 07, 2021 at 03:50:06AM +0100, Matthew Wilcox wrote: > On Tue, Apr 06, 2021 at 06:44:59PM -0700, Michel Lespinasse wrote: > > Performance tuning: as single threaded userspace does not use > > speculative page faults, it does not require rcu safe vma freeing. > > Turn this off to avoid the related (small) extra overheads. > > > > For multi threaded userspace, we often see a performance benefit from > > the rcu safe vma freeing - even in tests that do not have any frequent > > concurrent page faults ! This is because rcu safe vma freeing prevents > > recently released vmas from being immediately reused in a new thread. > > Why does that provide a performance benefit? Recently released > VMAs are cache-hot, and NUMA-local. I'd expect the RCU delay to be > performance-negative. I only have the observation and no full explanation for it. Just try it on wis-mmap and wis-malloc threaded cases. Of course this all washes away when dealing with more realistic macro benchmarks.