From: Eric Dumazet <dada1@cosmosbay.com>
To: devesh sharma <devesh28@gmail.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [NUMA x86_64] problem accessing global Node List pgdat_list
Date: Wed, 05 Oct 2005 14:42:55 +0200 [thread overview]
Message-ID: <4343CA4F.8030003@cosmosbay.com> (raw)
In-Reply-To: <309a667c0510042240y1dcc75c4l83abc7fe430e4f05@mail.gmail.com>
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
next prev parent reply other threads:[~2005-10-05 12:43 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-10-05 5:40 [NUMA x86_64] problem accessing global Node List pgdat_list devesh sharma
2005-10-05 12:42 ` Eric Dumazet [this message]
[not found] ` <309a667c0510050550x68e0c996q51e00e908813b5c1@mail.gmail.com>
2005-10-06 9:16 ` devesh sharma
2005-10-06 9:27 ` Eric Dumazet
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4343CA4F.8030003@cosmosbay.com \
--to=dada1@cosmosbay.com \
--cc=devesh28@gmail.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox