Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp289034imj; Wed, 13 Feb 2019 08:21:39 -0800 (PST) X-Google-Smtp-Source: AHgI3IbK5T0vGT1z1oL7olzu00DC8GeDYEBK9nxY0OdvoRiSA1el1tLYDV37ujWSMkkGi/7iY1lQ X-Received: by 2002:a63:2bc4:: with SMTP id r187mr1170484pgr.306.1550074899122; Wed, 13 Feb 2019 08:21:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550074899; cv=none; d=google.com; s=arc-20160816; b=xeNKmVkxn5f4V2yO6Z2ArutET6zOSROEFt0Ncy7r+TRcGcEp/CvRXXKbxE2jxV1hWV JvIcjpj1Tihs0t8gaCQWJaFSeCKKXRhwHoXldj984dgOk7rhez60cbvLK4bAR4HR4LtM gAw1/voTNh40FpqpuleFizBIrK+aDbgHmHfoHgUiYZ4U+7+6zNbFvSXYtW4aNNSEv2xa FRaVCBeEZjOgaQMHWTdWFhXwJCT7pMTK63WomXSNOSgjiI/GKXk6aDCxBCDtqVdCgq4E MNs63Yram66KVvYI5DFWyi5NE69e/xMQqhxlN92Xa+QfhTYdZMhflzO6a7ZCJiezvHE8 aRmA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=uTRgEeEdhm0wcpIo1IAgXhU8CUSaovZo07Rkj8+fcgg=; b=pPDgkWw4dK+VF61K+IcQ/gTTatBRb9GriVAOCkTcGIM83JUB+/hFSB2/ie76N1hdMR LlJCe+BzRujGXgAfVz3vZgsJyBZwUE15bK4IUQu2oG3f7VN+CnCP+aByn3FoYX6CJi7x 9/1eFt2uDNAZKI1upecscrxvud/wCK0OLCnLSTaI8ttfLfQYTLFut5kUhT3S0swqFbFX hsGejAzuCnOGHkvbU6ruvcOtPNk5+OqCheXHn/jXlyQCstSJQBbQx/r8yCT3Cldiu/3s eqWit07PzbviXbTRcri+6TRSsKv3HzNoD/H1XjwobHW8Z4B2L3ZGUkDIO9/mM1Q2NGrE 10nQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b="YZVh/XcB"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d1si1154676pls.164.2019.02.13.08.21.06; Wed, 13 Feb 2019 08:21:39 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b="YZVh/XcB"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2404341AbfBMQM7 (ORCPT + 99 others); Wed, 13 Feb 2019 11:12:59 -0500 Received: from bombadil.infradead.org ([198.137.202.133]:43648 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2404331AbfBMQM7 (ORCPT ); Wed, 13 Feb 2019 11:12:59 -0500 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:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=uTRgEeEdhm0wcpIo1IAgXhU8CUSaovZo07Rkj8+fcgg=; b=YZVh/XcBQgbmagSejHOgjmBTx B9yKu1TY7uHcFQ2sMFMbZtzUhXg8uzeF4F0QI2HiAHwMsci1IA4Qax07Cy/fpRYJ3o48A1/EzjMeI PUE4tofsMHmjdad95EQqv1dZQgU4dYczxBvfOylsVlG0tc6ECQlSemXR1zJyG1akUuPDtaWdum4ru x1YiNra9qQs1eYESGG3rHNVavYbgwOSZMjLuTdpAXDg/zJSpoEed2GhxB2LI7Nhnrafq1/ib1UfuN hfDO6J8PKFtV0kChsiQw+YCREoZcY/kHoYpjQkmqNL0RIIJ3xsyvx83gpvZDLnPubBb8ewa4Ou3XN DHDUUXwpw==; Received: from willy by bombadil.infradead.org with local (Exim 4.90_1 #2 (Red Hat Linux)) id 1gtx9e-00020l-MD; Wed, 13 Feb 2019 16:12:58 +0000 Date: Wed, 13 Feb 2019 08:12:58 -0800 From: Matthew Wilcox To: Wei Yang Cc: "Tobin C. Harding" , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] xarray: Document erasing entries during iteration Message-ID: <20190213161258.GS12668@bombadil.infradead.org> References: <20190212072958.17373-1-tobin@kernel.org> <20190212135129.GL12668@bombadil.infradead.org> <20190213144744.ifejzbxrbaltivwc@master> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190213144744.ifejzbxrbaltivwc@master> User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Feb 13, 2019 at 02:47:44PM +0000, Wei Yang wrote: > On Tue, Feb 12, 2019 at 05:51:29AM -0800, Matthew Wilcox wrote: > >That is _fine_. As you know I hope to get rid of the radix tree soon ;-) > > You mean replace radix tree in whole kernel? That would be a big effort. Already mostly done. http://git.infradead.org/users/willy/linux-dax.git/shortlog/refs/heads/xarray-conv The only remaining user of the radix tree in that tree is the IDR. So now I'm converting the IDR users over to the XArray as well. But that isn't what I was talking about. At the moment, the radix tree and the XArray use the same data structure. It has good best-case performance, but shockingly bad worst-case performance. So we're looking at replacing the data structure, which won't require changing any of the users (maybe the page cache ... that has some pretty intimate knowledge of exactly how the radix tree works). > BTW, have we compared the performance difference? It's in the noise. Sometimes the XArray does a little better because the APIs encourage the user to do things in a more efficient way. Some of the users are improved just because the original author didn't know about a more efficient way of doing what they wanted to do.