[openib-general] [PATCH 11/17] ehca: completion queue

Hoang-Nam Nguyen HNGUYEN at de.ibm.com
Wed Mar 8 13:13:57 PST 2006


Roland,
Yes, that all makes sense. Will change my code appropriately.
Thanks!
Hoang-Nam Nguyen



                                                                           
             Roland Dreier                                                 
             <rdreier at cisco.co                                             
             m>                                                         To 
                                       schihei at de.ltcfwd.linux.ibm.com     
             07.03.2006 22:39                                           cc 
                                       openib-general at openib.org,          
                                       Christoph Raisch/Germany/IBM at IBMDE, 
                                       Hoang-Nam Nguyen/Germany/IBM at IBMDE  
                                                                   Subject 
                                       Re: [openib-general] [PATCH 11/17]  
                                       ehca: completion queue              
                                                                           
                                                                           
                                                                           
                                                                           
                                                                           
                                                                           




 > +         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