Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp1979689ybk; Mon, 11 May 2020 08:56:47 -0700 (PDT) X-Google-Smtp-Source: APiQypJRp8GVOyp3MBtPbFGMU2QkFG3fbT+l1Ai26jkX9/uPBhZyyryP8BhQNK2hDc/hn6/ZYJlH X-Received: by 2002:a17:906:784c:: with SMTP id p12mr14259168ejm.346.1589212607073; Mon, 11 May 2020 08:56:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589212607; cv=none; d=google.com; s=arc-20160816; b=ZG0o1yl29Ljk/xDx3wuT2RgYmiX1fJLsGG1D9qm7zhNt3ZCafKq25E1FTXpsPsKaZv CvAqIeS8xNt7pn7Cew4mx9RYp7lPUbetHKlOV1h/FewU2S7hpOsv7ed8YUG4Lapei6mw qEGeKYJpkeOvo4Wf0CYCYTeuvu/njCN7Mflx5JcvpnIdy5k3bAP+EMTCUhL2LTjeS8+P o8PEwzgTkqTvrLYR7/1OLnkZIhkQGK4E5pc/0DuGhE8ZHJtqEPi3+j6QChb2v763vobe 0gmRktS8Nnues2IHcFN+LzbtgO3+d+ttTRRz0wnqlXizT6tMuxzhGE2Bux07lKx5rs7Z /URg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=fgR2V/CO/9l3sT2m4IZfICSNwcHm5fI2cusmiGpz5bc=; b=AxwzbEOFuixwk+J5EPrxS9kDmAmOIICsMDB247MlBY5YSTvq6+0qOfcCut1rYoscMK ugYGHBt9LGijdxSbW3gf4WJkWhQhFkIjKUilP29V6D7t5Izey2zxbQEJIU0BM4c0xA1v 4aHQjI5YLL9pmzcngWSUWUKejGR+1NETsRNMi9CrPgWwpbxdvgYK8eK0s/WWZVBnD4Aq R5LKIl05uEdYbBTfNXzZOiqywMXUr3nUQAm4jisGl9lUXym2lBAo/bRjKN/fwpu4pw8X TxNfdhk/7ua0Vtoywk8ROmHjiZwwdyqllZwE8HBq89hUG50wggkd+3PPkcRVv5Y+TcWD 6mpw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=Q3uhuAi8; 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 a13si3343591edr.32.2020.05.11.08.56.24; Mon, 11 May 2020 08:56:47 -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=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=Q3uhuAi8; 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 S1730481AbgEKPwO (ORCPT + 99 others); Mon, 11 May 2020 11:52:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52462 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726687AbgEKPwO (ORCPT ); Mon, 11 May 2020 11:52:14 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 27B52C061A0C; Mon, 11 May 2020 08:52:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.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=fgR2V/CO/9l3sT2m4IZfICSNwcHm5fI2cusmiGpz5bc=; b=Q3uhuAi8Znj5rCKf4UbH4yK66i R5rhxZT8aqzxuwdJ5y1oEivI3AsYvThrlFC3Q5WXrTvn/fRFQqzGrkJfk5ODEfG/zzW7+0cPqC8/r dbBWA2t2lHXCYO1njHg/KronsAe3pDXSvfJNx3h1AHe34N3ok2U8uiLP3mYk8tJDMJByKnWsMDcaf OdrcSV1SJGDHsSjb89RfXrrrnymtdouseL/A0QLzCOHfVMzLjt/sBWBMIV3gU0LjYvc3Zj+anqTCK XnV+TtcYan0RNagJ3Nskkv8wqmfAOFv7V35uYN9fRfCd00/N1aHqzLBnnC7lo9s5nvByBOntGcLbs I7F7ftnQ==; Received: from willy by bombadil.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1jYAiq-0003Lw-Nh; Mon, 11 May 2020 15:52:04 +0000 Date: Mon, 11 May 2020 08:52:04 -0700 From: Matthew Wilcox To: Peter Zijlstra Cc: Joerg Roedel , Joerg Roedel , x86@kernel.org, hpa@zytor.com, Dave Hansen , Andy Lutomirski , rjw@rjwysocki.net, Arnd Bergmann , Andrew Morton , Steven Rostedt , Vlastimil Babka , Michal Hocko , linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org, linux-arch@vger.kernel.org, linux-mm@kvack.org Subject: Re: [RFC PATCH 0/7] mm: Get rid of vmalloc_sync_(un)mappings() Message-ID: <20200511155204.GW16070@bombadil.infradead.org> References: <20200508144043.13893-1-joro@8bytes.org> <20200508192000.GB2957@hirez.programming.kicks-ass.net> <20200508213407.GT8135@suse.de> <20200509092516.GC2957@hirez.programming.kicks-ass.net> <20200510011157.GU16070@bombadil.infradead.org> <20200511073134.GD2957@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200511073134.GD2957@hirez.programming.kicks-ass.net> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, May 11, 2020 at 09:31:34AM +0200, Peter Zijlstra wrote: > On Sat, May 09, 2020 at 06:11:57PM -0700, Matthew Wilcox wrote: > > Iterating an XArray (whether the entire thing > > or with marks) is RCU-safe and faster than iterating a linked list, > > so this should solve the problem? > > It can hardly be faster if you want all elements -- which is I think the > case here. We only call into this if we change an entry, and then we > need to propagate that change to all. Of course it can be faster. Iterating an array is faster than iterating a linked list because caches. While an XArray is a segmented array (so slower than a plain array), it's plainly going to be faster than iterating a linked list.