Improved BUFHASH algorithm.
This commit is contained in:
parent
229296b0cf
commit
cbf2350552
@ -36,7 +36,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)buf.h 8.7 (Berkeley) 1/21/94
|
||||
* $Id: buf.h,v 1.19 1995/05/30 08:14:07 rgrimes Exp $
|
||||
* $Id: buf.h,v 1.20 1995/07/29 11:42:43 bde Exp $
|
||||
*/
|
||||
|
||||
#ifndef _SYS_BUF_H_
|
||||
@ -165,7 +165,7 @@ struct cluster_save {
|
||||
* buffer hash table calculation, originally by David Greenman
|
||||
*/
|
||||
#define BUFHASH(vnp, bn) \
|
||||
(&bufhashtbl[(((int)(vnp) / sizeof(struct vnode))+(int)(bn)) % BUFHSZ])
|
||||
(&bufhashtbl[(((unsigned long)(vnp) >> 7)+(int)(bn)) % BUFHSZ])
|
||||
|
||||
/*
|
||||
* Definitions for the buffer free lists.
|
||||
|
@ -36,7 +36,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)buf.h 8.7 (Berkeley) 1/21/94
|
||||
* $Id: buf.h,v 1.19 1995/05/30 08:14:07 rgrimes Exp $
|
||||
* $Id: buf.h,v 1.20 1995/07/29 11:42:43 bde Exp $
|
||||
*/
|
||||
|
||||
#ifndef _SYS_BUF_H_
|
||||
@ -165,7 +165,7 @@ struct cluster_save {
|
||||
* buffer hash table calculation, originally by David Greenman
|
||||
*/
|
||||
#define BUFHASH(vnp, bn) \
|
||||
(&bufhashtbl[(((int)(vnp) / sizeof(struct vnode))+(int)(bn)) % BUFHSZ])
|
||||
(&bufhashtbl[(((unsigned long)(vnp) >> 7)+(int)(bn)) % BUFHSZ])
|
||||
|
||||
/*
|
||||
* Definitions for the buffer free lists.
|
||||
|
Loading…
x
Reference in New Issue
Block a user