Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp957524imu; Tue, 11 Dec 2018 10:10:26 -0800 (PST) X-Google-Smtp-Source: AFSGD/XmMCs2990zRZSATV4ZczVHQ0Xmvs0HF8bIZajzkZ+z29hxxBRFaCrifyMsjgY+R8weISS0 X-Received: by 2002:a62:46d0:: with SMTP id o77mr17404958pfi.172.1544551826330; Tue, 11 Dec 2018 10:10:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544551826; cv=none; d=google.com; s=arc-20160816; b=aquz5QAzou1U76UdJOs/H+qaZBbfupYfQN+KLTo8+fnnYWU0NVU9z24W1RFMTGgReF Tga2jZ005VRZx4G+MnPMGRyPMdder/lDulixeIMaZBIoCLiLmbq/oVAPKS6Fv4x1iqmA tW2A8Z6kuiy70a7sszpfGJpgxCB+/JLXAPUhyqECN69GbH7lpg3lADOvKMzb1u6ucij/ NpUZ9h4uGIcVDVtssK4Nt5HkuuovmEXuOy/77qDJIOhyEOpsQos061wNb3ca54UD7g7p jmaTWV9TAuRu8JdDAuPf0Ao90MVPlk9ABCVuhnim/VHSe96Xg0weXQHyXsZU5a66fXgY bCwg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:message-id :in-reply-to:date:references:subject:cc:to:from; bh=0NHJ8994NBvSN4wKAezRbBvp/OaWY5eT/72A9/03k2o=; b=j0zEsUm8oc+GKM1YDtBIvMTFl+1XY+J7RKmBkGxBTYCgLSrh26336lqY2Gm/oPPc9K htmI0okIRdgE4vPd/uxi2yr4w9bRdfvBhUd1eBEauEBnk0DLPElur8ebyf+6SvqPXHwl CnQzgnpdcmc4c1yiSA8H14QDcAYK0BoW5Gnw6RdwUOnec4JEJqq9LoOM/2vRCcoS4+xm MUOXpDSyAQ1n/jIfdWNoPJnTjU0aq6k/rUHLLp7vStXYaHvL6f9Jxn6pty+DLba6Tn2Y rl1RJwVq6JWOs2sBA85IQPTvWzGs3PgcKdsO4NyV3HeYh78a+ijtSHwalbtQFANT1Z2J gFmg== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k6si13032005pgr.500.2018.12.11.10.10.11; Tue, 11 Dec 2018 10:10:26 -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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726786AbeLKSJU (ORCPT + 99 others); Tue, 11 Dec 2018 13:09:20 -0500 Received: from mx1.redhat.com ([209.132.183.28]:34032 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726435AbeLKSJT (ORCPT ); Tue, 11 Dec 2018 13:09:19 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 3613889AC5; Tue, 11 Dec 2018 18:09:19 +0000 (UTC) Received: from segfault.boston.devel.redhat.com (segfault.boston.devel.redhat.com [10.19.60.26]) by smtp.corp.redhat.com (Postfix) with ESMTPS id EEE5F1057069; Tue, 11 Dec 2018 18:09:17 +0000 (UTC) From: Jeff Moyer To: Jens Axboe Cc: Matthew Wilcox , 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 , kent.overstreet@gmail.com Subject: Re: [PATCH] aio: Convert ioctx_table to XArray References: <20181128183531.5139-1-willy@infradead.org> <20181211175156.GF6830@bombadil.infradead.org> <0f77a532-0d88-78bc-b9cc-06bb203a0405@kernel.dk> X-PGP-KeyID: 1F78E1B4 X-PGP-CertKey: F6FE 280D 8293 F72C 65FD 5A58 1FF8 A7CA 1F78 E1B4 Date: Tue, 11 Dec 2018 13:09:17 -0500 In-Reply-To: <0f77a532-0d88-78bc-b9cc-06bb203a0405@kernel.dk> (Jens Axboe's message of "Tue, 11 Dec 2018 11:05:12 -0700") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Tue, 11 Dec 2018 18:09:19 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Jens Axboe writes: > On 12/11/18 11:02 AM, Jeff Moyer wrote: >> Matthew Wilcox writes: >> >>> 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. >> >> OK, good to know. I obviously didn't look too closely at the two. >> >>> 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? >> >> I think the most common use case is a small number of ioctx-s, so I'd >> like to see that use case not regress (that should be easy, right?). Bah, I meant a small number of threads doing submit/getevents. >> Kent, what were the tests you were using when doing this work? Jens, >> since you're doing performance work in this area now, are there any >> particular test cases you care about? > > I can give it a spin, ioctx lookup is in the fast path, and for "classic" > aio we do it twice for each IO... Thanks! -Jeff