RE: [PATCH net-next] r8152: divide the tx and rx bottom functions

2019-08-16 Thread Hayes Wang
Eric Dumazet [mailto:eric.duma...@gmail.com] > Sent: Friday, August 16, 2019 5:27 PM [...] > Maybe you would avoid messing with a tasklet (we really try to get rid > of tasklets in general) using two NAPI, one for TX, one for RX. > > Some drivers already use two NAPI, it is fine. > > This might

Re: [PATCH net-next] r8152: divide the tx and rx bottom functions

2019-08-16 Thread Eric Dumazet
On 8/16/19 11:08 AM, Hayes Wang wrote: > Eric Dumazet [mailto:eric.duma...@gmail.com] >> Sent: Friday, August 16, 2019 4:20 PM > [...] >> Which callback ? > > The USB device has two endpoints for Tx and Rx. > If I submit tx or rx URB to the USB host controller, > the relative callback

RE: [PATCH net-next] r8152: divide the tx and rx bottom functions

2019-08-16 Thread Hayes Wang
Eric Dumazet [mailto:eric.duma...@gmail.com] > Sent: Friday, August 16, 2019 4:20 PM [...] > Which callback ? The USB device has two endpoints for Tx and Rx. If I submit tx or rx URB to the USB host controller, the relative callback functions would be called, when they are finished. For rx, it is

Re: [PATCH net-next] r8152: divide the tx and rx bottom functions

2019-08-16 Thread Eric Dumazet
On 8/16/19 10:10 AM, Hayes Wang wrote: > Eric Dumazet [mailto:eric.duma...@gmail.com] >> Sent: Friday, August 16, 2019 2:40 PM > [...] >> tasklet and NAPI are scheduled on the same core (the current >> cpu calling napi_schedule() or tasklet_schedule()) >> >> I would rather not add this dubious

RE: [PATCH net-next] r8152: divide the tx and rx bottom functions

2019-08-16 Thread Hayes Wang
Eric Dumazet [mailto:eric.duma...@gmail.com] > Sent: Friday, August 16, 2019 2:40 PM [...] > tasklet and NAPI are scheduled on the same core (the current > cpu calling napi_schedule() or tasklet_schedule()) > > I would rather not add this dubious tasklet, and instead try to understand > what is

Re: [PATCH net-next] r8152: divide the tx and rx bottom functions

2019-08-16 Thread Eric Dumazet
On 8/14/19 10:30 AM, Hayes Wang wrote: > Move the tx bottom function from NAPI to a new tasklet. Then, for > multi-cores, the bottom functions of tx and rx may be run at same > time with different cores. This is used to improve performance. > > tasklet and NAPI are scheduled on the same

Re: [PATCH net-next] r8152: divide the tx and rx bottom functions

2019-08-15 Thread David Miller
From: Hayes Wang Date: Fri, 16 Aug 2019 02:59:16 + > David Miller [mailto:da...@davemloft.net] >> Sent: Friday, August 16, 2019 4:59 AM > [...] >> Theoretically, yes. >> >> But do you have actual performance numbers showing this to be worth >> the change? >> >> Always provide performance

RE: [PATCH net-next] r8152: divide the tx and rx bottom functions

2019-08-15 Thread Hayes Wang
David Miller [mailto:da...@davemloft.net] > Sent: Friday, August 16, 2019 4:59 AM [...] > Theoretically, yes. > > But do you have actual performance numbers showing this to be worth > the change? > > Always provide performance numbers with changes that are supposed to > improve performance. On

Re: [PATCH net-next] r8152: divide the tx and rx bottom functions

2019-08-15 Thread David Miller
From: Hayes Wang Date: Wed, 14 Aug 2019 16:30:17 +0800 > Move the tx bottom function from NAPI to a new tasklet. Then, for > multi-cores, the bottom functions of tx and rx may be run at same > time with different cores. This is used to improve performance. > > Signed-off-by: Hayes Wang

[PATCH net-next] r8152: divide the tx and rx bottom functions

2019-08-14 Thread Hayes Wang
Move the tx bottom function from NAPI to a new tasklet. Then, for multi-cores, the bottom functions of tx and rx may be run at same time with different cores. This is used to improve performance. Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 39 ++-