Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp799758rwe; Thu, 25 Aug 2022 09:16:04 -0700 (PDT) X-Google-Smtp-Source: AA6agR7F47nq2wUGpsKJSzxwpYpJkGWoaQilDZr1pLnnfKQ6FIBK9rfaTiBcEeDMIU0g6tsy7EU5 X-Received: by 2002:a17:907:728c:b0:730:c005:5d93 with SMTP id dt12-20020a170907728c00b00730c0055d93mr3024654ejc.265.1661444164161; Thu, 25 Aug 2022 09:16:04 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1661444164; cv=pass; d=google.com; s=arc-20160816; b=Hb80SHOre5iEvIz/JdKmgq8vjsxWQ6Q91GFJlGsEP79KR2lyX3H3orC7hMF3c+0IFF rT3xRQFCw2Ylkm7c10K0+kwzIPASyCOOycFBPbxjEYMmmbuvzhzasNFKMwhq1ggruNvf dkTRTUBdfMuiF3P1/1e7hJ3bejA07rw/MGI7xJcvpPGG2uyF01MFNBedOaHv46OR+9cU 5+cfqrZo13/DvWlUroHwBUkf1ckevswypcSCqQVhxctoxRzXzvisOVnMoHtCdj/ASiJX wPSOMj/r7gHt1w4ZEF46+uW4X4tAz1nUYdF+A3EPH8Bcf6KTcbEfhL5D9CuM0epPKnTl jJRw== ARC-Message-Signature: i=2; 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:mail-followup-to:message-id:subject:cc:to :from:date:dkim-signature; bh=anopUDp5ozStsOp7m/DsKCZ3eEuLLawyiGqKJA3EYfo=; b=Skvi4h+FrTj5zoMzYZ532WkQSeid2rHhnNgwE/iiKwJ4a0WE3J+cyMe6PeCfEcHYBc R6buB2CxqUtGCYOKunFVBAl4pqj0N3y73quM9MKvROb4sNiII1YqexrGM+Q76y6WRyXG wZousyDIRqLcyx3GiKsh21d9xxN9VPqO/3BVx5AXc5g39I+rSP4N2yw+0buJYL/632t5 5GOb6rCdgZDB0WTt4ljQ/yt+z0PQqeen9GeLw/dE0LZFz+tFaxNlF0c7H3shNTqKgj27 DgUDxrwq2GC1Y0h6sEYJa8aV4qrkXSFjqoMr01L1paTN5a+rtr82ru3XhTqNEHwc9okq EZEQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@stgolabs.net header.s=dreamhost header.b=FCqflbpm; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id du18-20020a17090772d200b00731646d634esi3868344ejc.802.2022.08.25.09.15.38; Thu, 25 Aug 2022 09:16:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@stgolabs.net header.s=dreamhost header.b=FCqflbpm; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240693AbiHYQGz (ORCPT + 99 others); Thu, 25 Aug 2022 12:06:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48618 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237841AbiHYQGx (ORCPT ); Thu, 25 Aug 2022 12:06:53 -0400 Received: from bee.birch.relay.mailchannels.net (bee.birch.relay.mailchannels.net [23.83.209.14]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3113870E61 for ; Thu, 25 Aug 2022 09:06:51 -0700 (PDT) X-Sender-Id: dreamhost|x-authsender|dave@stgolabs.net Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id E809C5010C8; Thu, 25 Aug 2022 16:06:49 +0000 (UTC) Received: from pdx1-sub0-mail-a201 (unknown [127.0.0.6]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 2A41A501198; Thu, 25 Aug 2022 16:06:49 +0000 (UTC) ARC-Seal: i=1; s=arc-2022; d=mailchannels.net; t=1661443609; a=rsa-sha256; cv=none; b=sbkVwbMWptZkRbJ7TzmKNWXybDGaCPt0JhxS/10JwOso9+sBYV1hRWFQ6V7klWclCTxakR 4wrVapl2kLqwKmuANhbS4cEuNP0TrnKZpIZOPTgWLC90c8R0im6rL4r3entt1NcrDQyk9e LNdqdiER5E6acj9vKTvefV4A3HFm1toTh341bbWR5F4W8+ZYzQI9Yz6Lyvdrz6dbJ7BXgN bKAEEEWeB5eAoZc5x/LxjRkDQZKLA5ntvskSzPuHX1igFWMusfQdympDPVrTXzvYha/z0E TECuD2qqRjFCsSXdJlW/x38lgVQPOf5+8BX4K5V2sd6zah5x3g1+WEXPZKmVpg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=mailchannels.net; s=arc-2022; t=1661443609; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references:dkim-signature; bh=anopUDp5ozStsOp7m/DsKCZ3eEuLLawyiGqKJA3EYfo=; b=lGt2FG4gSrVInOeojCUUTARhFwV7wqdut9UVpfq4CHQCCuSSH0YcLwQxMv/HDKSJ516rVe Feqkhxq2v6qlp6ljPjBLaPFLxk30Dq0l4tYP4iVH6W+vBXno0YNy6zh/xjBsW4sXzL2uYu VjLFN1WPvd8CjUhfHLv2XgaFAYZFXzAGSgSdpoHq83KLPeof0dehKUHqPdnX/iNdWZj+KN TzqFeCm306oyckPIFIBf7vvCUuoyDMbBMiFnafQAddrc5C1/q6Qgq2sPLM4xPF5R/vj0dC hfUPyFuW5yF1lrn/7TgYRz8sdBfncfiDcI1Sg3JG/iljCBpwUwtGNbje3LK1lQ== ARC-Authentication-Results: i=1; rspamd-75b4464bd-zzmqr; auth=pass smtp.auth=dreamhost smtp.mailfrom=dave@stgolabs.net X-Sender-Id: dreamhost|x-authsender|dave@stgolabs.net X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|dave@stgolabs.net X-MailChannels-Auth-Id: dreamhost X-Coil-Power: 71a32de35b4d361d_1661443609470_570315058 X-MC-Loop-Signature: 1661443609470:3773033028 X-MC-Ingress-Time: 1661443609470 Received: from pdx1-sub0-mail-a201 (pop.dreamhost.com [64.90.62.162]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384) by 100.103.147.32 (trex/6.7.1); Thu, 25 Aug 2022 16:06:49 +0000 Received: from offworld (unknown [104.36.31.106]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: dave@stgolabs.net) by pdx1-sub0-mail-a201 (Postfix) with ESMTPSA id 4MD7BV3bTyz8T; Thu, 25 Aug 2022 09:06:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=stgolabs.net; s=dreamhost; t=1661443603; bh=anopUDp5ozStsOp7m/DsKCZ3eEuLLawyiGqKJA3EYfo=; h=Date:From:To:Cc:Subject:Content-Type; b=FCqflbpmhi7z3AuP4xA5X4muM6qXt/oe/drsE4vIXd663b2lVCrikVJQX2BSzgOIp ovWp/KS8Gb6VnLzKAhntjltZ2MFkpmIuiYY/nDimA+jQvbEmR7HITtmArfn3GgBJLy LiE+L92SLXCdojqBXF0A3DWMYormLFC8KbMbBf+soq4lIBVJ4JOnmezbBDf1ZCIh+U 90MpeWwMbC7jwb+rMn0QJN5kV2gipxlvjqrFc2et00AlOoKVkjhIg1caQfqIosM2zw mAaSQB9lDufTsOuKhLdmmOTIiD3QtO63pNqDPwcZVBZAo2+6Zh82WAfJ6R2CVOGGZT lu5QcLjQtmHPg== Date: Thu, 25 Aug 2022 08:48:30 -0700 From: Davidlohr Bueso To: Liam Howlett Cc: "maple-tree@lists.infradead.org" , "linux-mm@kvack.org" , "linux-kernel@vger.kernel.org" , Andrew Morton , "Matthew Wilcox (Oracle)" Subject: Re: [PATCH v13 36/70] xtensa: remove vma linked list walks Message-ID: <20220825154830.jb46malqyy3qme3e@offworld> Mail-Followup-To: Liam Howlett , "maple-tree@lists.infradead.org" , "linux-mm@kvack.org" , "linux-kernel@vger.kernel.org" , Andrew Morton , "Matthew Wilcox (Oracle)" References: <20220822150128.1562046-1-Liam.Howlett@oracle.com> <20220822150128.1562046-37-Liam.Howlett@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <20220822150128.1562046-37-Liam.Howlett@oracle.com> User-Agent: NeoMutt/20220429 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED autolearn=ham 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 Mon, 22 Aug 2022, Liam Howlett wrote: >From: "Matthew Wilcox (Oracle)" > >Use the VMA iterator instead. Since VMA can no longer be NULL in the >loop, then deal with out-of-memory outside the loop. This means a >slightly longer run time in the failure case (-ENOMEM) - it will run to >the end of the VMAs before erroring instead of in the middle of the loop. I don't see anyone minding this. > >Signed-off-by: Matthew Wilcox (Oracle) >Signed-off-by: Liam R. Howlett Reviewed-by: Davidlohr Bueso