Skip to contentSkip to conversation

limited Memory question...

DISCUSSION machael thailer 4 participants 9 messages Jan 9, 2002 MIPS

lore
Share & tools
lore
#0 lore raw

Hello, all:
I have a question to need you help. Our MIPS-based custom board has only 8M memory.When I want to insmod a 24M module, it often panics and says "out of memory...".
How can I solve this?
Thank you.
machael thailer

#1 lore raw

Em Wed, Jan 09, 2002 at 09:43:59AM +0800, machael thailer escreveu:

Quoted 3 lines

I have a question to need you help. Our MIPS-based custom board has only 8M memory.When I want to insmod a 24M module, it often panics and says "out of memory...".

a kernel module? 24MiB? ouch, if that is the case, the only way is to get more memory for your board, as kernel memory is not swappable...

- Arnaldo

#2 lore raw
Quoted 6 lines
Quoted 3 lines

I have a question to need you help. Our MIPS-based custom board has only 8M memory.When I want to insmod a 24M module, it often panics and says "out of memory...".

a kernel module? 24MiB? ouch, if that is the case, the only way is to get more memory for your board, as kernel memory is not swappable...

Yes, it is a kernel module.
But unfortunately, the memory is fixed on our board and we cannot add more memory. Any other ideas?

#3 lore raw

Em Wed, Jan 09, 2002 at 10:39:18AM +0800, machael thailer escreveu:

Quoted 10 lines
Quoted 6 lines
Quoted 3 lines

I have a question to need you help. Our MIPS-based custom board has only 8M memory.When I want to insmod a 24M module, it often panics and says "out of memory...".

a kernel module? 24MiB? ouch, if that is the case, the only way is to get more memory for your board, as kernel memory is not swappable...

Yes, it is a kernel module.
But unfortunately, the memory is fixed on our board and we cannot add more memory. Any other ideas?

What does this module does that takes so much memory? One possible idea akpm talked about was to reduce NR_CPUS to the number of CPUs in your eval board if that is something relevant to the reason why your module takes so much memory, does it have a firmware linked? If so, don't link it and load it from userspace, block by block, if this is possible, etc, other than these suggestions one could only give more ideas if the source code is available for review.

- Arnaldo

#4 lore raw
Quoted 13 lines

Em Wed, Jan 09, 2002 at 10:39:18AM +0800, machael thailer escreveu:

Quoted 10 lines
Quoted 6 lines
Quoted 3 lines

I have a question to need you help. Our MIPS-based custom board has only 8M memory.When I want to insmod a 24M module, it often panics and says "out of memory...".

a kernel module? 24MiB? ouch, if that is the case, the only way is to get more memory for your board, as kernel memory is not swappable...

Yes, it is a kernel module.
But unfortunately, the memory is fixed on our board and we cannot add more memory. Any other ideas?

Quoted 7 lines

What does this module does that takes so much memory? One possible idea akpm talked about was to reduce NR_CPUS to the number of CPUs in your eval board if that is something relevant to the reason why your module takes so much memory, does it have a firmware linked? If so, don't link it and load it from userspace, block by block, if this is possible, etc, other than these suggestions one could only give more ideas if the source code is available for review.

24M is the size of the module, not the memory that it takes.

machael.

#5 lore raw

Em Wed, Jan 09, 2002 at 11:02:23AM +0800, machael thailer escreveu:

Quoted 21 lines
Quoted 13 lines

Em Wed, Jan 09, 2002 at 10:39:18AM +0800, machael thailer escreveu:

Quoted 10 lines
Quoted 6 lines
Quoted 3 lines

I have a question to need you help. Our MIPS-based custom board has only 8M memory.When I want to insmod a 24M module, it often panics and says "out of memory...".

a kernel module? 24MiB? ouch, if that is the case, the only way is to get more memory for your board, as kernel memory is not swappable...

Yes, it is a kernel module.
But unfortunately, the memory is fixed on our board and we cannot add more memory. Any other ideas?

Quoted 7 lines

What does this module does that takes so much memory? One possible idea akpm talked about was to reduce NR_CPUS to the number of CPUs in your eval board if that is something relevant to the reason why your module takes so much memory, does it have a firmware linked? If so, don't link it and load it from userspace, block by block, if this is possible, etc, other than these suggestions one could only give more ideas if the source code is available for review.

Quoted 1 line

24M is the size of the module, not the memory that it takes.

what is the output of:

size your_module.o

?

- Arnaldo

#6 lore raw
In reply to machael thailer
Quoted 4 lines

I have a question to need you help. Our MIPS-based custom board has only
8M memory.When I want to insmod a 24M module, it often panics and says "out of memory...".
How can I solve this?

Stop the module using 24Mb of unpageable memory ?

#7 lore raw
Quoted 6 lines
Quoted 4 lines

I have a question to need you help. Our MIPS-based custom board has only
8M memory.When I want to insmod a 24M module, it often panics and says "out of memory...".
How can I solve this?

Stop the module using 24Mb of unpageable memory ?

Sorry , I think I didn't describe my questions clearly before.

"24M" contains some debugging information. I compile it using "-g". code+data sections is only about 7.4M.

Can you describe your solutions in more details?

machael.

#8 lore raw
Quoted 4 lines · machael thailer

"24M" contains some debugging information. I compile it using "-g". code+data sections is only about 7.4M.

Can you describe your solutions in more details?

No way to load such a module into such little memory. The only possible solution is to drastically rewrite your module and move everything possible into a userspace process. For userspace processes swapping is possible ...

Ralf

--
"Embrace, Enhance, Eliminate" - it worked for the pope, it'll work for Bill.