Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp742356pxf; Wed, 7 Apr 2021 10:23:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy2UE2mU0Hc+fd+qLkVJ/MQfQ+NWYuD/yjNZr/veUeyd2QUmz5oSOmnAPHfDPL+AxRaolVj X-Received: by 2002:a05:6e02:68f:: with SMTP id o15mr3519379ils.106.1617816203339; Wed, 07 Apr 2021 10:23:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617816203; cv=none; d=google.com; s=arc-20160816; b=efZj0ew9ojvO3gvbQ2N2KQN3ks+vR9cp5+JvFb5zedxlOrNAvMw57hbO/zCrmM39kA 8biAQU7e9v3SOe+1A28X1OxwzWGdU03TWFoIYB8Bqx9RygwTPHIJjG0MuL/e4Dhqfw0e 4gu3TKD32harzbZdx9YlrYznnE85jj966ts7kJs6TvInJaksxM1z8CMEwrdu5wBjywRV odzFkuo5jzt50wUKD5THqPzlZyxPOl/Rmn3WFpxY71YfFXqD3bTpiZ9qtiKwZCXCLEfI n6iPxmFMV+swUpxICwHSmjfDalcQiHgCROvrEqgVaLZmqeHUg7od/ioftXyi2paQvE1p 1guQ== 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=dV1f1V+Do2hXUWRE6FICi+uU6gH6OPiZlIka5qV9wTc=; b=0R9IhAL1QbkSkQLq3reGyX/Kx9QLRuT5rwApyR8VyleOh1RplX8le8SumAkkMbS/kK lCxCA3/1bDo2z4aiFKJZWGAu2NAoGvmBMiAzSS1DjEk6SB/czYFdCgSwbTzX/TenQrcg u7KMzbCqHHhRPSLAuR85p7GE7/7EnTl+18d1mQzHNlUh8q6DFLHuxk4C0PC2uBVdWP1q sVflYNDaxVtwxd9SfG+PbOdH4eI+DLPS8o0Eh8q0BqOOS6j92lzHjXlqsW9ZuyvVNouJ c2wFPRxOJc/VF8mVTQpsI0iG5uiEpRxWjzL3OFzeM54EYFDm3KMu4il2FMi2gkVgurHI YXHg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=EveHe1q6; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o16si10200916ilf.62.2021.04.07.10.23.10; Wed, 07 Apr 2021 10:23:23 -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=pass header.i=@infradead.org header.s=casper.20170209 header.b=EveHe1q6; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242927AbhDGCvv (ORCPT + 99 others); Tue, 6 Apr 2021 22:51:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35874 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233055AbhDGCvu (ORCPT ); Tue, 6 Apr 2021 22:51:50 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 29238C06174A for ; Tue, 6 Apr 2021 19:51:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=dV1f1V+Do2hXUWRE6FICi+uU6gH6OPiZlIka5qV9wTc=; b=EveHe1q6JfT5AQikfGrlIYCz7m BZNqbrVTzWqjZ8zyTxsRk+hByPGSy9K0REt+n7eXSCiDrUAO/fJasjEVrC0Yh1jh/OjDLE3WTj9Sv XIWscA0NNiWr1s7BxhXWBibcNXmR9P6y8MR0MaSivH/T7cKmLeJb0J3S1Dic93w9DUQDRgr9kk8wP 9EMOwPGAtiyrmYuCXsmTL6b4NHLWaK2WoHm+/x0SJcwjNfiYGEgVe/bbssgOBrjKSWOtJlK0A47Nn d4WPDk9idARg4jZ2lKEuZxwTJM3groRjYlGdtjFuZQREdgnsI2MRBhCh7DjUgvIRFXbq32Qtz0n/1 ApQBq/5A==; Received: from willy by casper.infradead.org with local (Exim 4.94 #2 (Red Hat Linux)) id 1lTyGc-00Dmua-LB; Wed, 07 Apr 2021 02:50:11 +0000 Date: Wed, 7 Apr 2021 03:50:06 +0100 From: Matthew Wilcox To: Michel Lespinasse Cc: 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: <20210407025006.GB2531743@casper.infradead.org> References: <20210407014502.24091-1-michel@lespinasse.org> <20210407014502.24091-35-michel@lespinasse.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210407014502.24091-35-michel@lespinasse.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.