* kernel memory usage any restrictions?
@ 2005-05-27 18:18 cranium2003
2005-05-27 18:46 ` Chris Friesen
0 siblings, 1 reply; 4+ messages in thread
From: cranium2003 @ 2005-05-27 18:18 UTC (permalink / raw)
To: linux-kernel
hello,
Is there any restricition on using
kernel's memory? also if i require to use some kernel
memory say 625kB by allocating that in GFP_ATOMIC mode
flag, what will be the side effects on kernel memory
if i use that 625kB memory available from kernel
memory for my kernel source code additions to kernel?
I require answer with respect to 2.4 and 2.6 kernel.
regards,
cranium.
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: kernel memory usage any restrictions?
2005-05-27 18:18 kernel memory usage any restrictions? cranium2003
@ 2005-05-27 18:46 ` Chris Friesen
0 siblings, 0 replies; 4+ messages in thread
From: Chris Friesen @ 2005-05-27 18:46 UTC (permalink / raw)
To: cranium2003; +Cc: linux-kernel
cranium2003 wrote:
> hello,
> Is there any restricition on using
> kernel's memory? also if i require to use some kernel
> memory say 625kB by allocating that in GFP_ATOMIC mode
Your call will almost certainly fail. I think kmalloc will only give
you up to 128KB, and even that might be tricky to do with GFP_ATOMIC.
For larger chunks of memory, you can use vmalloc() or reserve it
statically at compile time.
Chris
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: kernel memory usage any restrictions?
@ 2005-05-28 1:56 cranium2003
2005-05-28 2:16 ` Steven Rostedt
0 siblings, 1 reply; 4+ messages in thread
From: cranium2003 @ 2005-05-28 1:56 UTC (permalink / raw)
To: Chris Friesen; +Cc: linux-kernel
hello,
--- Chris Friesen <cfriesen@nortel.com> wrote:
> cranium2003 wrote:
> > hello,
> > Is there any restricition on using
> > kernel's memory? also if i require to use some
> kernel
> > memory say 625kB by allocating that in GFP_ATOMIC
> mode
>
> Your call will almost certainly fail. I think
> kmalloc will only give
> you up to 128KB, and even that might be tricky to do
> with GFP_ATOMIC.
>
NO I mean the source code total require 625kB
not i require a single call of kmalloc with GFP_ATOMIC
but many calls whose total sum will be around 625kB.
> For larger chunks of memory, you can use vmalloc()
> or reserve it
> statically at compile time.
>
> Chris
>
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: kernel memory usage any restrictions?
2005-05-28 1:56 cranium2003
@ 2005-05-28 2:16 ` Steven Rostedt
0 siblings, 0 replies; 4+ messages in thread
From: Steven Rostedt @ 2005-05-28 2:16 UTC (permalink / raw)
To: cranium2003; +Cc: linux-kernel, Chris Friesen
On Fri, 2005-05-27 at 18:56 -0700, cranium2003 wrote:
> > Your call will almost certainly fail. I think
> > kmalloc will only give
> > you up to 128KB, and even that might be tricky to do
> > with GFP_ATOMIC.
> >
> NO I mean the source code total require 625kB
> not i require a single call of kmalloc with GFP_ATOMIC
> but many calls whose total sum will be around 625kB.
Matters what you system is. I have a gig of RAM and can easily allocate
a meg by 32 32K chunks. I haven't tried it with ATOMIC, but that just
means it will fail if it can't get you something right away and it needs
to sleep. But if you keep trying, that is, don't allocate then
(assuming you're in an interrupt) and try again another time (in another
interrupt), you should eventually get the 625kB. But as this answer is,
you need to supply more context. If you can't fail any of those tries,
then it probably won't work. You're system may be cached out, and would
need to write pages to the disk before it can give you the memory you
need, and then it would have to sleep.
-- Steve
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2005-05-28 2:16 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-05-27 18:18 kernel memory usage any restrictions? cranium2003
2005-05-27 18:46 ` Chris Friesen
-- strict thread matches above, loose matches on Subject: below --
2005-05-28 1:56 cranium2003
2005-05-28 2:16 ` Steven Rostedt
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.