From owner-p4-projects@FreeBSD.ORG Thu May 18 23:17:53 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 9727516A524; Thu, 18 May 2006 23:17:53 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3253716A521 for ; Thu, 18 May 2006 23:17:53 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id C93C743D5C for ; Thu, 18 May 2006 23:17:52 +0000 (GMT) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id k4INHQQM019546 for ; Thu, 18 May 2006 23:17:26 GMT (envelope-from kmacy@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k4INHQA7019543 for perforce@freebsd.org; Thu, 18 May 2006 23:17:26 GMT (envelope-from kmacy@freebsd.org) Date: Thu, 18 May 2006 23:17:26 GMT Message-Id: <200605182317.k4INHQA7019543@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to kmacy@freebsd.org using -f From: Kip Macy To: Perforce Change Reviews Cc: Subject: PERFORCE change 97425 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 May 2006 23:17:53 -0000 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 #include -#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