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 Received: from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 7F23FC001E0 for ; Tue, 15 Aug 2023 18:29:03 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 05B40404FE; Tue, 15 Aug 2023 18:29:03 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 05B40404FE DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org; s=default; t=1692124143; bh=Nae2uJk5TlwYnItaRJeEIn07xGLbQlI6XAD4Mt3y0ls=; h=Date:From:To:In-Reply-To:References:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: Cc:From; b=BDAAyr/2mBELVoFGjiNX+I3MffZTFpTauVS9I7p8+zF9MgnHFVcBbIfqKeKb/DFuy ICzuxUfwtDVTjgB9K1mjypPo2Cq/cph6iSNDs3rqwIUUz+GQqC7O2/iDALujvwsHMB tPbK+asnV8wduWAypDGKpdpGfFaUsAYD6NnWSYjx5h+bex+PXR38yoSYGCFabAMubC spLaA7LivcYJKT3FcTnLNkDSQFTVFYqQe59F7bYYv8Y5pdKP932/12GrsGlhHM218d VCQ/VvkZG1VQQ0Aydc9rJ2vcyKuDqs5/fzLhOk7vJDU2AdPb9w97YdFJ5JEzMIn7em cq1WQV8xJngmA== X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id WOcs_SCUprb8; Tue, 15 Aug 2023 18:29:02 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp2.osuosl.org (Postfix) with ESMTP id 1D2B0405B2; Tue, 15 Aug 2023 18:29:02 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 1D2B0405B2 Received: from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id 094AF1BF422 for ; Tue, 15 Aug 2023 18:29:00 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id D4AB0405B2 for ; Tue, 15 Aug 2023 18:28:59 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org D4AB0405B2 X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 4xRB7A5kleLm for ; Tue, 15 Aug 2023 18:28:59 +0000 (UTC) Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by smtp2.osuosl.org (Postfix) with ESMTPS id 4FBFF404FE for ; Tue, 15 Aug 2023 18:28:59 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 4FBFF404FE Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 7F62864C1E; Tue, 15 Aug 2023 18:28:58 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 77F4BC433C8; Tue, 15 Aug 2023 18:28:57 +0000 (UTC) Date: Tue, 15 Aug 2023 11:28:56 -0700 From: Jakub Kicinski To: Vadim Fedorenko Message-ID: <20230815112856.1f1bd3ac@kernel.org> In-Reply-To: References: <20230811200340.577359-1-vadim.fedorenko@linux.dev> <20230811200340.577359-4-vadim.fedorenko@linux.dev> <20230814201709.655a24e2@kernel.org> MIME-Version: 1.0 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1692124137; bh=/qruM4K34GEGf+StPBYxRoP0CWoc0pHOT9PCxjD218c=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=OkWhtJDu7Is84Ym19H+u7zVakV0q6ehat1w8njTrbVRyuNIBSGUKya1FsZKQ2/3eW DCMU89Q5QfAXBmYOgL9v3lr5TIwMqLnG2VP6pt8CK1cbEp5uSEHRqclEBczftWsLyi /BsBBVdWN1g7Evw3haiLSPPXDRuBAlBcpnw8bM+kQFpQwpkQ/SV+zy1cQGHpG6sOqb 4x7vKW0Q5ks7AriJBw3TXWEnENJyMLsXNM7EJHp6uBee46HUdEmkOqS3ak1P2TaxAl KAOeuT3+D2I6zWH5b8nCogW6hTDDU1SzzSEIyGkV3wJ+pmFrPiSFqCT0Udm15rDwGj XYnTmjxADj/XA== X-Mailman-Original-Authentication-Results: smtp2.osuosl.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=OkWhtJDu Subject: Re: [Intel-wired-lan] [PATCH net-next v4 3/9] dpll: core: Add DPLL framework base functions X-BeenThere: intel-wired-lan@osuosl.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel Wired Ethernet Linux Kernel Driver Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jiri Pirko , Bart Van Assche , netdev@vger.kernel.org, intel-wired-lan@lists.osuosl.org, linux-arm-kernel@lists.infradead.org, Jiri Pirko , Jonathan Lemon , Paolo Abeni , linux-clk@vger.kernel.org, Milena Olech Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: intel-wired-lan-bounces@osuosl.org Sender: "Intel-wired-lan" On Tue, 15 Aug 2023 19:20:31 +0100 Vadim Fedorenko wrote: > >> + ret = xa_alloc(&dpll_device_xa, &dpll->id, dpll, xa_limit_16b, > >> + GFP_KERNEL); > > > > Why only 16b and why not _cyclic? > > I cannot image systems with more than 65k of DPLL devices. We don't > store any id's of last used DPLL device, so there is no easy way to > restart the search from the last point. And it's not a hot path to > optimize it. I think this gets used under the xa_lock() so you can just add a static variable inside the function to remember previous allocation. I don't expect >64k devices either, obviously, but what are we saving by not allowing the full u32 range? _______________________________________________ Intel-wired-lan mailing list Intel-wired-lan@osuosl.org https://lists.osuosl.org/mailman/listinfo/intel-wired-lan 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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8DC5EC04A6A for ; Tue, 15 Aug 2023 18:29:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235853AbjHOS3Y (ORCPT ); Tue, 15 Aug 2023 14:29:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38686 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239130AbjHOS3A (ORCPT ); Tue, 15 Aug 2023 14:29:00 -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 30050DF for ; Tue, 15 Aug 2023 11:28:59 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 7F48A63FDD for ; Tue, 15 Aug 2023 18:28:58 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 77F4BC433C8; Tue, 15 Aug 2023 18:28:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1692124137; bh=/qruM4K34GEGf+StPBYxRoP0CWoc0pHOT9PCxjD218c=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=OkWhtJDu7Is84Ym19H+u7zVakV0q6ehat1w8njTrbVRyuNIBSGUKya1FsZKQ2/3eW DCMU89Q5QfAXBmYOgL9v3lr5TIwMqLnG2VP6pt8CK1cbEp5uSEHRqclEBczftWsLyi /BsBBVdWN1g7Evw3haiLSPPXDRuBAlBcpnw8bM+kQFpQwpkQ/SV+zy1cQGHpG6sOqb 4x7vKW0Q5ks7AriJBw3TXWEnENJyMLsXNM7EJHp6uBee46HUdEmkOqS3ak1P2TaxAl KAOeuT3+D2I6zWH5b8nCogW6hTDDU1SzzSEIyGkV3wJ+pmFrPiSFqCT0Udm15rDwGj XYnTmjxADj/XA== Date: Tue, 15 Aug 2023 11:28:56 -0700 From: Jakub Kicinski To: Vadim Fedorenko Cc: Jiri Pirko , Arkadiusz Kubalewski , Jonathan Lemon , Paolo Abeni , Milena Olech , Michal Michalik , linux-arm-kernel@lists.infradead.org, poros@redhat.com, mschmidt@redhat.com, netdev@vger.kernel.org, linux-clk@vger.kernel.org, Bart Van Assche , intel-wired-lan@lists.osuosl.org, Jiri Pirko Subject: Re: [PATCH net-next v4 3/9] dpll: core: Add DPLL framework base functions Message-ID: <20230815112856.1f1bd3ac@kernel.org> In-Reply-To: References: <20230811200340.577359-1-vadim.fedorenko@linux.dev> <20230811200340.577359-4-vadim.fedorenko@linux.dev> <20230814201709.655a24e2@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-clk@vger.kernel.org On Tue, 15 Aug 2023 19:20:31 +0100 Vadim Fedorenko wrote: > >> + ret = xa_alloc(&dpll_device_xa, &dpll->id, dpll, xa_limit_16b, > >> + GFP_KERNEL); > > > > Why only 16b and why not _cyclic? > > I cannot image systems with more than 65k of DPLL devices. We don't > store any id's of last used DPLL device, so there is no easy way to > restart the search from the last point. And it's not a hot path to > optimize it. I think this gets used under the xa_lock() so you can just add a static variable inside the function to remember previous allocation. I don't expect >64k devices either, obviously, but what are we saving by not allowing the full u32 range? 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 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 6700AC04FDF for ; Tue, 15 Aug 2023 18:29:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=iJ90l+ihEAvQZP03GEiunbHKLhgYZW0SmwGxgPcVhhs=; b=eYGuEDGY/Fx350 rl74JZ+dxxjAE1k3wWIPpJ3f5ZgkUuo8RHiMFxVaiQkaL9NZDIrws6O+4ZGWu0GhQA0oz204U/I8I BCrFJFSAGttk40c8ZT9czMLzMWkG1taK5Csvd1kcHrhz5zL53jn60LCBlQBo6AnDzCjvFZHj3hCmo Ee2wahk2Cn0RWHXWj0ivtOIJlXT/XBxHl0ad79bZrH7ykqavma1fMLDKNZamL8qoDuf5mp9VnZFDC yxf/CyXc1jbfWsQN1+7QB+SHpc922Cb5JboD67xcNgrbJjFApdw9y4Ejg7y0pf0zPjKS01JACr03t MzCWJPE5GmbVVf3qLOWg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qVyms-002ADF-0A; Tue, 15 Aug 2023 18:29:02 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qVymp-002ACh-1b for linux-arm-kernel@lists.infradead.org; Tue, 15 Aug 2023 18:29:00 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 7F62864C1E; Tue, 15 Aug 2023 18:28:58 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 77F4BC433C8; Tue, 15 Aug 2023 18:28:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1692124137; bh=/qruM4K34GEGf+StPBYxRoP0CWoc0pHOT9PCxjD218c=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=OkWhtJDu7Is84Ym19H+u7zVakV0q6ehat1w8njTrbVRyuNIBSGUKya1FsZKQ2/3eW DCMU89Q5QfAXBmYOgL9v3lr5TIwMqLnG2VP6pt8CK1cbEp5uSEHRqclEBczftWsLyi /BsBBVdWN1g7Evw3haiLSPPXDRuBAlBcpnw8bM+kQFpQwpkQ/SV+zy1cQGHpG6sOqb 4x7vKW0Q5ks7AriJBw3TXWEnENJyMLsXNM7EJHp6uBee46HUdEmkOqS3ak1P2TaxAl KAOeuT3+D2I6zWH5b8nCogW6hTDDU1SzzSEIyGkV3wJ+pmFrPiSFqCT0Udm15rDwGj XYnTmjxADj/XA== Date: Tue, 15 Aug 2023 11:28:56 -0700 From: Jakub Kicinski To: Vadim Fedorenko Cc: Jiri Pirko , Arkadiusz Kubalewski , Jonathan Lemon , Paolo Abeni , Milena Olech , Michal Michalik , linux-arm-kernel@lists.infradead.org, poros@redhat.com, mschmidt@redhat.com, netdev@vger.kernel.org, linux-clk@vger.kernel.org, Bart Van Assche , intel-wired-lan@lists.osuosl.org, Jiri Pirko Subject: Re: [PATCH net-next v4 3/9] dpll: core: Add DPLL framework base functions Message-ID: <20230815112856.1f1bd3ac@kernel.org> In-Reply-To: References: <20230811200340.577359-1-vadim.fedorenko@linux.dev> <20230811200340.577359-4-vadim.fedorenko@linux.dev> <20230814201709.655a24e2@kernel.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230815_112859_572865_55272F4C X-CRM114-Status: GOOD ( 12.68 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Tue, 15 Aug 2023 19:20:31 +0100 Vadim Fedorenko wrote: > >> + ret = xa_alloc(&dpll_device_xa, &dpll->id, dpll, xa_limit_16b, > >> + GFP_KERNEL); > > > > Why only 16b and why not _cyclic? > > I cannot image systems with more than 65k of DPLL devices. We don't > store any id's of last used DPLL device, so there is no easy way to > restart the search from the last point. And it's not a hot path to > optimize it. I think this gets used under the xa_lock() so you can just add a static variable inside the function to remember previous allocation. I don't expect >64k devices either, obviously, but what are we saving by not allowing the full u32 range? _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel