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 smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (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 AD088C001B0 for ; Tue, 15 Aug 2023 18:38:55 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 47B3F813BE; Tue, 15 Aug 2023 18:38:55 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 47B3F813BE DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org; s=default; t=1692124735; bh=j6TGzseJRfRHVreMpDKHDSvcrM/niax1LDe05KxtRmg=; h=Date:To:References:From:In-Reply-To:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: Cc:From; b=VY9wGjmHmkMoG+4wdHkHU8Vj1imILlZ9QXHUyPQ8I2xgS127ZaOEQ4aCFRjeAYZ6Y VhCGFYSecA+8QPDUcN2iFvCib+8GKwWfR6z8o7MhdhdQ1NXetzscagIjcqGvVjVtS+ dbol4vJ/pfH/LCauemIOWfy3qZCGs2xsb9TOsJM65+UMePbouADTFotFsgcW1Qyjbg 7i9LNzJHN5JnH1UxLROc9MXIZbXO8l44TKO1TH3FGmU7AzPGvndBRTjnyLneJVF8w5 Xu8wqruQd++DOuUq9+meezy4ECwFSYo0tcfJ51vYHng9M0Vbozse3uswbptFOQAD05 KAzFaygB20Cng== X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 9Lh5ty_LBhqB; Tue, 15 Aug 2023 18:38:54 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp1.osuosl.org (Postfix) with ESMTP id 750388137F; Tue, 15 Aug 2023 18:38:54 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 750388137F Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 85E091BF422 for ; Tue, 15 Aug 2023 18:38:52 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 5781A8137F for ; Tue, 15 Aug 2023 18:38:52 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 5781A8137F X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id REkUC605kzVF for ; Tue, 15 Aug 2023 18:38:51 +0000 (UTC) Received: from out-60.mta1.migadu.com (out-60.mta1.migadu.com [IPv6:2001:41d0:203:375::3c]) by smtp1.osuosl.org (Postfix) with ESMTPS id 5A59A81373 for ; Tue, 15 Aug 2023 18:38:51 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 5A59A81373 Message-ID: <39e701b4-0992-2c96-67b3-38c341c77af5@linux.dev> Date: Tue, 15 Aug 2023 19:38:41 +0100 MIME-Version: 1.0 Content-Language: en-US To: Jakub Kicinski References: <20230811200340.577359-1-vadim.fedorenko@linux.dev> <20230811200340.577359-4-vadim.fedorenko@linux.dev> <20230814201709.655a24e2@kernel.org> <20230815112856.1f1bd3ac@kernel.org> X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Vadim Fedorenko In-Reply-To: <20230815112856.1f1bd3ac@kernel.org> X-Migadu-Flow: FLOW_OUT X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1692124729; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=l71H0XchJUj51QCQRpzWl8MiAbxVsza3vleYUTSEqtE=; b=CMD5FNJiviDfxbHNuk8RG4XO8ZCqfxARGsXr9AgrSsoS1mpjwsidIpYQI3xR5mTzGEs0vU r1oAuACK5hLHQ76YInPYdy5/aekG7KQ5oICC1lV13jAW8FomaE/Cf7fmbogyFtNBLy7Qp3 D+G2ERY4tAgLAvqfauVyah4hdUvW7WM= X-Mailman-Original-Authentication-Results: smtp1.osuosl.org; dkim=pass (1024-bit key, unprotected) header.d=linux.dev header.i=@linux.dev header.a=rsa-sha256 header.s=key1 header.b=CMD5FNJi 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-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: intel-wired-lan-bounces@osuosl.org Sender: "Intel-wired-lan" On 15/08/2023 19:28, Jakub Kicinski wrote: > 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? I don't see any benefits for either _cyclic or u32 range, but if you insist I can change it. _______________________________________________ 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 EBAB1C001E0 for ; Tue, 15 Aug 2023 18:39:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230070AbjHOSjH (ORCPT ); Tue, 15 Aug 2023 14:39:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36454 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239239AbjHOSi4 (ORCPT ); Tue, 15 Aug 2023 14:38:56 -0400 Received: from out-25.mta1.migadu.com (out-25.mta1.migadu.com [IPv6:2001:41d0:203:375::19]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4A10B1733 for ; Tue, 15 Aug 2023 11:38:51 -0700 (PDT) Message-ID: <39e701b4-0992-2c96-67b3-38c341c77af5@linux.dev> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1692124729; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=l71H0XchJUj51QCQRpzWl8MiAbxVsza3vleYUTSEqtE=; b=CMD5FNJiviDfxbHNuk8RG4XO8ZCqfxARGsXr9AgrSsoS1mpjwsidIpYQI3xR5mTzGEs0vU r1oAuACK5hLHQ76YInPYdy5/aekG7KQ5oICC1lV13jAW8FomaE/Cf7fmbogyFtNBLy7Qp3 D+G2ERY4tAgLAvqfauVyah4hdUvW7WM= Date: Tue, 15 Aug 2023 19:38:41 +0100 MIME-Version: 1.0 Subject: Re: [PATCH net-next v4 3/9] dpll: core: Add DPLL framework base functions Content-Language: en-US To: Jakub Kicinski 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 References: <20230811200340.577359-1-vadim.fedorenko@linux.dev> <20230811200340.577359-4-vadim.fedorenko@linux.dev> <20230814201709.655a24e2@kernel.org> <20230815112856.1f1bd3ac@kernel.org> X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Vadim Fedorenko In-Reply-To: <20230815112856.1f1bd3ac@kernel.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_OUT Precedence: bulk List-ID: X-Mailing-List: linux-clk@vger.kernel.org On 15/08/2023 19:28, Jakub Kicinski wrote: > 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? I don't see any benefits for either _cyclic or u32 range, but if you insist I can change it. 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 71C1BC001E0 for ; Tue, 15 Aug 2023 18:39:23 +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-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:From:References:Cc:To:Subject: MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=SNQ3vCOeE9pgSby2m9Ox54vtjWldYfmedJ5UCJp7Jws=; b=1Um07E2JEolg1+ DPE/OJM6PhtV0xXfdwuN9IP6PSaYjgiqSOznwA0fxc+/yUQZDRKih7a7UFlyrzF96ZGZXFFO3KkAo 9T2dv3ZgvG0Dtah7G0VnyqgAMplI4Yl14YkxKiVXhtIjQduvufeqeJUlt+QgQWPweKnG42loBJP0E yhGIvuPgF2YK8IyQ+UTmqSsvWyiZo9NQYMuOKrDeSeazdmzoS4jB81juwfP5fbDV87Hj9PYP74pxd /wTgOpZVFon5Hs8vu95AwDb2GOqCN6m/iCIDS8DEp56EFZcmcHK/GtSN8IeLbF6DFdV75LPN4Ia3R 4BcftFuQXdRn1O5gPJyQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qVywT-002BI3-2M; Tue, 15 Aug 2023 18:38:57 +0000 Received: from out-35.mta1.migadu.com ([2001:41d0:203:375::23]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qVywP-002BH5-2c for linux-arm-kernel@lists.infradead.org; Tue, 15 Aug 2023 18:38:56 +0000 Message-ID: <39e701b4-0992-2c96-67b3-38c341c77af5@linux.dev> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1692124729; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=l71H0XchJUj51QCQRpzWl8MiAbxVsza3vleYUTSEqtE=; b=CMD5FNJiviDfxbHNuk8RG4XO8ZCqfxARGsXr9AgrSsoS1mpjwsidIpYQI3xR5mTzGEs0vU r1oAuACK5hLHQ76YInPYdy5/aekG7KQ5oICC1lV13jAW8FomaE/Cf7fmbogyFtNBLy7Qp3 D+G2ERY4tAgLAvqfauVyah4hdUvW7WM= Date: Tue, 15 Aug 2023 19:38:41 +0100 MIME-Version: 1.0 Subject: Re: [PATCH net-next v4 3/9] dpll: core: Add DPLL framework base functions Content-Language: en-US To: Jakub Kicinski 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 References: <20230811200340.577359-1-vadim.fedorenko@linux.dev> <20230811200340.577359-4-vadim.fedorenko@linux.dev> <20230814201709.655a24e2@kernel.org> <20230815112856.1f1bd3ac@kernel.org> X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Vadim Fedorenko In-Reply-To: <20230815112856.1f1bd3ac@kernel.org> X-Migadu-Flow: FLOW_OUT X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230815_113855_209681_68D62844 X-CRM114-Status: GOOD ( 12.54 ) 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-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 15/08/2023 19:28, Jakub Kicinski wrote: > 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? I don't see any benefits for either _cyclic or u32 range, but if you insist I can change it. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel