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 X-Spam-Level: X-Spam-Status: No, score=-6.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A803BC432BE for ; Wed, 1 Sep 2021 20:04:23 +0000 (UTC) Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by mail.kernel.org (Postfix) with ESMTP id 25E78610CD for ; Wed, 1 Sep 2021 20:04:23 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 25E78610CD Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=ericsson.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=dpdk.org Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2E31B40DDE; Wed, 1 Sep 2021 22:04:22 +0200 (CEST) Received: from mail.lysator.liu.se (mail.lysator.liu.se [130.236.254.3]) by mails.dpdk.org (Postfix) with ESMTP id 44E3740687 for ; Wed, 1 Sep 2021 22:04:21 +0200 (CEST) Received: from mail.lysator.liu.se (localhost [127.0.0.1]) by mail.lysator.liu.se (Postfix) with ESMTP id E124740005 for ; Wed, 1 Sep 2021 22:04:20 +0200 (CEST) Received: by mail.lysator.liu.se (Postfix, from userid 1004) id CE5E740013; Wed, 1 Sep 2021 22:04:20 +0200 (CEST) Received: from [192.168.1.59] (h-62-63-215-114.A163.priv.bahnhof.se [62.63.215.114]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.lysator.liu.se (Postfix) with ESMTPSA id C374B40005; Wed, 1 Sep 2021 22:04:06 +0200 (CEST) To: Honnappa Nagarahalli , Stephen Hemminger Cc: Olivier Matz , "dev@dpdk.org" , "lucp.at.work@gmail.com" , "david.marchand@redhat.com" , "thomas@monjalon.net" , Ruifeng Wang , nd References: <20210730213709.19400-1-honnappa.nagarahalli@arm.com> <20210802051652.3611-1-honnappa.nagarahalli@arm.com> <20210824143058.45b31118@hermes.local> From: =?UTF-8?Q?Mattias_R=c3=b6nnblom?= Message-ID: Date: Wed, 1 Sep 2021 22:04:06 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV using ClamSMTP Subject: Re: [dpdk-dev] [RFC v2] eal: simplify the implementation of rte_ctrl_thread_create 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 Sender: "dev" On 2021-08-25 17:31, Honnappa Nagarahalli wrote: > > >> >> On 2021-08-24 23:30, Stephen Hemminger wrote: >>> On Tue, 24 Aug 2021 20:03:03 +0000 >>> Honnappa Nagarahalli wrote: >>> >>>>> One difference between this implementation and the previous one is >>>>> this busy loop. rte_pause() relaxes the cpu, but will not make the >>>>> calling thread to sleep and wait for the sync event. So here we can >>>>> spin a quite long time until the other thread is scheduled by the OS. >>>> Yes, this is a difference. We could add a microsleep to allow for the OS to >> un-schedule the current thread. >>> >>> Why not use sched_yield() here? >>> >> >> The man page is not exactly encouraging the use sched_yield on CFS. > Sorry, what is CFS? > There are already several uses of sched_yield in the code. > CFS is the Linux best-effort scheduler and default scheduling policy, and likely used by most DPDK applications.