Re: [PATCH net 00/15] netpoll: avoid capture effects for NAPI drivers

2018-09-25 Thread Song Liu
> On Sep 24, 2018, at 8:30 AM, Eric Dumazet wrote: > > On Sun, Sep 23, 2018 at 10:04 PM David Miller wrote: >> >> Series applied, thanks Eric. > > Thanks David. > > Song, would you please this additional patch ? > > diff --git a/net/core/netpoll.c b/net/core/netpoll.c > index > 3219a2932

Re: [PATCH net 00/15] netpoll: avoid capture effects for NAPI drivers

2018-09-25 Thread Michael Chan
On Tue, Sep 25, 2018 at 11:25 AM Song Liu wrote: > > Hi Michael, > > This may not be related. But I am looking at this: > > bnxt_poll_work() { > > while (1) { > > if (rx_pkts == budget) > return > } > } > > With budget o

Re: [PATCH net 00/15] netpoll: avoid capture effects for NAPI drivers

2018-09-25 Thread Song Liu
> On Sep 25, 2018, at 7:43 AM, Michael Chan wrote: > > On Tue, Sep 25, 2018 at 7:20 AM Eric Dumazet wrote: >> >> On Tue, Sep 25, 2018 at 7:02 AM Michael Chan >> wrote: >>> >>> On Mon, Sep 24, 2018 at 2:18 PM Song Liu wrote: > On Sep 24, 2018, at 2:05 PM, Eric Dumaze

Re: [PATCH net 00/15] netpoll: avoid capture effects for NAPI drivers

2018-09-25 Thread Michael Chan
On Tue, Sep 25, 2018 at 7:20 AM Eric Dumazet wrote: > > On Tue, Sep 25, 2018 at 7:02 AM Michael Chan > wrote: > > > > On Mon, Sep 24, 2018 at 2:18 PM Song Liu wrote: > > > > > > > > > > > > > On Sep 24, 2018, at 2:05 PM, Eric Dumazet wrote: > > > > > > > >> > > > >> Interesting, maybe a bnxt s

Re: [PATCH net 00/15] netpoll: avoid capture effects for NAPI drivers

2018-09-25 Thread Eric Dumazet
On Tue, Sep 25, 2018 at 7:02 AM Michael Chan wrote: > > On Mon, Sep 24, 2018 at 2:18 PM Song Liu wrote: > > > > > > > > > On Sep 24, 2018, at 2:05 PM, Eric Dumazet wrote: > > > > > >> > > >> Interesting, maybe a bnxt specific issue. > > >> > > >> It seems their model is to process TX/RX notifica

Re: [PATCH net 00/15] netpoll: avoid capture effects for NAPI drivers

2018-09-25 Thread Michael Chan
On Mon, Sep 24, 2018 at 2:18 PM Song Liu wrote: > > > > > On Sep 24, 2018, at 2:05 PM, Eric Dumazet wrote: > > > >> > >> Interesting, maybe a bnxt specific issue. > >> > >> It seems their model is to process TX/RX notification in the same queue, > >> they throw away RX events if budget == 0 > >>

Re: [PATCH net 00/15] netpoll: avoid capture effects for NAPI drivers

2018-09-24 Thread Song Liu
> On Sep 24, 2018, at 2:05 PM, Eric Dumazet wrote: > >> >> Interesting, maybe a bnxt specific issue. >> >> It seems their model is to process TX/RX notification in the same queue, >> they throw away RX events if budget == 0 >> >> It means commit e7b9569102995ebc26821789628eef45bd9840d8 is w

Re: [PATCH net 00/15] netpoll: avoid capture effects for NAPI drivers

2018-09-24 Thread Eric Dumazet
> > Interesting, maybe a bnxt specific issue. > > It seems their model is to process TX/RX notification in the same queue, > they throw away RX events if budget == 0 > > It means commit e7b9569102995ebc26821789628eef45bd9840d8 is wrong and > must be reverted. > > Otherwise, we have a possibility of

Re: [PATCH net 00/15] netpoll: avoid capture effects for NAPI drivers

2018-09-24 Thread Eric Dumazet
On Mon, Sep 24, 2018 at 1:00 PM Song Liu wrote: > > > > > On Sep 24, 2018, at 12:41 PM, Eric Dumazet wrote: > > > > On Mon, Sep 24, 2018 at 12:31 PM Song Liu wrote: > > > >> This triggers dev_watchdog() on a simple netperf TCP_RR on bnxt (I haven't > >> tested other drivers yet). > >> > >> I gue

Re: [PATCH net 00/15] netpoll: avoid capture effects for NAPI drivers

2018-09-24 Thread Song Liu
> On Sep 24, 2018, at 12:41 PM, Eric Dumazet wrote: > > On Mon, Sep 24, 2018 at 12:31 PM Song Liu wrote: > >> This triggers dev_watchdog() on a simple netperf TCP_RR on bnxt (I haven't >> tested other drivers yet). >> >> I guess this is because NAPI_STATE_SCHED is set when poll_one_napi() c

Re: [PATCH net 00/15] netpoll: avoid capture effects for NAPI drivers

2018-09-24 Thread Eric Dumazet
On Mon, Sep 24, 2018 at 12:31 PM Song Liu wrote: > This triggers dev_watchdog() on a simple netperf TCP_RR on bnxt (I haven't > tested other drivers yet). > > I guess this is because NAPI_STATE_SCHED is set when poll_one_napi() calls > napi->poll(). And then cleared by napi->poll(). Which part o

Re: [PATCH net 00/15] netpoll: avoid capture effects for NAPI drivers

2018-09-24 Thread Song Liu
> On Sep 24, 2018, at 8:30 AM, Eric Dumazet wrote: > > On Sun, Sep 23, 2018 at 10:04 PM David Miller wrote: >> >> Series applied, thanks Eric. > > Thanks David. > > Song, would you please this additional patch ? > > diff --git a/net/core/netpoll.c b/net/core/netpoll.c > index > 3219a2932

Re: [PATCH net 00/15] netpoll: avoid capture effects for NAPI drivers

2018-09-24 Thread Eric Dumazet
On Sun, Sep 23, 2018 at 10:04 PM David Miller wrote: > > Series applied, thanks Eric. Thanks David. Song, would you please this additional patch ? diff --git a/net/core/netpoll.c b/net/core/netpoll.c index 3219a2932463096566ce8ff336ecdf699422dd65..2ad45babe621b2c979ad5496b7df4342e4efbaa6 10064

Re: [PATCH net 00/15] netpoll: avoid capture effects for NAPI drivers

2018-09-23 Thread David Miller
From: Eric Dumazet Date: Fri, 21 Sep 2018 15:27:37 -0700 > As diagnosed by Song Liu, ndo_poll_controller() can > be very dangerous on loaded hosts, since the cpu > calling ndo_poll_controller() might steal all NAPI > contexts (for all RX/TX queues of the NIC). > > This capture, showing one ksoft

Re: [PATCH net 00/15] netpoll: avoid capture effects for NAPI drivers

2018-09-23 Thread Eric Dumazet
On Sun, Sep 23, 2018 at 12:29 PM David Miller wrote: > > From: Eric Dumazet > Date: Fri, 21 Sep 2018 15:27:37 -0700 > > > As diagnosed by Song Liu, ndo_poll_controller() can > > be very dangerous on loaded hosts, since the cpu > > calling ndo_poll_controller() might steal all NAPI > > contexts (f

Re: [PATCH net 00/15] netpoll: avoid capture effects for NAPI drivers

2018-09-23 Thread David Miller
From: Eric Dumazet Date: Fri, 21 Sep 2018 15:27:37 -0700 > As diagnosed by Song Liu, ndo_poll_controller() can > be very dangerous on loaded hosts, since the cpu > calling ndo_poll_controller() might steal all NAPI > contexts (for all RX/TX queues of the NIC). > > This capture, showing one ksoft

[PATCH net 00/15] netpoll: avoid capture effects for NAPI drivers

2018-09-21 Thread Eric Dumazet
As diagnosed by Song Liu, ndo_poll_controller() can be very dangerous on loaded hosts, since the cpu calling ndo_poll_controller() might steal all NAPI contexts (for all RX/TX queues of the NIC). This capture, showing one ksoftirqd eating all cycles can last for unlimited amount of time, since one