wrsm_memseg.c revision a83cadce5d3331b64803bfc641036cec23602c74
b332ea78705d9ed8708bb30eb914c0eb9a8e6361Till Mossakowski * CDDL HEADER START
b332ea78705d9ed8708bb30eb914c0eb9a8e6361Till Mossakowski * The contents of this file are subject to the terms of the
b332ea78705d9ed8708bb30eb914c0eb9a8e6361Till Mossakowski * Common Development and Distribution License, Version 1.0 only
b332ea78705d9ed8708bb30eb914c0eb9a8e6361Till Mossakowski * (the "License"). You may not use this file except in compliance
2eeec5240b424984e3ee26296da1eeab6c6d739eChristian Maeder * with the License.
b332ea78705d9ed8708bb30eb914c0eb9a8e6361Till Mossakowski * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
b332ea78705d9ed8708bb30eb914c0eb9a8e6361Till Mossakowski * or http://www.opensolaris.org/os/licensing.
e6d40133bc9f858308654afb1262b8b483ec5922Till Mossakowski * See the License for the specific language governing permissions
0095c7efbddd0ffeed6aaf8ec015346be161d819Till Mossakowski * and limitations under the License.
b332ea78705d9ed8708bb30eb914c0eb9a8e6361Till Mossakowski * When distributing Covered Code, include this CDDL HEADER in each
b332ea78705d9ed8708bb30eb914c0eb9a8e6361Till Mossakowski * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
b332ea78705d9ed8708bb30eb914c0eb9a8e6361Till Mossakowski * If applicable, add the following below this CDDL HEADER, with the
b332ea78705d9ed8708bb30eb914c0eb9a8e6361Till Mossakowski * fields enclosed by brackets "[]" replaced with your own identifying
b332ea78705d9ed8708bb30eb914c0eb9a8e6361Till Mossakowski * information: Portions Copyright [yyyy] [name of copyright owner]
933997b6313fc8fd4711dbc9e01dff7c68f58cd7Till Mossakowski * CDDL HEADER END
47d6bc7bc9a708427f96be8d805f712697ad3d9eChristian Maeder * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
f5c16d70215311c0392b5723f427f714e34ba6b9Till Mossakowski * Use is subject to license terms.
f5c16d70215311c0392b5723f427f714e34ba6b9Till Mossakowski#pragma ident "%Z%%M% %I% %E% SMI"
47d6bc7bc9a708427f96be8d805f712697ad3d9eChristian Maeder * This file manages generic RSMPI memory segment management, setup and
f5c16d70215311c0392b5723f427f714e34ba6b9Till Mossakowskistatic uint_t wrsm_memseg_debug = DBG_MEMSEG;
f5c16d70215311c0392b5723f427f714e34ba6b9Till Mossakowski#define DPRINTF(a, b) { if (wrsm_memseg_debug & a) wrsmdprintf b; }
f5c16d70215311c0392b5723f427f714e34ba6b9Till Mossakowski#else /* DEBUG */
f5c16d70215311c0392b5723f427f714e34ba6b9Till Mossakowski#define DPRINTF(a, b) { }
47d6bc7bc9a708427f96be8d805f712697ad3d9eChristian Maeder#endif /* DEBUG */
47d6bc7bc9a708427f96be8d805f712697ad3d9eChristian Maeder/* Non-pageable kernel memory is allocated from the wrsm_arena. */
933997b6313fc8fd4711dbc9e01dff7c68f58cd7Till Mossakowski DPRINTF(DBG_MEMSEG, (CE_CONT, "ctlr %d: memseg_sess_teardown node %d\n",
933997b6313fc8fd4711dbc9e01dff7c68f58cd7Till Mossakowski node->network->rsm_ctlr_id, node->config->cnodeid));
47d6bc7bc9a708427f96be8d805f712697ad3d9eChristian Maeder * it is presumed that at this point the node was removed from the
933997b6313fc8fd4711dbc9e01dff7c68f58cd7Till Mossakowski * cluster_members_bits registers in all wcis
049d1590fff7cde05c68d63547aa7660c2034a0cTill Mossakowski * clean up exports to the remote node
933997b6313fc8fd4711dbc9e01dff7c68f58cd7Till Mossakowski * clean up iseginfos imported from remote node
47d6bc7bc9a708427f96be8d805f712697ad3d9eChristian Maedermemseg_sess_notify(wrsm_network_t *network, cnodeid_t cnodeid,
e57c178845d66be315d6947103db4a14c72a21a9Till Mossakowski * nothing to do on SESSION_UP
933997b6313fc8fd4711dbc9e01dff7c68f58cd7Till Mossakowski * driver initialization functions
47d6bc7bc9a708427f96be8d805f712697ad3d9eChristian Maeder DPRINTF(DBG_MEMSEG_EXTRA, (CE_CONT, "wrsm_memseg_node_init(cnode %d)\n",
#ifdef DEBUG
#ifdef DEBUG
for (i = 0; i < WRSM_SEGID_HASH_SIZE; i++) {
wrsm_memseg_init(void)
wrsm_memseg_fini(void)