lkml.org 
[lkml]   [2005]   [Oct]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [NUMA x86_64] problem accessing global Node List pgdat_list
Hi Devesh

devesh sharma a écrit :
> 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 ;

What are you doing here ? You declare a local variable on this module.
You should instead write :

extern struct pglist_data *pgdat_list ;
(But it seems already declared in mmzone.h)

But pgdat_list is an exported symbol of linux kernel : a module cannot access it.

So I suspect you will have to add in mm/page_alloc.c (and recompile your kernel)

EXPORT_SYMBOL(pgdat_list);


And please use a recent kernel (2.6.13 at least) or few people will answer you.


>
> 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.

Eric


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

\
 
 \ /
  Last update: 2005-10-05 14:45    [W:0.052 / U:0.524 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site