On Tue, Jul 22, 2008 at 01:11:41AM +0800, Herbert Xu wrote:I haven't had a chance to do the test yet but I've just had an idea of how we can get the best of both worlds. The problem with always directing traffic based on the CPU alone is that processes move around and we don't want to introduce packet reordering because to that. The problem with hashing based on packet headers alone is that it doesn't take CPU affinity into account at all so we may end up with a situation where one thread out of a thread pool (e.g., a web server) has n sockets which are hashed to n different queues. So here's the idea, we determine the tx queue for a flow based on the CPU on which we saw its first packet. Once we have decided on a queue we store that in a dst object (see below). This ensures that all subsequent packets of that flow ends up in the same queue so there is no reordering. It also avoids the problem where traffic genreated by one CPU gets scattered across queues. Of course to make this work we need to restart the flow cache project so that we have somewhere to store this txq assignment. The good thing is that a flow cache would be of benefit for IPsec users too and I hear that there is some interest in doing that in the immediate future. So perhaps we can combine efforts and use it for txq assignment as well. Cheers, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
| Scott Preece | Re: Linux Foundation Technical Advisory Board Elections |
| Luis R. Rodriguez | Re: [Announce] Linux-tiny project revival |
| Andrew Morton | 2.6.23-rc1-mm2 |
| Dave Hansen | [PATCH 02/24] rearrange may_open() to be r/o friendly |
git: | |
| David Miller | [GIT]: Networking |
| David Miller | Re: [BUG] New Kernel Bugs |
| David Miller | Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| Gerrit Renker | [PATCH 27/37] dccp: Integration of dynamic feature activation - part 2 (server side) |
