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=-12.3 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 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 BA6B9C433B4 for ; Wed, 7 Apr 2021 20:32:40 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 4346A61184 for ; Wed, 7 Apr 2021 20:32:40 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4346A61184 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=lespinasse.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id C850F6B0073; Wed, 7 Apr 2021 16:32:39 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id C35FB6B0078; Wed, 7 Apr 2021 16:32:39 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id AB04D6B007D; Wed, 7 Apr 2021 16:32:39 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0071.hostedemail.com [216.40.44.71]) by kanga.kvack.org (Postfix) with ESMTP id 8EB006B0073 for ; Wed, 7 Apr 2021 16:32:39 -0400 (EDT) Received: from smtpin06.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 2EF12824805A for ; Wed, 7 Apr 2021 20:32:39 +0000 (UTC) X-FDA: 78006719238.06.DEE8454 Received: from server.lespinasse.org (server.lespinasse.org [63.205.204.226]) by imf24.hostedemail.com (Postfix) with ESMTP id EF0C6A00038E for ; Wed, 7 Apr 2021 20:32:34 +0000 (UTC) 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) X-Stat-Signature: 5sy4od3zorqn9ttecyfwrzjreii7i4yx X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: EF0C6A00038E Received-SPF: none (lespinasse.org>: No applicable sender policy available) receiver=imf24; identity=mailfrom; envelope-from=""; helo=server.lespinasse.org; client-ip=63.205.204.226 X-HE-DKIM-Result: pass/pass X-HE-Tag: 1617827554-178563 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: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.