From mboxrd@z Thu Jan 1 00:00:00 1970 From: Luiz Capitulino Subject: Re: [PATCH] testpmd: add nanosleep in main loop Date: Fri, 10 Nov 2017 08:51:02 -0500 Message-ID: <20171110085102.4b86397a@redhat.com> References: <20171110060210.GA23340@amt.cnet> <20171110091219.GE24849@6wind.com> <2601191342CEEE43887BDE71AB9772585FABBC64@irsmsx105.ger.corp.intel.com> <20171110111451.GA9164@bricha3-MOBL3.ger.corp.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: Daniel Bristot de Oliveira , "Ananyev, Konstantin" , Adrien Mazarguil , Marcelo Tosatti , "dev@dpdk.org" To: Bruce Richardson Return-path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id 8028D1B672 for ; Fri, 10 Nov 2017 14:51:07 +0100 (CET) In-Reply-To: <20171110111451.GA9164@bricha3-MOBL3.ger.corp.intel.com> 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 Fri, 10 Nov 2017 11:14:51 +0000 Bruce Richardson wrote: > On Fri, Nov 10, 2017 at 11:42:56AM +0100, Daniel Bristot de Oliveira wrote: > > > > > > On 11/10/2017 11:14 AM, Ananyev, Konstantin wrote: > > > Agree with Adrian here - the patch doesn't fix the problem in any case, > > > > I would agree with you if it were possible to assume one can fully > > isolate a CPU on Linux... but it is not... > > > > This: > > https://lwn.net/Articles/659490/ > > > > is still an open issue, and the reason why it is an open issue is the > > kernel threads that need to run on every CPU, mainly when using the > > PREEMPT_RT, which turns almost everything on threads. > > > > > while introducing an unnecessary slowdown in testpmd iofwd mode. > > > Please think up some other approach. > > > > The other approach is to increase the priority of all other threads that > > run on the isolate CPU. But that is not a good idea at all, as the other > > threads might preempt the busy-loop thread at the worst possible moment. > > > > Using the knowledge of the thread about when it is the best time to give > > a chance for other threads to run would be a smarter decision. > > > I don't like having this in the main loop either, and to echo others I > wouldn't have thought that testpmd was actually used as anything other > than a testing app. That's why we're patching it. We want to be aware of the implications. If it's not good for testpmd, it may not be good for production either.