[openib-general] [PATCH 11/17] ehca: completion queue
    Roland Dreier 
    rdreier at cisco.com
       
    Tue Mar  7 13:39:09 PST 2006
    
    
  
 > +	list_add(&qp->list_entries, &cq->qp_hashtab[key]);
You could save some memory by making qp_hashtab a struct hlist instead
of a struct list_head.
 > +	unsigned int key = real_qp_num%QP_HASHTAB_LEN;
This seems like a slightly funny hash function: you're doing an
integer divide in the poll_cq fast path, since QP_HASHTAB_LEN is 7.
How would making QP_HASHTAB_LEN be 8 affect the distribution (that way
the % could become a bitwise &)?
 - R.
    
    
More information about the general
mailing list