From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 011F0A0547; Thu, 26 May 2022 22:26:58 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A08D840E50; Thu, 26 May 2022 22:26:58 +0200 (CEST) Received: from mail-pl1-f180.google.com (mail-pl1-f180.google.com [209.85.214.180]) by mails.dpdk.org (Postfix) with ESMTP id 5021C40DF7 for ; Thu, 26 May 2022 22:26:57 +0200 (CEST) Received: by mail-pl1-f180.google.com with SMTP id w3so2356147plp.13 for ; Thu, 26 May 2022 13:26:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=D3sLhFrxjeCTAFV0K2T2tcTe4SmkdD5lJWKloccZ/cA=; b=UnMToPgFm8k182OYqYQtIFZkkL9wuLGuz1mWIu5nrNjP8hHJEWOJZgREJ/BVt68DnK tl/yj13m0z4Vb9pyw8LnYsVLzN6EupYnbRk8NkEviYWrBt4Y5Ral2uJ7UiI8gOAu04Em RfGgWOP2lOpRSrTFcbpWh07rrCLaWS6hQvZApzd6vChrujUQ7fXVL9HCo5+otasLIPRN G/ZtKABDcDNU6Vi9i2kJ6IeWXYK27p0YW6e4MABs1+UOAOybgIhRalKZXmy9DfDwo16v pZ3VdYdZyY7cDlBUJN1XnItvuXazexO9odc1cNDynJtVqSSrIhxPXeNyYgpEM2CYMsGQ 8mIA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=D3sLhFrxjeCTAFV0K2T2tcTe4SmkdD5lJWKloccZ/cA=; b=x08XkwrwaoZo4BSrY6v8tb2PeldV5Q/jtSEoqVElBHI+jQvi94P7qrOvnJy5/tkqG/ gN6NEYMr/I2kSh51FI7mk9wrr+N7UcrQmry41dyvD0N9Vwu1vNTnXyAgCNHFL41EhT07 YlZupy9Li1gvono0ncnew9Jd5rutjsP4ZRVzbTVZHHlnesvk+iP035Z8EhPB4RN3Avdx gSBoD7Hoq6z83rVX06exQgxTkudzfVQ5OQqp8IAahSkwI2f6RJG2u3vV9Wyi96NJTvZ2 gJpxlP+r7x5Lg3Zgqc64bO25IzC1q3gDfIEJN/ZFwsNwo+lhSKJgdtMfyqY9Rsmp+n9J EeMw== X-Gm-Message-State: AOAM533AEoBK0zSh7ZEX91lrwU8X93CPsKTd+RasE5c3vsHb2fJz/jfU eYya6mfRyudH9xUS1t6ind9maQ44VVoYxA== X-Google-Smtp-Source: ABdhPJwV/WK8D5PGp/RqkdIrSL9/7dvNtlPEJsms1IwrClB8Ok53go7g87xDIvfCLUtOIkG6cu4i4Q== X-Received: by 2002:a17:90b:1b42:b0:1df:f6bb:aa2b with SMTP id nv2-20020a17090b1b4200b001dff6bbaa2bmr4457872pjb.99.1653596816062; Thu, 26 May 2022 13:26:56 -0700 (PDT) Received: from hermes.local (204-195-112-199.wavecable.com. [204.195.112.199]) by smtp.gmail.com with ESMTPSA id c20-20020a170902b69400b0015e8d4eb1e5sm2025316pls.47.2022.05.26.13.26.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 May 2022 13:26:55 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , =?UTF-8?q?Morten=20Br=C3=B8rup?= Subject: [PATCH v5 0/3] introduce random floating point function Date: Thu, 26 May 2022 13:26:50 -0700 Message-Id: <20220526202653.99796-1-stephen@networkplumber.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220524184623.480646-1-stephen@networkplumber.org> References: <20220524184623.480646-1-stephen@networkplumber.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Introduce a new random number function to get a floating point value. Then use it to fix PIE scheduler. v5 - use divide method (similar to FreeBSD) it takes same number of cycles (after optimization) and works on all platforms. Stephen Hemminger (3): random: add rte_drand() function rte_pie: remove unnecessary floating point rte_pie: fix incorrect floating point math Stephen Hemminger (3): random: add rte_drand() function rte_pie: remove unnecessary floating point rte_pie: fix incorrect floating point math app/test/test_rand_perf.c | 7 +++++++ doc/guides/rel_notes/release_22_07.rst | 5 +++++ lib/eal/common/rte_random.c | 19 +++++++++++++++++++ lib/eal/include/rte_random.h | 18 ++++++++++++++++++ lib/eal/version.map | 1 + lib/sched/rte_pie.h | 7 ++----- 6 files changed, 52 insertions(+), 5 deletions(-) Series-Acked-by: Morten Brørup -- 2.35.1