subr_pctrie.c (250551) | subr_pctrie.c (298649) |
---|---|
1/* 2 * Copyright (c) 2013 EMC Corp. 3 * Copyright (c) 2011 Jeffrey Roberson <jeff@freebsd.org> 4 * Copyright (c) 2008 Mayur Shardul <mayur.shardul@gmail.com> 5 * All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions --- 31 unchanged lines hidden (view full) --- 40 * the number of insert and remove operations. This basically implies 41 * that optimizations supposedly helping one operation but hurting the 42 * other might be carefully evaluated. 43 * - On average not many nodes are expected to be fully populated, hence 44 * level compression may just complicate things. 45 */ 46 47#include <sys/cdefs.h> | 1/* 2 * Copyright (c) 2013 EMC Corp. 3 * Copyright (c) 2011 Jeffrey Roberson <jeff@freebsd.org> 4 * Copyright (c) 2008 Mayur Shardul <mayur.shardul@gmail.com> 5 * All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions --- 31 unchanged lines hidden (view full) --- 40 * the number of insert and remove operations. This basically implies 41 * that optimizations supposedly helping one operation but hurting the 42 * other might be carefully evaluated. 43 * - On average not many nodes are expected to be fully populated, hence 44 * level compression may just complicate things. 45 */ 46 47#include <sys/cdefs.h> |
48__FBSDID("$FreeBSD: head/sys/kern/subr_pctrie.c 250551 2013-05-12 04:05:01Z jeff $"); | 48__FBSDID("$FreeBSD: head/sys/kern/subr_pctrie.c 298649 2016-04-26 15:38:17Z pfg $"); |
49 50#include "opt_ddb.h" 51 52#include <sys/param.h> 53#include <sys/systm.h> 54#include <sys/kernel.h> 55#include <sys/pctrie.h> 56 --- 9 unchanged lines hidden (view full) --- 66#ifdef __LP64__ 67#define PCTRIE_WIDTH 4 68#else 69#define PCTRIE_WIDTH 3 70#endif 71 72#define PCTRIE_COUNT (1 << PCTRIE_WIDTH) 73#define PCTRIE_MASK (PCTRIE_COUNT - 1) | 49 50#include "opt_ddb.h" 51 52#include <sys/param.h> 53#include <sys/systm.h> 54#include <sys/kernel.h> 55#include <sys/pctrie.h> 56 --- 9 unchanged lines hidden (view full) --- 66#ifdef __LP64__ 67#define PCTRIE_WIDTH 4 68#else 69#define PCTRIE_WIDTH 3 70#endif 71 72#define PCTRIE_COUNT (1 << PCTRIE_WIDTH) 73#define PCTRIE_MASK (PCTRIE_COUNT - 1) |
74#define PCTRIE_LIMIT (howmany((sizeof(uint64_t) * NBBY), PCTRIE_WIDTH) - 1) | 74#define PCTRIE_LIMIT (howmany(sizeof(uint64_t) * NBBY, PCTRIE_WIDTH) - 1) |
75 76/* Flag bits stored in node pointers. */ 77#define PCTRIE_ISLEAF 0x1 78#define PCTRIE_FLAGS 0x1 79#define PCTRIE_PAD PCTRIE_FLAGS 80 81/* Returns one unit associated with specified level. */ 82#define PCTRIE_UNITLEVEL(lev) \ --- 623 unchanged lines hidden --- | 75 76/* Flag bits stored in node pointers. */ 77#define PCTRIE_ISLEAF 0x1 78#define PCTRIE_FLAGS 0x1 79#define PCTRIE_PAD PCTRIE_FLAGS 80 81/* Returns one unit associated with specified level. */ 82#define PCTRIE_UNITLEVEL(lev) \ --- 623 unchanged lines hidden --- |