Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp964207pxf; Wed, 7 Apr 2021 16:16:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy2ne9OM/GNXILZd4ooqCKMeNL4eA+e8xFaiK6E0favCvuB/gjZmNRhuEF6nTurfCWrX4GF X-Received: by 2002:a17:906:71c4:: with SMTP id i4mr6711932ejk.134.1617837409222; Wed, 07 Apr 2021 16:16:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617837409; cv=none; d=google.com; s=arc-20160816; b=MILsBa2gAY+XReu+ntTfImeNDpCa9+9hQoAmBKhhKrK4GDTI9OgHG9RCWedHL1g6DZ Uy9GfJq8UsaNVgIgvbVsyZO2Hmkivfrwen4/sgvZXkd/q1QRUtN5jbhNOBhkYn04BdV1 mYrJfByGrV26p62oA2v6HhSl0v0TVcGTD0IgDrCjlj0AK4XFVarHK4CnAZzebKUeGu1Y FKcIsTQVCyzHxXxpN4xuH7LmoP34guqLxZTPfFBrVriFJqAkkcHSUaBSj3KnlsCMnx+l mXv/qE3neeg7qkPRk3WVjyaO23CWPKMjfZBzuxJueifen8oq5GzrWLFCul1fcH+9LvMU fA8A== 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=QylIfigSaFHbypENLSDV3Pz1fEDQV/gGjtYiJoxXbio=; b=p91lEYzrMtZi/7FzVXAj4RgD8iw3d8h4VoYK7LrXxnXcEE3BU0Azm9dS1RVTpqsE6t KdVyHUsh6psT7EW+sO4jKYr042rJzsmp0IK3xWJK2hYh9bP06oSHHSCNTSMHmw/OVpWd dFTL210Hxxlq5fOcZqvsB0M1xLSIogm/8hH89XniWB6MlJA6T6hTnzFe812hCl6ro5lw YIBxUChnwiiiV8x4GCt0p9oZfyqYn5awgMnKK8XVwKt8D7xW5iaF+LfOlATz2nFXIHMn OlCSjbg2z6hP7OQ6LuvWTIJvpCR9SeCa3hXGYmWB62MscP9NynIamFQdaRS6LWQWwXqh xJkQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=MYS9Ldrf; 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 dt15si23354726ejc.66.2021.04.07.16.16.26; Wed, 07 Apr 2021 16:16:49 -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=MYS9Ldrf; 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 S1353652AbhDGPhn (ORCPT + 99 others); Wed, 7 Apr 2021 11:37:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34938 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1353625AbhDGPhm (ORCPT ); Wed, 7 Apr 2021 11:37:42 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 095FBC061756 for ; Wed, 7 Apr 2021 08:37:32 -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=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: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.