Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp182513pxf; Thu, 8 Apr 2021 00:03:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyIJSvwMBEgoQzc2aHS9F3y+jGOZ/xzQmUZvHTQws10HDFB95U+OH4o4Sn00IO6HWWcusP5 X-Received: by 2002:a63:81:: with SMTP id 123mr6604346pga.307.1617865430217; Thu, 08 Apr 2021 00:03:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617865430; cv=none; d=google.com; s=arc-20160816; b=IHzA/i1YJNGndl3FRShedhgiJ2btmKaX5j70p6TTvoe0EtA43dxXxVpg/DJuICTQuy s0wOV+mgPkadoY1w+mXIlri73zqCFhdrxiOBJFvZxVNPKclwUbboCaoRrGYWXLhx7vpw YmtQC6CpA/ORSR2kcKxTKkzuBhAZwHHM/XgA/e8Qjy2J0/LPMAiFxuxbeoLY5cdxxbmE ZYCESCvdmscMO8F7EA+Ca+N2YADMFRbqxKWTs+kDWtoFS8ZchWbjzfIJ0anWO73GHe9L 5wtMVhp4JjLIKeeltvRHEaVD5AkyO3xcx5sdfjFVQq6VivywTjVzma5iEHQ8rsyfyz+F MOlg== 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=yigVIYNf+QxM3+FQnoth4sQU6ysRJxJ2nW9krzP8uKU=; b=EIrXloRh1RnZRAFsbelsqUQfwAx4fXS+hq9/H7ROdECnqKGKeeaMV0smgyht0nN+9J hDkPEaNhsAIUScdK4LFeCT07hbUWUGYCmw9JTvfwRr7yts2iwhATmiGSi3/uwYVZ3cK9 odb/lX4LT273L5CuUGk8I3HCnHJpVNkc46dHNipJBu+k/K4xAo+i9JaoT6pUrdKRxjqK t1BGkYGJZVOzlExKs5PP1jvrA2HUL3Juro15pp9diXpU0/2RNV/ZGgDPX0Pof9wE2inn 5z+/i6ZmurT0h4IVtxTrqZt3rDH7ygWZybc2E4vu3AYEqKMnPkTSQr5iChPvKdNIVyyU bBtQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=Vs29Zq9z; 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 p20si8233005pju.0.2021.04.08.00.03.37; Thu, 08 Apr 2021 00:03:50 -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=Vs29Zq9z; 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 S229505AbhDHHCD (ORCPT + 99 others); Thu, 8 Apr 2021 03:02:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38234 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229544AbhDHHCB (ORCPT ); Thu, 8 Apr 2021 03:02:01 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0E558C061760 for ; Thu, 8 Apr 2021 00:01:37 -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=yigVIYNf+QxM3+FQnoth4sQU6ysRJxJ2nW9krzP8uKU=; b=Vs29Zq9ztaGpw8OiiKN2slj82M +JN+z4M9osXi5B0CyEgfUywtwbrWvGV8V3QAyF1L3J3N9X5c1vNPCttMvhwv92nWMHU3TiD03ZAnO vfLVzd7g5QV/j0wbR8/dqN+NNcEcimmXsz++tRazB4/tlgv+xlhUs41HrAGXqqaOjsOQboGEdbJMv OcqyPjvx2hipsOeZBDIfgsniGCEFbw8GHNRm+Un4zpJdudnUPpcfKg7rWH8M77TlBrYTJTlbBUdH4 1Cj05Wuzs/IkfF/G1t57Oz02AIGpG9FAjBVFr3IZN4W3/hHT9Hb7PEIa+rgaXWHkoZm8LAu3ttPX1 2eAD0efw==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.94 #2 (Red Hat Linux)) id 1lUOeU-00FjCz-6U; Thu, 08 Apr 2021 07:00:32 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id EBB1B3003E3; Thu, 8 Apr 2021 09:00:26 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id D17522BC07BA7; Thu, 8 Apr 2021 09:00:26 +0200 (CEST) Date: Thu, 8 Apr 2021 09:00:26 +0200 From: Peter Zijlstra To: Matthew Wilcox Cc: Michel Lespinasse , Linux-MM , Laurent Dufour , Michal Hocko , Rik van Riel , Paul McKenney , Andrew Morton , Suren Baghdasaryan , Joel Fernandes , Rom Lemarchand , Linux-Kernel Subject: Re: [RFC PATCH 24/37] mm: implement speculative handling in __do_fault() Message-ID: References: <20210407014502.24091-1-michel@lespinasse.org> <20210407014502.24091-25-michel@lespinasse.org> <20210407212027.GE25738@lespinasse.org> <20210407212712.GH2531743@casper.infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210407212712.GH2531743@casper.infradead.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Apr 07, 2021 at 10:27:12PM +0100, Matthew Wilcox wrote: > Doing I/O without any lock held already works; it just uses the file > refcount. It would be better to use a vma refcount, as I already said. The original workload that I developed SPF for (waaaay back when) was prefaulting a single huge vma. Using a vma refcount was a total loss because it resulted in the same cacheline contention that down_read() was having. As such, I'm always incredibly sad to see mention of vma refcounts. They're fundamentally not solving the problem :/