diff options
| author | Stephen Hemminger <[email protected]> | 2008-01-22 21:57:22 -0800 |
|---|---|---|
| committer | David S. Miller <[email protected]> | 2008-01-28 15:11:01 -0800 |
| commit | d5ce8a0e97073169b5fe0b7c52bd020cdb017dfa (patch) | |
| tree | 75784ea0b512945ecbcba8f198ece57aa219c412 /include/linux | |
| parent | 9195bef7fb0ba0a91d5ffa566bcf8e007e3c7172 (diff) | |
[IPV4] fib_trie: avoid rescan on dump
This converts dumping (and flushing) of large route tables form O(N^2)
to O(N). If the route dump took multiple pages then the dump routine
gets called again. The old code kept track of location by counter, the
new code instead uses the last key.
This is a really big win ( 0.3 sec vs 12 sec) for big route tables.
One side effect is that if the table changes during the dump, then the
last key will not be found, and we will return -EBUSY.
Signed-off-by: Stephen Hemminger <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'include/linux')
0 files changed, 0 insertions, 0 deletions