From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752606AbcELU6l (ORCPT ); Thu, 12 May 2016 16:58:41 -0400 Received: from mx1.redhat.com ([209.132.183.28]:34107 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751216AbcELU6k (ORCPT ); Thu, 12 May 2016 16:58:40 -0400 Message-ID: <1463086714.5281.8.camel@redhat.com> Subject: Re: [RFC PATCH 0/2] net: threadable napi poll loop From: Paolo Abeni To: Eric Dumazet Cc: Peter Zijlstra , Hannes Frederic Sowa , Eric Dumazet , netdev , "David S. Miller" , Jiri Pirko , Daniel Borkmann , Alexei Starovoitov , Alexander Duyck , Tom Herbert , Ingo Molnar , Rik van Riel , LKML , "Paul E. McKenney" Date: Thu, 12 May 2016 22:58:34 +0200 In-Reply-To: <1463086179.23934.162.camel@edumazet-glaptop3.roam.corp.google.com> 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> <20160511065527.GD3193@twins.programming.kicks-ass.net> <1463003804.23934.154.camel@edumazet-glaptop3.roam.corp.google.com> <1463083620.5281.1.camel@redhat.com> <1463086179.23934.162.camel@edumazet-glaptop3.roam.corp.google.com> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Thu, 12 May 2016 20:58:39 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 2016-05-12 at 13:49 -0700, Eric Dumazet wrote: > On Thu, 2016-05-12 at 22:07 +0200, Paolo Abeni wrote: > > > > > static inline bool ksoftirqd_running(void) > > > > { > > > > return __this_cpu_read(ksoftirqd)->state == TASK_RUNNING; > > > > here something like: > > > > struct task_struct *tsk = __this_cpu_read(ksoftirqd); > > return tsk && (tsk->state == TASK_RUNNING); > > > > is needed since __this_cpu_read(ksoftirqd) can be NULL on boot. > > Indeed I've seen this but only when backporting to an older linux kernel > this morning. > > Have you got this with current linux kernel ? Yes, on net-next updated to commit c66b2581123cd1527b6a084f39e9271cb02673b7 Author: Sergei Shtylyov Date: Sat May 7 14:09:01 2016 -0700 sh_eth: reuse sh_eth_chip_reset() Cheers, Paolo