Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp919354pxf; Wed, 7 Apr 2021 15:04:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw1+eVcUQWZOSJO8Z4ZzRTuFzWsjxnYkZD3apaDckgGSRGReAsDQL96tr/v2XIqfH2KqmxP X-Received: by 2002:a17:90a:1f0e:: with SMTP id u14mr5422155pja.155.1617833070912; Wed, 07 Apr 2021 15:04:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617833070; cv=none; d=google.com; s=arc-20160816; b=wVoDqirzShFNmAwVto3mGEC8h6c03m2LtJ5wrPeciiWfXlnkP9OsK7ZL7NSCFEmI7N 23LITDhrJYsqApU+Gkh+8kiAbz9GBQZ38DbDvEUUOzvcZx6Twam0bMRoqtAheo3WN10O sRjY3KWud3iFxnW0cG9CYlhGM3OUIt0ZjwMt+8qjWdLagpXE7rZYufZ45BIr/YiEE2QG EPVtZUI1tMuOdbhwpSJmzIXrtO+AzVRA9GvIVNciJPf6/BjwBq82oElZu0MtOIYvmg4o GvyW/w4CkRn0bzi3A5rv7Qwq9POGaZGIEbsf7dMyGUkBMOa8S/z+JGu0AQDQQD2EePi8 l9xg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature:dkim-signature; bh=8+RTC5y9SGjFpBKmqkWwVCk46oblpz7Iw5ZFtmiCre0=; b=D5//qfheAokrmBEcuar5M4xmL6L4+NHROb9YPxAWonQh8bW0Z/cR6+eB7hc3Xt8aRf 2gf8fEGMlJzkV6S9vsJt9aekc46u5nDRAhwZ2S6yOemzjwZcJLa4vXLWk3Wssl1V/ZFI 3ON00pZqlmFg5KoCyoAbngcV9JiJKAw24p0TfaPDFfjVNvQ5DnPSOkxRszHecA4u+dX/ YTZ1oT1SBNHiGO7ZFfU2ZhtSPUp8xLYfRRbESxkv5qOh4AyugcF42BE6VP/TPw8M8tI3 3W6xK/9Yf/UN0WWGTY6bKq/7Ka8WIsJSxWHny9Z4gMHoOWe2Y1rnP+1KQ1nDezyXwf+w 7+eA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (no key) header.i=@lespinasse.org; dkim=pass (test mode) header.i=@lespinasse.org header.s=srv-11-rsa header.b=gwXSR8je; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lespinasse.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x8si7985667pjo.21.2021.04.07.15.04.18; Wed, 07 Apr 2021 15:04:30 -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=neutral (no key) header.i=@lespinasse.org; dkim=pass (test mode) header.i=@lespinasse.org header.s=srv-11-rsa header.b=gwXSR8je; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lespinasse.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229838AbhDGUc6 (ORCPT + 99 others); Wed, 7 Apr 2021 16:32:58 -0400 Received: from server.lespinasse.org ([63.205.204.226]:49973 "EHLO server.lespinasse.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235468AbhDGUcr (ORCPT ); Wed, 7 Apr 2021 16:32:47 -0400 DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=lespinasse.org; i=@lespinasse.org; q=dns/txt; s=srv-11-ed; t=1617827557; h=date : from : to : cc : subject : message-id : references : mime-version : content-type : in-reply-to : from; bh=8+RTC5y9SGjFpBKmqkWwVCk46oblpz7Iw5ZFtmiCre0=; b=myxGJZUXe+NiYa8jTF68T5sVHAIRuWKBJvTubjYWMRny6i72+hPXGNFbHPi3+JlOU+oiY BQFEjQBOVFDoWeXCQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lespinasse.org; i=@lespinasse.org; q=dns/txt; s=srv-11-rsa; t=1617827557; h=date : from : to : cc : subject : message-id : references : mime-version : content-type : in-reply-to : from; bh=8+RTC5y9SGjFpBKmqkWwVCk46oblpz7Iw5ZFtmiCre0=; b=gwXSR8jeWr+MhP6KenwdNG70wDvW4+sfC9vBokubO0p4UlXmonHUXgbDdO0FnkP1/Hzov XZSJ4JByG9DRSY0LP4wyG/ZQAcm1VKObfYyaYa+W9/LAlHYVOyxtO00BgwRyV5xhTSjeLnj 2xxDXdIrnsG5ukGblOqdduOQLd1Bvifgk16B7n7HNxWo6CX4NXypTx5ZytOhf4cQSDTLAsL +VMuLcKhTnmNCTtI+eKQ2iFFHymjKYUgJW0BVhc4OHAx383laypPoNozJRCMlZ21bw79YyI oKuH1N3QuEm6vSzud/CmlBmYiOcfuBydbvPXkeffIOy13qTmiCqdjCRrAb7g== Received: by server.lespinasse.org (Postfix, from userid 1000) id B0D91160244; Wed, 7 Apr 2021 13:32:37 -0700 (PDT) Date: Wed, 7 Apr 2021 13:32:37 -0700 From: Michel Lespinasse To: Matthew Wilcox Cc: Peter Zijlstra , 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: <20210407203237.GC25738@lespinasse.org> References: <20210407014502.24091-1-michel@lespinasse.org> <20210407014502.24091-12-michel@lespinasse.org> <20210407153528.GF2531743@casper.infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210407153528.GF2531743@casper.infradead.org> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Apr 07, 2021 at 04:35:28PM +0100, Matthew Wilcox wrote: > 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. I don't think that is an entirely fair representation. First we are both aware of each other's work, there is no working in dark caves here. But also, I don't even consider this patchset to be entirely my thing; most of the main building blocks come from prior proposals before mine. > 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. The idea of evaluating maple tree and speculative faults as a bundle is actually worrying to me. I think both ideas are interesting and worth looking into on their own, but I'm not convinced that they have much to do with each other. > Also, our approach doesn't involve copying VMAs in order to handle a fault. See my other reply to Peter's message - copying VMAs is a convenient way to reduce the size of the patchset, but it's not fundamental to the approach at all.