* Crash on reducing the kernel mem.
@ 2010-09-03 6:34 Prabhu Chawandi
2010-09-03 14:00 ` Greg KH
0 siblings, 1 reply; 4+ messages in thread
From: Prabhu Chawandi @ 2010-09-03 6:34 UTC (permalink / raw)
To: linux-kernel, linux-usb, kernelnewbies
Hi all,
I am using MIPS processor, with 256 MB RAM. currently I am using 128
M for drivers and 128 M for Kernel. I tried to allocate more memory
for Drivers,
surprisingly I got crash when I reduced kernel memory to 110 M. My
debugging took me to USB controller, which was not reset in
bootloader.
I am not having any clue, why it didnt crash with 128 M ? How reducing
memory for kernel bringing it up ?
Or am I going in wrong path ?
please share your views.
Thanks,
prabhu
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Crash on reducing the kernel mem.
2010-09-03 6:34 Crash on reducing the kernel mem Prabhu Chawandi
@ 2010-09-03 14:00 ` Greg KH
2010-09-06 10:47 ` Prabhu Chawandi
0 siblings, 1 reply; 4+ messages in thread
From: Greg KH @ 2010-09-03 14:00 UTC (permalink / raw)
To: Prabhu Chawandi; +Cc: linux-kernel, linux-usb, kernelnewbies
On Fri, Sep 03, 2010 at 12:04:09PM +0530, Prabhu Chawandi wrote:
> Hi all,
>
> I am using MIPS processor, with 256 MB RAM. currently I am using 128
> M for drivers and 128 M for Kernel. I tried to allocate more memory
> for Drivers,
> surprisingly I got crash when I reduced kernel memory to 110 M. My
> debugging took me to USB controller, which was not reset in
> bootloader.
>
> I am not having any clue, why it didnt crash with 128 M ? How reducing
> memory for kernel bringing it up ?
Perhaps your drivers really needed that much memory. How are you
"splitting" memory up between drivers and the kernel when the drivers
and kernel all share the same memory areas?
good luck,
greg k-h
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Crash on reducing the kernel mem.
2010-09-03 14:00 ` Greg KH
@ 2010-09-06 10:47 ` Prabhu Chawandi
2010-09-06 12:33 ` Martin Fuzzey
0 siblings, 1 reply; 4+ messages in thread
From: Prabhu Chawandi @ 2010-09-06 10:47 UTC (permalink / raw)
To: Greg KH; +Cc: linux-kernel, linux-usb, kernelnewbies
Hi Greg,
I am specifying the memory as part of command line parameter "mem=".
I know only that what ever amount specify against "mem=" will be a
kernel memory and rest is used for the drivers.
If I have not answered you correctly, please give me a chance to understand...
thanks,
Prabhu
On Fri, Sep 3, 2010 at 7:30 PM, Greg KH <greg@kroah.com> wrote:
> On Fri, Sep 03, 2010 at 12:04:09PM +0530, Prabhu Chawandi wrote:
>> Hi all,
>>
>> I am using MIPS processor, with 256 MB RAM. currently I am using 128
>> M for drivers and 128 M for Kernel. I tried to allocate more memory
>> for Drivers,
>> surprisingly I got crash when I reduced kernel memory to 110 M. My
>> debugging took me to USB controller, which was not reset in
>> bootloader.
>>
>> I am not having any clue, why it didnt crash with 128 M ? How reducing
>> memory for kernel bringing it up ?
>
> Perhaps your drivers really needed that much memory. How are you
> "splitting" memory up between drivers and the kernel when the drivers
> and kernel all share the same memory areas?
>
> good luck,
>
> greg k-h
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Crash on reducing the kernel mem.
2010-09-06 10:47 ` Prabhu Chawandi
@ 2010-09-06 12:33 ` Martin Fuzzey
0 siblings, 0 replies; 4+ messages in thread
From: Martin Fuzzey @ 2010-09-06 12:33 UTC (permalink / raw)
To: Prabhu Chawandi; +Cc: Greg KH, linux-kernel, linux-usb, kernelnewbies
On Mon, Sep 6, 2010 at 12:47 PM, Prabhu Chawandi
<prabhu.chavandi@gmail.com> wrote:
> Hi Greg,
>
> I am specifying the memory as part of command line parameter "mem=".
> I know only that what ever amount specify against "mem=" will be a
> kernel memory and rest is used for the drivers.
>
No it doesn't work like that.
Setting mem= will reduce the total amount of memory used.
If your system has 256M and you specify mem=128M the result
is that the other 128M is unused.
The kernel makes no separation between "kernel" and "drivers".
Drivers are part of the kernel (ie they live in the same address
space and can touch any memory).
There is a separation between kernel and userspace (ie
userspace processes cannot touch each others memory nor kernel
memory). However even the "userspace memory" comes from
the same "pool" reduced by mem=.
So when you changed mem=128M to mem=110M (intending
to give more memory to "drivers") what you actually did was
to reduce the memory available to the system. If that causes
a crash its likely just not enough memory available, probably
nothing specific to USB just that's where it happens to run out.
Why are you reducing memory in this way?
Normally the bootloader knows / detects how much memory
is available and informs the kernel. Reducing it is generally
only done for testing purposes (such as the case where you
have a development board that has more memory than the
production unit will so you artificially reduce the available
memory to see how it will behave on a production board).
Hope this helps,
Regards,
Martin
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-09-06 12:33 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-03 6:34 Crash on reducing the kernel mem Prabhu Chawandi
2010-09-03 14:00 ` Greg KH
2010-09-06 10:47 ` Prabhu Chawandi
2010-09-06 12:33 ` Martin Fuzzey
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox