On Wed, 2005-07-12 at 21:59 +0100, Eric Dumazet wrote: > jamal a écrit :
> > > > Eric Dumazet <[EMAIL PROTECTED]> theorized there may be some value in > > copybreak if you are host bound. I only seen it as an unnecessary pain > > really. > > > > In my case, my production servers are usually ram bounded, not cpu bounded. > Without copybreak enables nic drivers, they crash in few minutes. > Ok, so this is different. > > Humor me, try to replace the code that does copybreak with a while loop > > that counts down from 20 -> 0. > > And see if you notice any changes for host bound traffic. > > What are you trying to learn from these experiments that we dont already know > ? > I am just trying to show that changing the driver code with current prefetch code will result in non-deterministic behavior. Removing the copybreak showed where things got skewed. So nothing perse against copybreak - more related to prefetch. > You can probably tune your kernel without prefetch stuff, adding some random > delays in some spots : For example, you might handle less interrupts if you > slowdown the interrupt handler and let the NIC feed you more packets at each > interrupt : Less system overhead, less atomic ops... and so on. > > Another example of what can happens on SMP : > > Say you have nice coalescing NIC parameters so that you receive about 10 > packets each interrupt. As soon the first packet is processed, another CPU > might fire an user thread that might try to emit an answer packet while the > first CPU still holds a lock in the NIC interrupt handler. > > So adding a delay in the user thread might improve performance too, because > it > might reduce contention. > > And on the contrary, if you optimize an application, using a better compiler > for example, you might get worse performance : Should we stop trying to have > better compilers ? > So i wasnt trying to disprove any of the above (some interesting thoughts there). We got a challenge to prove that prefetching - as was in the e1000 patch - was a bad idea; thats all. cheers, jamal - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html