Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp4132503rwd; Tue, 30 May 2023 00:33:59 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7ZC+rlP+prPauPyu4Y/qfoGD2hGEyzzLbh+KUOBzpiGs4ETWw/yqg7PVkWflF4byCTQd8m X-Received: by 2002:a05:6a20:c896:b0:10b:d3e0:78a7 with SMTP id hb22-20020a056a20c89600b0010bd3e078a7mr1457906pzb.61.1685432039438; Tue, 30 May 2023 00:33:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685432039; cv=none; d=google.com; s=arc-20160816; b=P5UR9DJGibRrZuecM72oA9RtAMqjCs+NFBpg0smBZY8wDKyHWpCD3oD5h3HvY8Gztu Hw9DYhro1sgG8zhJRNM5kGd8S595gy15y6anZ6bVcVIJOTWUTQtgR2ivD3g5c31F0Ult yWxv3txbPpPCl9RnpTIOGQ2vExEiw3hsbkrUoIW4zMdh6WN7tV6L89DqHB5mdqZP/2QO IDZvjZjJmhZeffuvfdmW0jf2Riuaqog/lMSEHwI7aZRrgKgci+We7SDxxrUi4aqWohD5 bO02napLdQvxCz8cfWMl5bfjpHGxe9OFsG/dqW0fQ2qtHtlUMgq2PCZbZdQwkwA2cQBI BPYw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:in-reply-to :subject:cc:to:from:message-id:date:dkim-signature; bh=vF1YqewHfqz8RaOJVKdfNsi+SrJX3sGBy2RupXeaizM=; b=ZVOehIbm6pMXMDa3jAolPXFlYxbd5oeoXbijYwZm0Rs04kS+gDsMZRKrWUJgohBRQ9 V6E9Tg7zVJcJ65zl85AaDCJZLUCYx8GXD2rGBNQ3wJT4BdaGjQtxs2RM3mqNlgJWUeT/ aq8ybuK+u8sF5tpd7hPDtIo6RCw3Y93vN6OSkp9rupt1rXba6QpqsUemL57En5hUX5Dz UGWqlmZC/7Cl6B488tjsS9fVt1Y3g9UVlEZscNlE+HKj6aJgs15P0NmrK2lff5LmDaNq GjVdTiY/+eSAjvcKWgKGqd8QUIvTV+h4yTOpexBd/FYqeFt77fvYqcDvb6m4qT0ZkbCv YDyA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=XbcQgGGb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j24-20020a637a58000000b005340840c0c0si9838815pgn.11.2023.05.30.00.33.46; Tue, 30 May 2023 00:33:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=XbcQgGGb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231193AbjE3H2f (ORCPT + 99 others); Tue, 30 May 2023 03:28:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53676 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230152AbjE3H2L (ORCPT ); Tue, 30 May 2023 03:28:11 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D039BCD for ; Tue, 30 May 2023 00:27:54 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 5A5B560B89 for ; Tue, 30 May 2023 07:27:54 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B98F4C433EF; Tue, 30 May 2023 07:27:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1685431673; bh=vIaudP5NU5hbqpeGQdGV6ROF0m6SWbPHnRrd38ju+7M=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=XbcQgGGbLe7W9nkZLOdCjf3ZNIiXcRgG+zlrPXRFFXEOPyWLEOYlRhpOCMwTlzuBT MGAI6CS+EeCypdr0WDozuz0A6G38S3av3ACxJsTLfU6N5UR8VSycufN1yxRQJtDKB+ /kPuIHeU4tkb7AFSEuG0bLN75/pBgL+8xIp2mH/isew2AIqszz1XNnlsxI6U1ACGZQ +PQlVvGvqML4EM3L71fTIUsDQ9gR6QfdH9eOCUZwxemsPAB4YbRBvtulIMjuQr87qg g0kUrHULhCJdauUkMdXKvgJD6Jqc1K2hKyBZNB8mpgN86rjU3TerdYeoOS3AldqSm7 q0/oQRWfHrtVQ== Received: from ip-185-104-136-29.ptr.icomera.net ([185.104.136.29] helo=wait-a-minute.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1q3tln-001EAU-Ip; Tue, 30 May 2023 08:27:51 +0100 Date: Tue, 30 May 2023 08:27:48 +0100 Message-ID: <87pm6ijn2j.wl-maz@kernel.org> From: Marc Zyngier To: "Liao, Chang" Cc: Shanker Donthineni , Thomas Gleixner , Sebastian Andrzej Siewior , Michael Walle , , Vikram Sethi , Jason Sequeira Subject: Re: [PATCH v5 1/3] genirq: Use hlist for managing resend handlers In-Reply-To: <5eea1d90-a903-d211-9dd7-38cd824c1573@huawei.com> References: <20230519134902.1495562-1-sdonthineni@nvidia.com> <20230519134902.1495562-2-sdonthineni@nvidia.com> <6dc6642a-1e7c-f111-1fa2-be54826ecef6@huawei.com> <86cz2jcykv.wl-maz@kernel.org> <5eea1d90-a903-d211-9dd7-38cd824c1573@huawei.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/28.2 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-SA-Exim-Connect-IP: 185.104.136.29 X-SA-Exim-Rcpt-To: liaochang1@huawei.com, sdonthineni@nvidia.com, tglx@linutronix.de, bigeasy@linutronix.de, michael@walle.cc, linux-kernel@vger.kernel.org, vsethi@nvidia.com, jsequeira@nvidia.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false X-Spam-Status: No, score=-4.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 30 May 2023 02:44:05 +0100, "Liao, Chang" wrote: > > >> What is the benefit of using hlist here? If you want to enjoy the > >> low latency of querying elements by key, you must define a hlist table > >> with a reasonable number of buckets. Otherwise, I don't think the time > >> complexity of hlist is better than a regular double-linked list, right? > > > > You do realise that the list is processed in order, one element after > > the other, without ever querying any arbitrary element? Have you read > > the code? > > Yes, so i *wonder* why not use regular a linked-list here if no need to do > arbitrary querying. I have no doubt the idea of these changes are sound, > just curious about the data structure used to maintain resend IRQs. What about it? For the use case at hand, they result in the same complexity. Unless you have spotted a corner case that results in a non O(1) complexity? M. -- Without deviation from the norm, progress is not possible.