* [NUMA x86_64] problem accessing global Node List pgdat_list
@ 2005-10-05 5:40 devesh sharma
2005-10-05 12:42 ` Eric Dumazet
0 siblings, 1 reply; 4+ messages in thread
From: devesh sharma @ 2005-10-05 5:40 UTC (permalink / raw)
To: linux-kernel
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.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [NUMA x86_64] problem accessing global Node List pgdat_list
2005-10-05 5:40 [NUMA x86_64] problem accessing global Node List pgdat_list devesh sharma
@ 2005-10-05 12:42 ` Eric Dumazet
[not found] ` <309a667c0510050550x68e0c996q51e00e908813b5c1@mail.gmail.com>
0 siblings, 1 reply; 4+ messages in thread
From: Eric Dumazet @ 2005-10-05 12:42 UTC (permalink / raw)
To: devesh sharma; +Cc: linux-kernel
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [NUMA x86_64] problem accessing global Node List pgdat_list
[not found] ` <309a667c0510050550x68e0c996q51e00e908813b5c1@mail.gmail.com>
@ 2005-10-06 9:16 ` devesh sharma
2005-10-06 9:27 ` Eric Dumazet
0 siblings, 1 reply; 4+ messages in thread
From: devesh sharma @ 2005-10-06 9:16 UTC (permalink / raw)
To: Eric Dumazet, linux-kernel
Hi Eric,
I have tried numa=fake=4 on intel xeon with 2.6.13 kernel it is
working fine and by adding EXPORT_SYMBOL(pgdat_list) in
mm/page_alloc.c now I am able to access pgdat_list also. But on
opteron machine there is some problem in kernel compilation
at make install stage I am getting following warning
WARNING: No module mptbase found for kernel 2.6.13, continuing anyway
WARNING: No module mptscsih found for kernel 2.6.13, continuing anyway
now when I boot my kernel, panic is received
Booting the kernel.
Red Hat nash version 4.1.18 starting
mkrootdev: lable / not found
mount: error 2 mounting ext3
mount: error 2 mounting none
switchroot: mount failed : 22
umount : /initrd/dev failed : 22
kernel panic - not syncing : Attempted to kill init
On the other hand when I complie same source code on XEON machine this
works fine.
what could be the problem?
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [NUMA x86_64] problem accessing global Node List pgdat_list
2005-10-06 9:16 ` devesh sharma
@ 2005-10-06 9:27 ` Eric Dumazet
0 siblings, 0 replies; 4+ messages in thread
From: Eric Dumazet @ 2005-10-06 9:27 UTC (permalink / raw)
To: devesh sharma; +Cc: linux-kernel
devesh sharma a écrit :
> Hi Eric,
> I have tried numa=fake=4 on intel xeon with 2.6.13 kernel it is
> working fine and by adding EXPORT_SYMBOL(pgdat_list) in
> mm/page_alloc.c now I am able to access pgdat_list also. But on
> opteron machine there is some problem in kernel compilation
> at make install stage I am getting following warning
>
> WARNING: No module mptbase found for kernel 2.6.13, continuing anyway
> WARNING: No module mptscsih found for kernel 2.6.13, continuing anyway
>
> now when I boot my kernel, panic is received
>
> Booting the kernel.
> Red Hat nash version 4.1.18 starting
> mkrootdev: lable / not found
> mount: error 2 mounting ext3
> mount: error 2 mounting none
> switchroot: mount failed : 22
> umount : /initrd/dev failed : 22
> kernel panic - not syncing : Attempted to kill init
>
> On the other hand when I complie same source code on XEON machine this
> works fine.
>
> what could be the problem?
Hi Devesh
I believe you have basic kernel compilation problem :)
Your kernel cannot mount / because the boot loader was configured to find a
root=LABEL=/
As this is a RedHat kernel extension, your self compiled 2.6.13 kernel cannot
understand this.
You should change your lilo/grub config to match your root device as
root=/dev/hda2 (if hda2 is your root device)
Also check that your kernel (or initrd) contains the disk driver you need.
Eric
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2005-10-06 9:27 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-10-05 5:40 [NUMA x86_64] problem accessing global Node List pgdat_list devesh sharma
2005-10-05 12:42 ` Eric Dumazet
[not found] ` <309a667c0510050550x68e0c996q51e00e908813b5c1@mail.gmail.com>
2005-10-06 9:16 ` devesh sharma
2005-10-06 9:27 ` Eric Dumazet
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox