1 1.1 jmcneill /** 2 1.1 jmcneill * Copyright (c) 2010-2012 Broadcom. All rights reserved. 3 1.1 jmcneill * 4 1.1 jmcneill * Redistribution and use in source and binary forms, with or without 5 1.1 jmcneill * modification, are permitted provided that the following conditions 6 1.1 jmcneill * are met: 7 1.1 jmcneill * 1. Redistributions of source code must retain the above copyright 8 1.1 jmcneill * notice, this list of conditions, and the following disclaimer, 9 1.1 jmcneill * without modification. 10 1.1 jmcneill * 2. Redistributions in binary form must reproduce the above copyright 11 1.1 jmcneill * notice, this list of conditions and the following disclaimer in the 12 1.1 jmcneill * documentation and/or other materials provided with the distribution. 13 1.1 jmcneill * 3. The names of the above-listed copyright holders may not be used 14 1.1 jmcneill * to endorse or promote products derived from this software without 15 1.1 jmcneill * specific prior written permission. 16 1.1 jmcneill * 17 1.1 jmcneill * ALTERNATIVELY, this software may be distributed under the terms of the 18 1.1 jmcneill * GNU General Public License ("GPL") version 2, as published by the Free 19 1.1 jmcneill * Software Foundation. 20 1.1 jmcneill * 21 1.1 jmcneill * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 22 1.1 jmcneill * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 23 1.1 jmcneill * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 24 1.1 jmcneill * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR 25 1.1 jmcneill * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 26 1.1 jmcneill * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 27 1.1 jmcneill * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 28 1.1 jmcneill * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 29 1.1 jmcneill * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 30 1.1 jmcneill * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 31 1.1 jmcneill * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 32 1.1 jmcneill */ 33 1.1 jmcneill 34 1.1 jmcneill #ifndef VCHI_CFG_INTERNAL_H_ 35 1.1 jmcneill #define VCHI_CFG_INTERNAL_H_ 36 1.1 jmcneill 37 1.1 jmcneill /**************************************************************************************** 38 1.1 jmcneill * Control optimisation attempts. 39 1.1 jmcneill ***************************************************************************************/ 40 1.1 jmcneill 41 1.1 jmcneill // Don't use lots of short-term locks - use great long ones, reducing the overall locks-per-second 42 1.1 jmcneill #define VCHI_COARSE_LOCKING 43 1.1 jmcneill 44 1.1 jmcneill // Avoid lock then unlock on exit from blocking queue operations (msg tx, bulk rx/tx) 45 1.1 jmcneill // (only relevant if VCHI_COARSE_LOCKING) 46 1.1 jmcneill #define VCHI_ELIDE_BLOCK_EXIT_LOCK 47 1.1 jmcneill 48 1.1 jmcneill // Avoid lock on non-blocking peek 49 1.1 jmcneill // (only relevant if VCHI_COARSE_LOCKING) 50 1.1 jmcneill #define VCHI_AVOID_PEEK_LOCK 51 1.1 jmcneill 52 1.1 jmcneill // Use one slot-handler thread per connection, rather than 1 thread dealing with all connections in rotation. 53 1.1 jmcneill #define VCHI_MULTIPLE_HANDLER_THREADS 54 1.1 jmcneill 55 1.1 jmcneill // Put free descriptors onto the head of the free queue, rather than the tail, so that we don't thrash 56 1.1 jmcneill // our way through the pool of descriptors. 57 1.1 jmcneill #define VCHI_PUSH_FREE_DESCRIPTORS_ONTO_HEAD 58 1.1 jmcneill 59 1.1 jmcneill // Don't issue a MSG_AVAILABLE callback for every single message. Possibly only safe if VCHI_COARSE_LOCKING. 60 1.1 jmcneill #define VCHI_FEWER_MSG_AVAILABLE_CALLBACKS 61 1.1 jmcneill 62 1.1 jmcneill // Don't use message descriptors for TX messages that don't need them 63 1.1 jmcneill #define VCHI_MINIMISE_TX_MSG_DESCRIPTORS 64 1.1 jmcneill 65 1.1 jmcneill // Nano-locks for multiqueue 66 1.1 jmcneill //#define VCHI_MQUEUE_NANOLOCKS 67 1.1 jmcneill 68 1.1 jmcneill // Lock-free(er) dequeuing 69 1.1 jmcneill //#define VCHI_RX_NANOLOCKS 70 1.1 jmcneill 71 1.1 jmcneill #endif /*VCHI_CFG_INTERNAL_H_*/ 72