[NUMA x86_64] problem accessing global Node List pgdat_list

From: devesh sharma
Date: Wed Oct 05 2005 - 00:41:09 EST


Hi all,
On an dual opteron machine and 2.6.9 kernel, I am accessing the global
node list pgdat_list but I am not getting the desired results

#include<linux/module.h>
#include<linux/config.h>
#include<linux/kernel.h>
#include<linux/mmzone.h>

struct pglist_data *pgdat_list ;

int init_module( void )
{

pg_data_t *pg_dat ;

printk ("<1>****Module initialized to retrive the information of
pgdat_list list in the Kernel****\n" ) ;


for_each_pgdat(pg_dat)
{
printk ("<1>The number of zones on this node are %x\n", pg_dat ->
nr_zones ) ;

printk ("<1>The Node Id of this node is %d\n", pg_dat -> node_id ) ;

}

return 0 ;
}

void cleanup_module ( void )
{
printk ("<1>********Module Exiting***********\n" ) ;
}

MODULE_LICENSE("GPL") ;

How I can access this list any body tell me the solution.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/