Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp941505imu; Tue, 11 Dec 2018 09:55:21 -0800 (PST) X-Google-Smtp-Source: AFSGD/Xe/i2Ag1c35vFji0x49/G9MU8oiBSL7fjSiDDW4vymKHRT+9CTNw7/FOROruAppXYH+VvX X-Received: by 2002:a62:cdd:: with SMTP id 90mr17152905pfm.219.1544550920959; Tue, 11 Dec 2018 09:55:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544550920; cv=none; d=google.com; s=arc-20160816; b=V0gG3ui1OKSEPiEXcd7enpchTSl2Jboo+2jldgsQweCRxOZVpNtTnnfsXuPpjuL6Oz vZFdJ9DeaDBuZGyB2MtLyLkMrThDyRDRe9zCRSV9GJYdMthysehW5L2BK8lpVM//xJ0C 1VhZOb0oACk36PLZ4dbiDKvcnqq2KQGHgYJB7T9gYjOLZaGSheFPl85+KrxtSQlsD1/v X1e3Ury8HyHEmvUbXwSPD8ooP3TFaPjD66sieDHhHWQpmkyd8jubUykZI+MqqTa9DihJ s/SUZVWlG7wGV6g6jzumBXcKw8N21vLBIYwz6quAImqoQTF2wJ6vsIXDFUSNZ1zLa2dR x0ww== 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=azOD/kMbCaYoWMPFB6ffydr4LXt3iwijGocViQOfoJA=; b=VP0s1HLjc9F1UqvYu0zVqiU5CKPNwbBFH7Iy8VTJbUS/qy3M0LJ9deephKpPuCKtht X5Ps7U4PMISoHecsByeNjWOrckA6R4BVI8dEiWQfZE57txu/q5a+SVM2HAK6i13loRZ4 FJa/iWyvBV+Jnj+7zmG6OJIli12Lh/ictAjizHrrA5Wgp7/vluXnBxDEyaYsVlPkCMD8 yi4DsHASKGDIoxnU34M0gJPh/lF5yhj0uT3CX2G0MO0fMKwDgq5VZ1oVSioBj0w7Dlo2 bdPHQcpz2shPNsOgQQZvdvXEyIm7wu5B4CuUeDmaG+x0aKPGymkb3nc570MiHK1ggnqQ sIYQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=ha6hOH93; 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 i12si12342947plt.213.2018.12.11.09.55.05; Tue, 11 Dec 2018 09:55:20 -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=ha6hOH93; 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 S1726721AbeLKRwB (ORCPT + 99 others); Tue, 11 Dec 2018 12:52:01 -0500 Received: from bombadil.infradead.org ([198.137.202.133]:51256 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726231AbeLKRwA (ORCPT ); Tue, 11 Dec 2018 12:52:00 -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=azOD/kMbCaYoWMPFB6ffydr4LXt3iwijGocViQOfoJA=; b=ha6hOH93xhwxbiQTY4/hqIt2Z Wh+jQWVTagg137merD3mV0v7xE9Nm8zXlrqkwOSp5Nbwx+1LfHgLQkuCteWHsaAUhGCmPY+0u0+V8 qgOSPW4lW1yWnguysCczXtBiWZ+H5LeM3g5u4ezWNUVR4Hx9F/K4MUKcQBy4YR+2pa4E1Vt9X4zaH 3wZ0muMRxtk1XW7gwvJD7f/GnXM1m80UJOS/ivsE0tA4qs3uJTi3JsXCZ3qQDm7+0+l0qRe3WSqh2 Zp/nqBnyFwAkil3DLeDxNbxzl7eO3p1f0ogMRFGKxL7TCVvTgS7LxhYzdzho+Nwn1U7VXqV2zrWvx ZbPHo/pOQ==; Received: from willy by bombadil.infradead.org with local (Exim 4.90_1 #2 (Red Hat Linux)) id 1gWmCK-0004ye-Ij; Tue, 11 Dec 2018 17:51:56 +0000 Date: Tue, 11 Dec 2018 09:51:56 -0800 From: Matthew Wilcox To: Jeff Moyer Cc: Alexander Viro , Benjamin LaHaise , Andrew Morton , Kees Cook , linux-fsdevel@vger.kernel.org, linux-aio@kvack.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Dan Carpenter Subject: Re: [PATCH] aio: Convert ioctx_table to XArray Message-ID: <20181211175156.GF6830@bombadil.infradead.org> References: <20181128183531.5139-1-willy@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 Tue, Dec 11, 2018 at 12:21:52PM -0500, Jeff Moyer wrote: > I'm going to submit this version formally. If you're interested in > converting the ioctx_table to xarray, you can do that separately from a > security fix. I would include a performance analysis with that patch, > though. The idea of using a radix tree for the ioctx table was > discarded due to performance reasons--see commit db446a08c23d5 ("aio: > convert the ioctx list to table lookup v3"). I suspect using the xarray > will perform similarly. There's a big difference between Octavian's patch and mine. That patch indexed into the radix tree by 'ctx_id' directly, which was pretty much guaranteed to exhibit some close-to-worst-case behaviour from the radix tree due to IDs being sparsely assigned. My patch uses the ring ID which _we_ assigned, and so is nicely behaved, being usually a very small integer. What performance analysis would you find compelling? Octavian's original fio script: > rw=randrw; size=256k ;directory=/mnt/fio; ioengine=libaio; iodepth=1 > blocksize=1024; numjobs=512; thread; loops=100 > > on an EXT2 filesystem mounted on top of a ramdisk or something else?