From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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: Sender: owner-linux-mm@kvack.org List-ID: 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?