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=-2.3 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_PASS,USER_AGENT_MUTT autolearn=unavailable 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 15C03C282DD for ; Tue, 23 Apr 2019 09:41:00 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 39D2A2077C for ; Tue, 23 Apr 2019 09:40:59 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="kWZNVI2H" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 39D2A2077C Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 44pJNS4gwszDqMM for ; Tue, 23 Apr 2019 19:40:56 +1000 (AEST) Authentication-Results: lists.ozlabs.org; spf=none (mailfrom) smtp.mailfrom=infradead.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=peterz@infradead.org; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=infradead.org header.i=@infradead.org header.b="kWZNVI2H"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 44pJLT1dFdzDqKZ for ; Tue, 23 Apr 2019 19:39:13 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.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:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=KZ1+LpzJjt1lQaO/zhhBXmd8ItG9I8H/NFkBPqdSKp4=; b=kWZNVI2H88CgPB45rHhvEagQy YUXAwoj4UqliNhOdCXov/GLt6lWALi4JYUG0WNlU4GGG3JAvPyBRkffyWJOG+EG0Ur9Kx1yB1ZEA+ crqGIkZ0RR5dJvoHX2bSDFkFQfGDGgb5JKkpIhgWbRSNdH1EQU51xgOLzcuH2d142hpvgjzx2md9s rcVXo+iDvqNoRr/AvulifTy23sAkOmmfbsKuOe7LAQCmEVmiq9pYQuCW4a42z6Hp8dQhMHJiCING8 JI1Nlc06RH+pKcvLROVBIO1pkNJZOFlAGmkC/NPAI0mOHNypwGzvg0dMbMU4fZTqeqtbbpL0yyKJd YyIrsQdsw==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=hirez.programming.kicks-ass.net) by bombadil.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1hIrt8-0003WC-3I; Tue, 23 Apr 2019 09:38:55 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 6922229B47DCF; Tue, 23 Apr 2019 11:38:51 +0200 (CEST) Date: Tue, 23 Apr 2019 11:38:51 +0200 From: Peter Zijlstra To: Michel Lespinasse Subject: Re: [PATCH v12 00/31] Speculative page faults Message-ID: <20190423093851.GJ11158@hirez.programming.kicks-ass.net> References: <20190416134522.17540-1-ldufour@linux.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jan Kara , sergey.senozhatsky.work@gmail.com, Will Deacon , Michal Hocko , linux-mm , Paul Mackerras , Punit Agrawal , "H. Peter Anvin" , Mike Rapoport , Alexei Starovoitov , Andrea Arcangeli , Andi Kleen , Minchan Kim , aneesh.kumar@linux.ibm.com, x86@kernel.org, Matthew Wilcox , Daniel Jordan , Ingo Molnar , David Rientjes , "Paul E. McKenney" , Haiyan Song , Nick Piggin , sj38.park@gmail.com, Jerome Glisse , dave@stgolabs.net, kemi.wang@intel.com, "Kirill A. Shutemov" , Thomas Gleixner , Laurent Dufour , zhong jiang , Ganesh Mahendran , Yang Shi , linuxppc-dev@lists.ozlabs.org, LKML , Sergey Senozhatsky , vinayak menon , Andrew Morton , Tim Chen , haren@linux.vnet.ibm.com Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" On Mon, Apr 22, 2019 at 02:29:16PM -0700, Michel Lespinasse wrote: > The proposed spf mechanism only handles anon vmas. Is there a > fundamental reason why it couldn't handle mapped files too ? > My understanding is that the mechanism of verifying the vma after > taking back the ptl at the end of the fault would work there too ? > The file has to stay referenced during the fault, but holding the vma's > refcount could be made to cover that ? the vm_file refcount would have > to be released in __free_vma() instead of remove_vma; I'm not quite sure > if that has more implications than I realize ? IIRC (and I really don't remember all that much) the trickiest bit was vs unmount. Since files can stay open past the 'expected' duration, umount could be delayed. But yes, I think I had a version that did all that just 'fine'. Like mentioned, I didn't keep the refcount because it sucked just as hard as the mmap_sem contention, but the SRCU callback did the fput() just fine (esp. now that we have delayed_fput).