From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752456AbcEKWrc (ORCPT ); Wed, 11 May 2016 18:47:32 -0400 Received: from out5-smtp.messagingengine.com ([66.111.4.29]:52059 "EHLO out5-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751769AbcEKWra (ORCPT ); Wed, 11 May 2016 18:47:30 -0400 X-Sasl-enc: GL0BgIUsBhVPztupYTPIjGlClyuKHCpfGqrTaf4Qalc+ 1463006849 Subject: Re: [RFC PATCH 0/2] net: threadable napi poll loop To: Eric Dumazet , Paolo Abeni References: <1462890590.23934.68.camel@edumazet-glaptop3.roam.corp.google.com> <90f3db8c-c30c-b204-576a-454939ac93ce@stressinduktion.org> <94f323a9-515e-4d75-cac8-ef0214f0499e@stressinduktion.org> <1462920697.23934.113.camel@edumazet-glaptop3.roam.corp.google.com> <1462960104.4444.37.camel@redhat.com> <1462972112.23934.139.camel@edumazet-glaptop3.roam.corp.google.com> <1462977516.4444.73.camel@redhat.com> Cc: Eric Dumazet , netdev , "David S. Miller" , Jiri Pirko , Daniel Borkmann , Alexei Starovoitov , Alexander Duyck , Tom Herbert , Peter Zijlstra , Ingo Molnar , Rik van Riel , LKML From: Hannes Frederic Sowa X-Enigmail-Draft-Status: N1110 Message-ID: Date: Thu, 12 May 2016 00:47:29 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11.05.2016 16:45, Eric Dumazet wrote: > On Wed, May 11, 2016 at 7:38 AM, Paolo Abeni wrote: > >> Uh, we have likely the same issue in the net_rx_action() function, which >> also execute with bh disabled and check for jiffies changes even on >> single core hosts ?!? > > That is why we have a loop break after netdev_budget=300 packets. > And a sysctl to eventually tune this. > > Same issue for softirq handler, look at commit > 34376a50fb1fa095b9d0636fa41ed2e73125f214 > > Your questions about this central piece of networking code are worrying. > >> >> Aren't jiffies updated by the timer interrupt ? and thous even with >> bh_disabled ?!? > > Exactly my point : jiffie wont be updated in your code, since you block BH. To be fair, jiffies get updated in hardirq and not softirq context. The cond_resched_softirq not looking for pending softirqs is indeed a problem. Thanks, Hannes