From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CCDB7C433ED for ; Thu, 8 Apr 2021 07:01:14 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 187546113B for ; Thu, 8 Apr 2021 07:01:13 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 187546113B Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 7C0BC6B0078; Thu, 8 Apr 2021 03:01:13 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 76FE96B007E; Thu, 8 Apr 2021 03:01:13 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 610456B0080; Thu, 8 Apr 2021 03:01:13 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0122.hostedemail.com [216.40.44.122]) by kanga.kvack.org (Postfix) with ESMTP id 477436B0078 for ; Thu, 8 Apr 2021 03:01:13 -0400 (EDT) Received: from smtpin23.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 02FD08248047 for ; Thu, 8 Apr 2021 07:01:13 +0000 (UTC) X-FDA: 78008303226.23.4EB40E2 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf12.hostedemail.com (Postfix) with ESMTP id EC796F7 for ; Thu, 8 Apr 2021 07:01:08 +0000 (UTC) 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> X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: EC796F7 X-Stat-Signature: bjb9gjaq3kracnftgfadkd7zz93uh3kk Received-SPF: none (infradead.org>: No applicable sender policy available) receiver=imf12; identity=mailfrom; envelope-from=""; helo=casper.infradead.org; client-ip=90.155.50.34 X-HE-DKIM-Result: pass/pass X-HE-Tag: 1617865268-124549 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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 :/