Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp1198771pxu; Thu, 17 Dec 2020 04:45:12 -0800 (PST) X-Google-Smtp-Source: ABdhPJxsX7lyr44hc7RCdpJ/gBCjtE59a7b0rDF+U0qiz2fn84YW8nSu79ZOtp9uQ5bV4UZ6Nejo X-Received: by 2002:a50:8a90:: with SMTP id j16mr22750382edj.334.1608209112725; Thu, 17 Dec 2020 04:45:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608209112; cv=none; d=google.com; s=arc-20160816; b=A3SoYVLbGQu+ajiVkDvxqZGilA9SiOdqG+V68gZJuleCG5XQVn65hfifdlRjkyc9zv 3V6ggDS56HRH8p2UWArz93fG6MJNxz8kRIYscqCYMjDKgbvveYvZdwV9domKadqTqmJX lAN/6P2MKS5elOqhUOf0Gev9crFmjrs9AXX0z5mrR2NNdX0BgzTXNLkTyp+phtpidUiW 4QS3vo99DGp/gSzqPqQAgyQhsgDD1h9vecM5VkqkxUCPfJPWyPlwJK7iVp2Chdqc9Z/V AYKg8cppwLtDsd/mAKq/e64Rnlt50kfpIDXj9QYaQxZEi6uko9mdFtPM7Bz0BLDfDaHr hN/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:subject:from :references:to:dkim-signature; bh=VBRAOeYnTsb9SYg0ukbj8B283FFx2VaOi/KeOyO1Tpc=; b=Tj6huxed7M+4/rB+nkJ9xfwC6hX5QMlVVBvqYuUEE6AkdYQszsEdCjR0a+IrIdphy8 NIk/Vqishlvoc87B8n7D+ZIJEyy8pvmQmzLto1s7R6kcBmG6Vm9Xp3l2dKs3cWsdCinS jo9x1Z3uDrmO3vbvG6euy0vN0jUgffGqcdbUC5IZhgm1JlukIWgSDRvMJ0Taxi8mbpLC 1mLIowHU/5L6F5KFNSh7dJYLREaLNkk7aW3kPAsCWcKzLgunqDUTmGzhqR/EYardR+U2 YzwhkLgQy8kHME5C7Jlex2HWMJsBQ1puahS0+7OauJ2d9OuqfbHcf7zawv88cUCJ1++v aSWg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@nbd.name header.s=20160729 header.b=jbAcwdEf; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-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 u21si4289298edx.350.2020.12.17.04.44.47; Thu, 17 Dec 2020 04:45:12 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@nbd.name header.s=20160729 header.b=jbAcwdEf; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727365AbgLQMk4 (ORCPT + 99 others); Thu, 17 Dec 2020 07:40:56 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47616 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726533AbgLQMkz (ORCPT ); Thu, 17 Dec 2020 07:40:55 -0500 Received: from nbd.name (nbd.name [IPv6:2a01:4f8:221:3d45::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 86CDAC061794 for ; Thu, 17 Dec 2020 04:40:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=nbd.name; s=20160729; h=Content-Transfer-Encoding:Content-Type:In-Reply-To: MIME-Version:Date:Message-ID:Subject:From:References:To:Sender:Reply-To:Cc: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=VBRAOeYnTsb9SYg0ukbj8B283FFx2VaOi/KeOyO1Tpc=; b=jbAcwdEfmrtLXBErYsaHGEnmaa g04AlrLTSiod6GvvrfQDzuvtWVobkPYYIouvmMQGiR6gPN0T2yw1Ty9gsOISv6nRecLSmXpN33bSQ OpdW+kOTrvrywYtfmmH5F1FAIFhO4rGrCfIsoZwnCjMXlz55t6OGg/vUiJSPeE6zBjOY=; Received: from p4ff13815.dip0.t-ipconnect.de ([79.241.56.21] helo=nf.local) by ds12 with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1kpsZp-0001xr-ND; Thu, 17 Dec 2020 13:40:13 +0100 To: Johannes Berg , linux-wireless@vger.kernel.org References: <20201216204316.44498-1-nbd@nbd.name> <20201216204316.44498-4-nbd@nbd.name> <3980921a9276b9d38b12651e40590118f1d65609.camel@sipsolutions.net> From: Felix Fietkau Subject: Re: [PATCH 4/7] net/fq_impl: do not maintain a backlog-sorted list of flows Message-ID: <59a58091-9fbc-4150-b839-bbc8e5e63f00@nbd.name> Date: Thu, 17 Dec 2020 13:40:13 +0100 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:78.0) Gecko/20100101 Thunderbird/78.5.0 MIME-Version: 1.0 In-Reply-To: <3980921a9276b9d38b12651e40590118f1d65609.camel@sipsolutions.net> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On 2020-12-16 21:59, Johannes Berg wrote: > On Wed, 2020-12-16 at 21:43 +0100, Felix Fietkau wrote: >> >> + u32 *flows_bitmap; > >> + fq->flows_bitmap[idx / 32] &= ~BIT(idx % 32); > >> + for (base = 0; base < fq->flows_cnt; base += 32) { >> + u32 mask = fq->flows_bitmap[base / 32]; > > This all seems a little awkward, why not use unsigned long * and > ? > > The &=~ BIT() thing above is basically __clear_bit() then, the loops > later are basically for_each_set_bit() if I'm reading things right. I guess I can simplify this some more. I think I avoided for_each_set_bit for performance reasons to keep things inline in the loop, but I'm not sure how much that matters in practice. - Felix