Remove nearly all MP contention from ip_randomid()
commit93992dc9adff19ba1fc7dbc18499aa0f78aba2d5
authorMatthew Dillon <dillon@apollo.backplane.com>
Tue, 8 Sep 2009 02:21:34 +0000 (7 19:21 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Tue, 8 Sep 2009 02:21:34 +0000 (7 19:21 -0700)
tree57bd342ed0f2fda93b8ab2e3d8b01e1c18885b77
parent727afe75ef752829158e906c5b86991478fece53
Remove nearly all MP contention from ip_randomid()

* Instead of using two global spinlocks split the id space up into
  ncpus_fit independant sections and shuffle within each section.

* Aggregate the random number generation into blocks of 32, on a
  per-cpu basis, to reduce cpu contention there.

Using-test-output-by: Aggelos Economopoulos <aoiko@cc.ece.ntua.gr>
sys/netinet/ip_id.c