Re: [net-next PATCH v2 5/8] net: Track start of busy loop instead of when it should end

2017-03-24 Thread Alexander Duyck
On Fri, Mar 24, 2017 at 4:16 AM, Eric Dumazet wrote: > On Thu, 2017-03-23 at 22:55 -0700, Alexander Duyck wrote: > >> Right, but time_after assumes roll over. When you are using a time >> value based off of local_clock() >> 10, you don't ever roll over when >> you do

Re: [net-next PATCH v2 5/8] net: Track start of busy loop instead of when it should end

2017-03-24 Thread Eric Dumazet
On Thu, 2017-03-23 at 22:55 -0700, Alexander Duyck wrote: > Right, but time_after assumes roll over. When you are using a time > value based off of local_clock() >> 10, you don't ever roll over when > you do addition. Just the clock rolls over. At least on 64 bit > systems. > > So if local

Re: [net-next PATCH v2 5/8] net: Track start of busy loop instead of when it should end

2017-03-23 Thread Alexander Duyck
On Thu, Mar 23, 2017 at 9:27 PM, Eric Dumazet wrote: > On Thu, 2017-03-23 at 20:42 -0700, Alexander Duyck wrote: >> On Thu, Mar 23, 2017 at 6:24 PM, Eric Dumazet wrote: >> > On Thu, 2017-03-23 at 14:37 -0700, Alexander Duyck wrote: >> >> From:

Re: [net-next PATCH v2 5/8] net: Track start of busy loop instead of when it should end

2017-03-23 Thread Eric Dumazet
On Thu, 2017-03-23 at 21:27 -0700, Eric Dumazet wrote: > If you believe min/max values should be added to the sysctls, because we > do not trust root anymore, please send patches only addressing that. extern unsigned int sysctl_net_busy_read; extern unsigned int sysctl_net_busy_poll; ...

Re: [net-next PATCH v2 5/8] net: Track start of busy loop instead of when it should end

2017-03-23 Thread Eric Dumazet
On Thu, 2017-03-23 at 20:42 -0700, Alexander Duyck wrote: > On Thu, Mar 23, 2017 at 6:24 PM, Eric Dumazet wrote: > > On Thu, 2017-03-23 at 14:37 -0700, Alexander Duyck wrote: > >> From: Alexander Duyck > >> > > > >> The last bit I changed is

Re: [net-next PATCH v2 5/8] net: Track start of busy loop instead of when it should end

2017-03-23 Thread Alexander Duyck
On Thu, Mar 23, 2017 at 6:24 PM, Eric Dumazet wrote: > On Thu, 2017-03-23 at 14:37 -0700, Alexander Duyck wrote: >> From: Alexander Duyck >> > >> The last bit I changed is to move from using a shift by 10 to just using >> NSEC_PER_USEC and

Re: [net-next PATCH v2 5/8] net: Track start of busy loop instead of when it should end

2017-03-23 Thread Eric Dumazet
On Thu, 2017-03-23 at 14:37 -0700, Alexander Duyck wrote: > From: Alexander Duyck > > The last bit I changed is to move from using a shift by 10 to just using > NSEC_PER_USEC and using multiplication for any run time calculations and > division for a few compile

[net-next PATCH v2 5/8] net: Track start of busy loop instead of when it should end

2017-03-23 Thread Alexander Duyck
From: Alexander Duyck This patch flips the logic we were using to determine if the busy polling has timed out. The main motivation for this is that we will need to support two different possible timeout values in the future and by recording the start time rather