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=-8.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=ham 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 6C584C433ED for ; Wed, 7 Apr 2021 15:36:37 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id E83B961284 for ; Wed, 7 Apr 2021 15:36:36 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E83B961284 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 6878E6B0036; Wed, 7 Apr 2021 11:36:36 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 627656B0072; Wed, 7 Apr 2021 11:36:36 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 4C7F86B007D; Wed, 7 Apr 2021 11:36:36 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0232.hostedemail.com [216.40.44.232]) by kanga.kvack.org (Postfix) with ESMTP id 2BB756B0036 for ; Wed, 7 Apr 2021 11:36:36 -0400 (EDT) Received: from smtpin34.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id D43AB18069D38 for ; Wed, 7 Apr 2021 15:36:35 +0000 (UTC) X-FDA: 78005973150.34.6255C16 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf19.hostedemail.com (Postfix) with ESMTP id D88DD90009EF for ; Wed, 7 Apr 2021 15:36:26 +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=QylIfigSaFHbypENLSDV3Pz1fEDQV/gGjtYiJoxXbio=; b=MYS9LdrfpVyllUTfNbmURNNMe0 n1dYuKQWhrkfeEoQ6tQ0yNM8fOeWZXZGmEcZkJ+JKEA4Bu9dhAf2ov55wMQAihKCw5arj/MwgFYWH /TZt4EWMs23WsX1oMoHIGh/skSg6fb4EKnImmBlDEbxsXXNgx4saosrq08rHDLp1N8M0u2S26VLU7 SCAezEIMhjbeXXLiLoTEaBYUAegG+W5RQ0+FwkSmtGbng4YhMVMpnOtv2JjpM8eOq1vXwCNI0+45V yPVAHwtAwjAaKhDPUL1yFb835bTcvSIF61RaDmq2g+oXbYwVfXqdzUSBEbUePp/Cam+tAHVP7nBZy MTG/ZQXQ==; Received: from willy by casper.infradead.org with local (Exim 4.94 #2 (Red Hat Linux)) id 1lUADI-00EgWR-Sc; Wed, 07 Apr 2021 15:35:48 +0000 Date: Wed, 7 Apr 2021 16:35:28 +0100 From: Matthew Wilcox To: Peter Zijlstra 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 11/37] x86/mm: attempt speculative mm faults first Message-ID: <20210407153528.GF2531743@casper.infradead.org> References: <20210407014502.24091-1-michel@lespinasse.org> <20210407014502.24091-12-michel@lespinasse.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Rspamd-Server: rspam01 X-Rspamd-Queue-Id: D88DD90009EF X-Stat-Signature: r9hufnxwj3wxp7jjxrxxist7hb76erqk Received-SPF: none (infradead.org>: No applicable sender policy available) receiver=imf19; identity=mailfrom; envelope-from=""; helo=casper.infradead.org; client-ip=90.155.50.34 X-HE-DKIM-Result: pass/pass X-HE-Tag: 1617809786-311167 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 04:48:44PM +0200, Peter Zijlstra wrote: > On Tue, Apr 06, 2021 at 06:44:36PM -0700, Michel Lespinasse wrote: > > --- a/arch/x86/mm/fault.c > > +++ b/arch/x86/mm/fault.c > > @@ -1219,6 +1219,8 @@ void do_user_addr_fault(struct pt_regs *regs, > > struct mm_struct *mm; > > vm_fault_t fault; > > unsigned int flags = FAULT_FLAG_DEFAULT; > > + struct vm_area_struct pvma; > > That's 200 bytes on-stack... I suppose that's just about acceptible, but > perhaps we need a comment in struct vm_area_struct to make people aware > this things lives on-stack and size really is an issue now. Michel's gone off and done his own thing here. The rest of us (Laurent, Liam & I) are working on top of the maple tree which shrinks vm_area_struct by five pointers, so just 160 bytes. Also, our approach doesn't involve copying VMAs in order to handle a fault.