Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp4096197pxb; Mon, 27 Sep 2021 09:17:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx1Hd4kQFv6/jofyoFhNpInAzNGsbcx5wr2HU7kFyL8MJstDikk8j/ZnAXNQot43bON7Sx4 X-Received: by 2002:a17:90a:8b0d:: with SMTP id y13mr814241pjn.125.1632759475838; Mon, 27 Sep 2021 09:17:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632759475; cv=none; d=google.com; s=arc-20160816; b=ocSyrY9f1PGRdumA8jqL7o+paIF7JJskFCH9A4gag3AJx1pjkRJ9SXp635RZQtoP6o 8UXEVU7NyJWb8/Davmwj5p341VYVOddCx+ppFeYs6l8KTEdQF4TvJmaTviAy0NL+YTYS v6UD0AeizQc9GHdg4OROYszkY8M9VP5HSUDY6znU17jy1E8lpwKMOxtkRUpkjbjEl9xp PvIaJfIKiHb+PX4afoaF8NtAVIlCayHFhbwSIO14CvzFTJXAHecdIxGX6S9wm1wD2z1k A3MCd1XD0hzaAXR5C++XpOqpLpWCegyw9rkMsTePtzmB9wXv/8Q9YqACnyYrxyCAXVWe sm7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=UgsPp2q6Gx3KrsOata6iPHfIDOHhSAz68nEiT/7q9us=; b=aXPe6Eulv0bbrewqNwoLUTFAPTgiY83ghVAkrMOoWqfagkBapZcB9ODOhgAQwNgwMF SZtCHMD6oEtIkwauV8t8N4fGpf4bU2YZrmG3yVvEHOMoTyzmVjvpPbTTuo3u+tTwOI+s 64E9uCOkGCSG/qs5imrG7CJI7Sx9JmyRiQH564Fy8xD4UbeMy5GrQFVcDwN+uMkwJ554 u0XqEOw3nW3i3MWVlB1g43HkwOrhX0AS1uj4G7noGjxHNN8fODyltZqzWOOCpBm0w6qI TkRTBqS4J9rqBm3DPYeGcT/IH7jGRki800SicWcYILKJ/D8tKiCwTJ8QbNoGdB4u1UOM Yr0g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b="qGudGH/a"; 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 n8si21004291plh.356.2021.09.27.09.17.41; Mon, 27 Sep 2021 09:17:55 -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=pass header.i=@infradead.org header.s=casper.20170209 header.b="qGudGH/a"; 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 S235338AbhI0QSN (ORCPT + 99 others); Mon, 27 Sep 2021 12:18:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54788 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235373AbhI0QSM (ORCPT ); Mon, 27 Sep 2021 12:18:12 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 15F7AC061575; Mon, 27 Sep 2021 09:16:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.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=UgsPp2q6Gx3KrsOata6iPHfIDOHhSAz68nEiT/7q9us=; b=qGudGH/afrOzkzqnuDCTW95KL6 ncew57BzBi7/M6JN3tpoDfC5lMljDwByukZkFsLNz6ASnlKdwWCz5MOAUNQlE22aFQPKwG4tx+Isr hYCL4l9XVK3ovHiP/B+bkiG0153FJR9ShmbucpflFSZY8S4tqaouP0FgwkXVv1xgxZUYnejeKxebp XI5RXKa34qQpKGbkQEYULpUMFFijttxkFBszn04DBUta46Z98TpeVtv7cdjXV2Y9xvUe01+1HaOeB f5a/4tWzfwzMAQod1Sfcfxr2EIyhwXW+OMAn77wQUka6vt2QCnWrUzkvVVDSwk/vZvMqb5iTerLsS ls9wSOuQ==; Received: from hch by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1mUtIA-009vH2-Mi; Mon, 27 Sep 2021 16:16:05 +0000 Date: Mon, 27 Sep 2021 17:15:46 +0100 From: Christoph Hellwig To: Hamza Mahfooz Cc: linux-kernel@vger.kernel.org, Benjamin LaHaise , Alexander Viro , linux-aio@kvack.org, linux-fsdevel@vger.kernel.org Subject: Re: [PATCH] aio: convert active_reqs into an array Message-ID: References: <20210927161047.200526-1-someguy@effective-light.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210927161047.200526-1-someguy@effective-light.com> X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org. See http://www.infradead.org/rpr.html Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Sep 27, 2021 at 12:10:47PM -0400, Hamza Mahfooz wrote: > Commit 833f4154ed56 ("aio: fold lookup_kiocb() into its sole caller") > suggests that, the fact that active_reqs is a linked-list means aio_kiocb > lookups in io_cancel() are inefficient. So, to get faster lookups while > maintaining similar characteristics elsewhere, turn active_reqs into an > array and keep track of the free indices of the array (so we know which > indices are safe to use). As requested last time: please explain what workload you have where cancellation performance actually matters.