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 85C2DA0C56; Mon, 23 Aug 2021 11:40:30 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6097440687; Mon, 23 Aug 2021 11:40:30 +0200 (CEST) Received: from mail-wr1-f54.google.com (mail-wr1-f54.google.com [209.85.221.54]) by mails.dpdk.org (Postfix) with ESMTP id D0FD84014D for ; Mon, 23 Aug 2021 11:40:29 +0200 (CEST) Received: by mail-wr1-f54.google.com with SMTP id z4so9702700wrr.6 for ; Mon, 23 Aug 2021 02:40:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=dWnzmB3KC5FsqDLSj0CHHyDKghKJlL0JJfbn0bZ6xP0=; b=glJf726n+EM+yLbonCLCyVAXfI0l+HjmKYqZnJ7opR3xQ9r8lJkSyyCSGsNCDV1N/W p1LtFI7GPjvWbVYbG36jiNTVg0SexB83sYw8BCST/DB/CvJ4VqXogTDzFOkpKeSV0gu2 QbbdOSzZ1qC4I6VdKUF0d0bLyiP6TZf7kWZf8oZdYTYpbob5ceLEeL2B4GDgXkL0STzH ISZvp3gZqHB7aZcl7ct0m8XAEU/3nhXe9U802eB0Z+okFM0JhLBA4+VmH48SG6k0M9iC PVoCy4hQA2pPqrDWGKNDcERnsXuHIsmmovhqgSGi7Wt62hWcXenaXpjiOtDF7umdQ6jx enng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=dWnzmB3KC5FsqDLSj0CHHyDKghKJlL0JJfbn0bZ6xP0=; b=URaOF63hsPbDd4z5YSoVQ5s6Xbe89fQEDJG7MxdSYnyS68BJ0ZVuuw8BNofe8rWf6q 1w3pgw3yiN0UAUFEfnsjVz2iKZoEs9bwW2MTjaM94vRWMmj/uTHllj6Hqnwu/T6jkTn6 RzdLkqdxyIgEKXVV9pry2NIMNZ/MgNiAX1gP4Bs/AFaTm+U03Bxjr64/643Phe4ye55/ iGk/wsSQSdTKXaq+H8ydK5xZ9LPEYdiEXds0dYKqXQz7UyahAgh2JlfdHmyuDMm8h1/s wn/EaOscrl5iilTIaOvc723+pqIH/3pccVWV17vuUXFhJLt0rJYnISgP50z94ffeipG2 pPUw== X-Gm-Message-State: AOAM531wfK20VzxssIz9dVW+zmzpIOixXmBCWFAvGJWwiMMfIMvpW64r xF6x6HwFefXlJkWLZsg7SlHMsg== X-Google-Smtp-Source: ABdhPJxfHziTeoXN/4e+Gtunvb1h/W8oDqogmRfCyMmWZ4OhuVtrDTEz8cdkXEX49HxEdPxF8MpZ1Q== X-Received: by 2002:a5d:4a8d:: with SMTP id o13mr12673251wrq.156.1629711629599; Mon, 23 Aug 2021 02:40:29 -0700 (PDT) Received: from 6wind.com ([2a01:e0a:5ac:6460:c065:401d:87eb:9b25]) by smtp.gmail.com with ESMTPSA id l7sm12594817wmj.9.2021.08.23.02.40.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Aug 2021 02:40:29 -0700 (PDT) Date: Mon, 23 Aug 2021 11:40:28 +0200 From: Olivier Matz To: Honnappa Nagarahalli Cc: "thomas@monjalon.net" , "dev@dpdk.org" , "lucp.at.work@gmail.com" , "david.marchand@redhat.com" , Ruifeng Wang , nd Message-ID: References: <20210730214453.19975-1-honnappa.nagarahalli@arm.com> <7793415.AuWXLK4XGA@thomas> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Subject: Re: [dpdk-dev] [PATCH] doc: abstract the behaviour 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" Hi Honnappa, Back from holidays, sorry for the late answer. On Mon, Aug 09, 2021 at 01:18:42PM +0000, Honnappa Nagarahalli wrote: > > > > > 30/07/2021 23:44, Honnappa Nagarahalli: > > > The current expected behaviour of the function rte_ctrl_thread_create > > > is rigid which makes the implementation of the function complex. > > > Make the expected behaviour abstract to allow for simplified > > > implementation. > > > > > > With this change, the calls to pthread_setaffinity_np can be moved to > > > the control thread. This will avoid the use of pthread_barrier_wait > > > and simplify the synchronization mechanism between > > > rte_ctrl_thread_create and the calling thread. > > > > > > Signed-off-by: Honnappa Nagarahalli > > > --- > > > +* eal: The expected behaviour of the function > > > +``rte_ctrl_thread_create`` > > > + abstracted to allow for simplified implementation. The new > > > +behaviour is > > > + as follows: > > > + Creates a control thread with the given name. The affinity of the > > > +new > > > + thread is based on the CPU affinity retrieved at the time > > > +rte_eal_init() > > > + was called, the dataplane and service lcores are then excluded. > > > > I don't understand what is different of the current API: > > * Wrapper to pthread_create(), pthread_setname_np() and > > * pthread_setaffinity_np(). The affinity of the new thread is based > > * on the CPU affinity retrieved at the time rte_eal_init() was called, > > * the dataplane and service lcores are then excluded. > My concern is for the word "Wrapper". I am not sure how much we are bound by that to keep the code as a "wrapper". > The new patch does not change the high level behavior. I am ok to remove the word "wrapper" from the description, and I agree it can be better described without quoting the pthread_* functions. > Are you saying you are ok with the patch without the deprecation notice? I don't think it requires a deprecation notice if the API and ABI is left unchanged. To be honnest, I find a bit hard to understand what is really changed by reading the deprecation notice: > +* eal: The expected behaviour of the function ``rte_ctrl_thread_create`` > + abstracted to allow for simplified implementation. The new behaviour is > + as follows: > + Creates a control thread with the given name. The affinity of the new > + thread is based on the CPU affinity retrieved at the time rte_eal_init() > + was called, the dataplane and service lcores are then excluded. I'll send my comments to your patch: http://patches.dpdk.org/project/dpdk/patch/20210802051652.3611-1-honnappa.nagarahalli@arm.com/ Thanks, Olivier