Change kdb mempolicy command to recognize local preferred policy. Minor change to MPOL_PREFERRED policy output in kdbm_mpol():
If the MPOL_F_LOCAL flag is set, then just output 'local' since the v.preferred_node field is not initialized/valid in this case, and this flag means to allocate memory on the local/current node, where ever that may be at the time of the fault. Developed-by: John Blackwood <[email protected]> Signed-off-by: Joe Korty <[email protected]> Index: 2.6.31.3-kdb/kdb/modules/kdbm_vm.c =================================================================== --- 2.6.31.3-kdb.orig/kdb/modules/kdbm_vm.c 2009-10-12 11:06:52.000000000 -0400 +++ 2.6.31.3-kdb/kdb/modules/kdbm_vm.c 2009-10-12 11:07:02.000000000 -0400 @@ -183,7 +183,10 @@ case MPOL_PREFERRED: kdb_printf(" mode %d (MPOL_PREFERRED)\n", mp->mode); - kdb_printf(" preferred_node %d\n", mp->v.preferred_node); + if (mp->flags & MPOL_F_LOCAL) + kdb_printf(" preferred_node local\n"); + else + kdb_printf(" preferred_node %d\n", mp->v.preferred_node); break; case MPOL_BIND: _______________________________________________ kdb mailing list [email protected] http://oss.sgi.com/mailman/listinfo/kdb
