Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp1569727pxb; Tue, 8 Feb 2022 22:37:13 -0800 (PST) X-Google-Smtp-Source: ABdhPJzQa6W2cKTxtAjk/6tkP+r1d2vmQke9r+LRd0fwCZ9aMuPDkNzGCsoKS2W5VHFB4xqorS28 X-Received: by 2002:a17:90a:780f:: with SMTP id w15mr934636pjk.139.1644388633131; Tue, 08 Feb 2022 22:37:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644388633; cv=none; d=google.com; s=arc-20160816; b=hlGBbHn35PcdtNbcYGdqIlaTJp5pjZxDzg1oPVa1rNEM3RHN2XzH2/gqjn2yMxjOQ0 dYAkjIw4mchJdAgkFlXgaQcCR2EhbhqNAkA+tHd919mHWQRPre6K+AnqGCyn/VwK6sr9 GhUSaMeMn8Hq0OAfhbVxfNh6n53LT3WxbmMKyT/Fkb/lrMQUbGoNa/B4AFgfvLYz3pit 0P83zkrwfx5EyRw7cFyoXyG3qV4Gsuuz+vB4Ee2JfvOuT+gw07zMW7+mTBrnslvLOfKw zD9vzklT2CJOU4MvposDcgmjmbtrnMZFF73A0qkoUVKhcDrsZlniefETTAiHuNPFOuuZ Bgsw== 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=uMxP1uR1GMWjz5rQCuyF02GDhukH9s01AnuJsjrwSno=; b=A4RbaqcKxb9ojbTpMDsRXx5++1B+fB5/YV9YiPJ7rVWVYrmVnPJwn2+/29SwqBCSYt d45fm4W5gaMwfTiB3Ajnn5CELtwMHDl8qOSntVYbh2b50VmnDgQfLECjRsF2MgfoTn0H tTi6qGwvG+mIgZ6eDcV7tuqjTbLZlgXcidclAeeLnZLXmDTHA7cSP/EXx+53Fgbxp6Kk 93XXZ18C4TzitdcVn3sWjPfdKBBm3WbdO6c1ewJs0dn5YEe4+EVuTzNyOu6jMbsxzaXa R790ZU4IW66qzd+gbHR3wwnpIE8atkw547ydmNlVc+XKlIoN0QaZqnY+PjuqHfT/avY1 bTrA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (no key) header.i=@lespinasse.org header.s=srv-54-ed header.b=YlBq92pz; dkim=pass (test mode) header.i=@lespinasse.org header.s=srv-54-rsa header.b="dxYnoH/b"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1: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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id rj13si4474974pjb.89.2022.02.08.22.37.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Feb 2022 22:37:13 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=neutral (no key) header.i=@lespinasse.org header.s=srv-54-ed header.b=YlBq92pz; dkim=pass (test mode) header.i=@lespinasse.org header.s=srv-54-rsa header.b="dxYnoH/b"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1: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: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 1C69BE032AB0; Tue, 8 Feb 2022 22:15:00 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1353610AbiBGRqo (ORCPT + 99 others); Mon, 7 Feb 2022 12:46:44 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57176 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243283AbiBGRjb (ORCPT ); Mon, 7 Feb 2022 12:39:31 -0500 Received: from server.lespinasse.org (server.lespinasse.org [IPv6:2001:470:82ab::100:0]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8C0D2C0401DA for ; Mon, 7 Feb 2022 09:39:31 -0800 (PST) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=lespinasse.org; i=@lespinasse.org; q=dns/txt; s=srv-54-ed; t=1644255571; h=date : from : to : cc : subject : message-id : references : mime-version : content-type : in-reply-to : from; bh=uMxP1uR1GMWjz5rQCuyF02GDhukH9s01AnuJsjrwSno=; b=YlBq92pzvV6ya+NxhmqpzQOrb15Dwe/fCJvDg1qVIuo/P+nsf2ovRUDnQLI1I/Rey+1lg kvVPsbEDOvV8ypFAg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lespinasse.org; i=@lespinasse.org; q=dns/txt; s=srv-54-rsa; t=1644255571; h=date : from : to : cc : subject : message-id : references : mime-version : content-type : in-reply-to : from; bh=uMxP1uR1GMWjz5rQCuyF02GDhukH9s01AnuJsjrwSno=; b=dxYnoH/bYBJyklvC9tRz+aeodgNpOM0VcG+peohHQaS5dJtQCyBQpOAbQZZXjSC5on2YN A+i+MqkpSvABdWH2JY8xGcGLEOOVTcTkYdww8IYIrPvmTAHxH3j5nZDLOsiSdu2NdW0kHxp 1EzEDHfmW1GnML4Q6VwZKEAALEdRifabCWm14KLcDyigEbD9RpHWscW7vNmnkE+yOlTj59a qzULzgraGjWEd/qIr089ANyTZkdCzhxVzR/eKUXDRLMxrq55/TCDHzZFfBwg0ZPd6l2BIEq VOgGdoa6W+uPcGFd1b56YE9tCCZpiUQ7qJiL910tQNX+bwumvprkT0Hzsj4w== Received: by server.lespinasse.org (Postfix, from userid 1000) id 4C0E5160B2E; Mon, 7 Feb 2022 09:39:31 -0800 (PST) Date: Mon, 7 Feb 2022 09:39:31 -0800 From: Michel Lespinasse To: Liam Howlett Cc: Michel Lespinasse , Linux-MM , "linux-kernel@vger.kernel.org" , Andrew Morton , "kernel-team@fb.com" , Laurent Dufour , Jerome Glisse , Peter Zijlstra , Michal Hocko , Vlastimil Babka , Davidlohr Bueso , Matthew Wilcox , Rik van Riel , Paul McKenney , Song Liu , Suren Baghdasaryan , Minchan Kim , Joel Fernandes , David Rientjes , Axel Rasmussen , Andy Lutomirski Subject: Re: [PATCH v2 13/35] x86/mm: attempt speculative mm faults first Message-ID: <20220207173931.GC12302@lespinasse.org> References: <20220128131006.67712-1-michel@lespinasse.org> <20220128131006.67712-14-michel@lespinasse.org> <20220201171617.z5zgafitgolyv5np@revolver> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220201171617.z5zgafitgolyv5np@revolver> User-Agent: Mutt/1.10.1 (2018-07-13) X-Spam-Status: No, score=-7.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Feb 01, 2022 at 05:16:43PM +0000, Liam Howlett wrote: > > + vma = __find_vma(mm, address); > > + if (!vma || vma->vm_start > address) { > > This fits the vma_lookup() pattern - although you will have to work > around the locking issue still. This is the same for the other > platforms too; they fit the pattern also. In this case, I think it's just as well to follow the lines of the non-speculative path, which itself can't use vma_lookup() because it needs to handle the stack expansion case... -- Michel "walken" Lespinasse