• Andrew Morton's avatar
    [PATCH] misc rmap speedups · df921d4d
    Andrew Morton authored
    Even a BUG_ON() makes a measurable difference.  So remove some gratuitous
    ones which will just trigger a null pointer deref anyway.
    
    Also remove some debug code which isn't really being maintained any more.
    
    Also replace (effectively):
    
    	test_bit(N, foo);
    	set_bit(N, foo);
    
    with
    
    	set_bit(N, foo);
    	test_bit(N, foo);
    
    In the first case we'll go onto the bus twice: once for the cache miss and
    once to get exclusive write access.  In the second case we only go on the bus
    once.  I think.  Certainly this trick chaved 40% off the cost of
    shrink_list() when I did it there...
    
    This patch is worth 1% or so on the bash script testing.
    df921d4d
rmap.c 13.4 KB