From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C9468C433EF for ; Thu, 23 Sep 2021 13:01:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id AD28F611B0 for ; Thu, 23 Sep 2021 13:01:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235776AbhIWNCb (ORCPT ); Thu, 23 Sep 2021 09:02:31 -0400 Received: from h2.fbrelay.privateemail.com ([131.153.2.43]:55519 "EHLO h2.fbrelay.privateemail.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241167AbhIWNCY (ORCPT ); Thu, 23 Sep 2021 09:02:24 -0400 Received: from MTA-15-3.privateemail.com (MTA-15-1.privateemail.com [198.54.118.208]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by h1.fbrelay.privateemail.com (Postfix) with ESMTPS id D567B8064F; Thu, 23 Sep 2021 09:00:51 -0400 (EDT) Received: from mta-15.privateemail.com (localhost [127.0.0.1]) by mta-15.privateemail.com (Postfix) with ESMTP id 8254A18000AD; Thu, 23 Sep 2021 09:00:50 -0400 (EDT) Received: from [192.168.0.46] (unknown [10.20.151.205]) by mta-15.privateemail.com (Postfix) with ESMTPA id 5791818000A3; Thu, 23 Sep 2021 09:00:49 -0400 (EDT) Date: Thu, 23 Sep 2021 09:00:43 -0400 From: Hamza Mahfooz Subject: Re: [PATCH v2] aio: convert active_reqs into a hashtable To: Benjamin LaHaise Cc: linux-kernel@vger.kernel.org, kernel test robot , Alexander Viro , linux-fsdevel@vger.kernel.org, linux-aio@kvack.org Message-Id: <7H1WZQ.H8D3XK8HUSNQ3@effective-light.com> In-Reply-To: <20210919145645.GE16005@kvack.org> References: <20210919144146.19531-1-someguy@effective-light.com> <20210919145645.GE16005@kvack.org> X-Mailer: geary/40.0 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed X-Virus-Scanned: ClamAV using ClamSMTP Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org On Sun, Sep 19 2021 at 10:56:45 AM -0400, Benjamin LaHaise wrote: > You're doing this wrong. If you want faster cancellations, stash an > index > into iocb->aio_key to index into an array with all requests rather > than > using a hash table. Would that not mean that, we would have to keep track of the indices of the array that are not being held by an `aio_kiocb`?