Date: Thu, 18 May 2006 23:17:26 GMT From: Kip Macy <kmacy@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 97425 for review Message-ID: <200605182317.k4INHQA7019543@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=97425 Change 97425 by kmacy@kmacy_storage:sun4v_rwbuf on 2006/05/18 23:16:43 further parameterize hash bucket sizes Affected files ... .. //depot/projects/kmacy_sun4v/src/sys/sun4v/include/tte_hash.h#16 edit .. //depot/projects/kmacy_sun4v/src/sys/sun4v/sun4v/exception.S#54 edit .. //depot/projects/kmacy_sun4v/src/sys/sun4v/sun4v/tte_hash.c#31 edit Differences ... ==== //depot/projects/kmacy_sun4v/src/sys/sun4v/include/tte_hash.h#16 (text+ko) ==== @@ -1,10 +1,12 @@ #ifndef _MACHINE_TTE_HASH_H_ #define _MACHINE_TTE_HASH_H_ -#define THE_SHIFT 6 /* size of hash entry is 64-bytes */ -#define TH_COLLISION_SHIFT 47 /* bit 47 will never be set for a valid tag */ +#define HASH_ENTRY_SHIFT 2 +#define HASH_ENTRIES (1 << HASH_ENTRY_SHIFT) +#define THE_SHIFT (TTE_SHIFT + HASH_ENTRY_SHIFT) /* size of TSB entry * #entries */ +#define TH_COLLISION_SHIFT 47 /* bit 47 will never be set for a valid tag */ #define TH_COLLISION (1UL << TH_COLLISION_SHIFT) -#define TH_INVALID_SHIFT 46 /* bit 46 will never be set for a valid tag */ +#define TH_INVALID_SHIFT 46 /* bit 47 will never be set for a valid tag */ #define TH_INVALID (1UL << TH_INVALID_SHIFT) ==== //depot/projects/kmacy_sun4v/src/sys/sun4v/sun4v/exception.S#54 (text+ko) ==== @@ -1509,16 +1509,30 @@ rdpr %tt, %g3 ! reload trap type tsb_miss_lookup_0: - HASH_LOOKUP(%g2, %l6, %l2, tsb_miss_not_found, 8f) + HASH_LOOKUP(%g2, %l6, %l2, tsb_miss_not_found, tsb_miss_found) tsb_miss_lookup_1: add %g2, 16, %g2 - HASH_LOOKUP(%g2, %l6, %l2, tsb_miss_not_found, 8f) + HASH_LOOKUP(%g2, %l6, %l2, tsb_miss_not_found, tsb_miss_found) tsb_miss_lookup_2: add %g2, 16, %g2 - HASH_LOOKUP(%g2, %l6, %l2, tsb_miss_not_found, 8f) + HASH_LOOKUP(%g2, %l6, %l2, tsb_miss_not_found, tsb_miss_found) tsb_miss_lookup_3: add %g2, 16, %g2 - HASH_LOOKUP(%g2, %l6, %l2, tsb_miss_not_found, 8f) + HASH_LOOKUP(%g2, %l6, %l2, tsb_miss_not_found, tsb_miss_found) +#ifdef notyet +tsb_miss_lookup_4: + add %g2, 16, %g2 + HASH_LOOKUP(%g2, %l6, %l2, tsb_miss_not_found, tsb_miss_found) +tsb_miss_lookup_5: + add %g2, 16, %g2 + HASH_LOOKUP(%g2, %l6, %l2, tsb_miss_not_found, tsb_miss_found) +tsb_miss_lookup_6: + add %g2, 16, %g2 + HASH_LOOKUP(%g2, %l6, %l2, tsb_miss_not_found, tsb_miss_found) +tsb_miss_collision: + add %g2, 16, %g2 + ldda [%g2]%asi, %l6 +#endif mov 1, %g2 sethi %uhi(VM_MIN_DIRECT_ADDRESS), %g3 cmp %l3, ASI_N @@ -1550,7 +1564,7 @@ or %g1, %lo(trap), %g1 tsb_miss_found: -8: + wr %g0, %l3, %asi cmp %g3, T_DATA_MISS ! TSB data miss be,pt %xcc, 9f ==== //depot/projects/kmacy_sun4v/src/sys/sun4v/sun4v/tte_hash.c#31 (text+ko) ==== @@ -58,12 +58,8 @@ #include <machine/tlb.h> #include <machine/tte_hash.h> -#define HASH_SIZE 4 -#define MAX_HASH_SIZE 16 +#define HASH_SIZE (1 << HASH_ENTRY_SHIFT) #define HASH_MASK(th) ((th->th_size << (PAGE_SHIFT - THE_SHIFT)) - 1) -#define HASH_VALID 0x1 -#define HASH_ENTRIES 4 - #define NULL_TAG 0
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200605182317.k4INHQA7019543>