mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-26 19:54:57 +00:00
Improved BUFHASH algorithm.
This commit is contained in:
parent
229296b0cf
commit
cbf2350552
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=10226
|
@ -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…
Reference in a new issue