Lines Matching defs:mnode

141  * combined memory ranges from mnode and memranges[] to manage single
142 * mnode/mtype dimension in the page lists.
156 struct mnr_mts { /* mnode/mtype szc stats */
333 * mnode range, the page freelist and cachelist are hashed into bins based on
1226 * mnode_range_cnt() calculates the number of memory ranges for mnode and
1230 mnode_range_cnt(int mnode)
1233 ASSERT(mnode == 0);
1239 if (mem_node_config[mnode].exists != 0) {
1242 /* find the memranges index below contained in mnode range */
1244 while (MEMRANGEHI(mri) < mem_node_config[mnode].physbase)
1248 * increment mnode range counter when memranges or mnode
1252 mem_node_config[mnode].physmax >= MEMRANGELO(mri)) {
1254 if (mem_node_config[mnode].physmax > MEMRANGEHI(mri))
1272 int mnode, mri;
1278 for (mnode = 0; mnode < max_mem_nodes; mnode++) {
1279 if (mem_node_config[mnode].exists == 0)
1284 while (MEMRANGEHI(mri) < mem_node_config[mnode].physbase)
1287 while (mri >= 0 && mem_node_config[mnode].physmax >=
1290 mem_node_config[mnode].physbase);
1292 mem_node_config[mnode].physmax);
1293 mnoderanges->mnr_mnode = mnode;
1298 if (mem_node_config[mnode].physmax > MEMRANGEHI(mri))
1321 /* find next highest mnode range */
1340 mnode_range_add(int mnode)
1347 ASSERT(0 <= mnode && mnode < max_mem_nodes);
1348 ASSERT(mem_node_config[mnode].exists);
1349 start = mem_node_config[mnode].physbase;
1350 end = mem_node_config[mnode].physmax;
1358 if (mnoderanges[n].mnr_mnode == mnode)
1366 while (MEMRANGEHI(mri) < mem_node_config[mnode].physbase)
1368 while (mri >= 0 && mem_node_config[mnode].physmax >= MEMRANGELO(mri)) {
1371 if (mnoderanges[n].mnr_mnode == mnode &&
1391 mnoderanges[n].mnr_mnode = mnode;
1406 if (mem_node_config[mnode].physmax > MEMRANGEHI(mri))
1419 mnode_range_del(int mnode)
1421 _NOTE(ARGUNUSED(mnode));
1422 ASSERT(0 <= mnode && mnode < max_mem_nodes);
1497 mtype_pgr_init(int *flags, page_t *pp, int mnode, pgcnt_t pgcnt)
1512 * Determine if the mnode range specified in mtype contains memory belonging
1513 * to memory node mnode. If flags & PGI_MT_RANGE is set then mtype contains
1516 * Return first mnode range type index found otherwise return -1 if none found.
1519 mtype_func(int mnode, int mtype, uint_t flags)
1533 if (mnoderanges[mtype].mnr_mnode == mnode)
1537 } else if (mnoderanges[mtype].mnr_mnode == mnode) {
1589 mnodetype_2_pfn(int mnode, int mtype, pfn_t *pfnlo, pfn_t *pfnhi)
1591 _NOTE(ARGUNUSED(mnode));
1592 ASSERT(mnoderanges[mtype].mnr_mnode == mnode);
1655 * Returns the free page count for mnode
1658 mnode_pgcnt(int mnode)
1664 mtype = mtype_func(mnode, mtype, flags);
1668 mtype = mtype_func(mnode, mtype, flags | PGI_MT_NEXT);
3066 * get a page from any list with the given mnode
3070 int mnode, int mtype, ddi_dma_attr_t *dma_attr)
3088 MTYPE_START(mnode, mtype, flags);
3108 if (PAGE_FREELISTS(mnode, szc, bin, mtype) == NULL)
3111 pcm = PC_BIN_MUTEX(mnode, bin, PG_FREE_LIST);
3113 pp = PAGE_FREELISTS(mnode, szc, bin, mtype);
3131 ASSERT(PFN_2_MEM_NODE(pp->p_pagenum) == mnode);
3152 page_sub(&PAGE_FREELISTS(mnode, szc, bin,
3154 page_ctr_sub(mnode, mtype, pp, PG_FREE_LIST);
3176 pp = page_freelist_split(szc, bin, mnode,
3190 MTYPE_NEXT(mnode, mtype, flags);
3204 if (PAGE_CACHELISTS(mnode, bin, mtype) == NULL)
3206 pcm = PC_BIN_MUTEX(mnode, bin, PG_CACHE_LIST);
3208 pp = PAGE_CACHELISTS(mnode, bin, mtype);
3221 ASSERT(PFN_2_MEM_NODE(pp->p_pagenum) == mnode);
3244 page_sub(&PAGE_CACHELISTS(mnode, bin,
3246 page_ctr_sub(mnode, mtype, pp, PG_CACHE_LIST);
3260 MTYPE_NEXT(mnode, mtype, flags);
3289 int mnode;
3354 while ((mnode = lgrp_memnode_choose(&lgrp_cookie)) >= 0) {
3361 pp = page_get_mnode_freelist(mnode,
3365 bin, flags, mnode, mtype);
3369 flags, mnode, mtype, dma_attr);
3942 * old hat_i86.c code. A better approach would be to specify either mnode
3943 * random or mnode local and takes a page from whatever color has the MOST