* __vmalloc and alloc_page
@ 2003-09-17 16:26 Leandro Motta Barros
2003-09-17 17:19 ` Ravi Krishnamurthy
2003-09-17 19:32 ` William Lee Irwin III
0 siblings, 2 replies; 5+ messages in thread
From: Leandro Motta Barros @ 2003-09-17 16:26 UTC (permalink / raw)
To: linux-mm; +Cc: sisopiii-l
Hello again,
Thanks for the feedback on the previous email. Well, there is another thing we
thought that could be done. '__vmalloc()' allocates its memory by calling
'alloc_page()' for every necessary page. Wouldn't it be better calling
'alloc_pages()' to allocate more pages at once whenever possible? We would
need more bookeepping, and sometimes it could be necessary to actually
allocate the memory page per page, but we think this approach could be a way
to use memory blocks of higher order.
Do you think this is feasible or useful?
Also, we would like to know if you have suggestions on topics that we could
explore and implement.
LMB
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"aart@kvack.org"> aart@kvack.org </a>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: __vmalloc and alloc_page
2003-09-17 16:26 __vmalloc and alloc_page Leandro Motta Barros
@ 2003-09-17 17:19 ` Ravi Krishnamurthy
2003-09-17 19:32 ` William Lee Irwin III
1 sibling, 0 replies; 5+ messages in thread
From: Ravi Krishnamurthy @ 2003-09-17 17:19 UTC (permalink / raw)
To: Leandro Motta Barros, linux-mm; +Cc: sisopiii-l
--- Leandro Motta Barros <lmb@exatas.unisinos.br> wrote:
> '__vmalloc()' allocates its memory by calling
> 'alloc_page()' for every necessary page. Wouldn't
> it be better calling 'alloc_pages()' to allocate
> more pages at once whenever possible?
Higher order allocations are more likely to fail
because of fragmentation. Besides, vmalloc() is
intended to be used when the caller does not really
need physically contiguous pages. So calling
alloc_pages() within vmalloc seems pointless.
If alloc_pages fails, you will have to fall back to
a lower order allocation anyway.
__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"aart@kvack.org"> aart@kvack.org </a>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: __vmalloc and alloc_page
2003-09-17 16:26 __vmalloc and alloc_page Leandro Motta Barros
2003-09-17 17:19 ` Ravi Krishnamurthy
@ 2003-09-17 19:32 ` William Lee Irwin III
2003-09-18 16:20 ` Leandro Motta Barros
1 sibling, 1 reply; 5+ messages in thread
From: William Lee Irwin III @ 2003-09-17 19:32 UTC (permalink / raw)
To: Leandro Motta Barros; +Cc: linux-mm, sisopiii-l
On Wed, Sep 17, 2003 at 01:26:11PM -0300, Leandro Motta Barros wrote:
> Thanks for the feedback on the previous email. Well, there is another
> thing we thought that could be done. '__vmalloc()' allocates its
> memory by calling 'alloc_page()' for every necessary page. Wouldn't
> it be better calling 'alloc_pages()' to allocate more pages at once
> whenever possible? We would need more bookeepping, and sometimes it
> could be necessary to actually allocate the memory page per page, but
> we think this approach could be a way to use memory blocks of higher order.
> Do you think this is feasible or useful?
> Also, we would like to know if you have suggestions on topics that we could
> explore and implement.
Higher-order would probably not be as useful as you'd suspect; try
looking at the distribution of available pages of given sizes in /proc/.
OTOH, just being able to get more than one page in one call (not relying
on physically contiguous memory) would be a simple and useful optimization.
-- wli
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"aart@kvack.org"> aart@kvack.org </a>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: __vmalloc and alloc_page
2003-09-17 19:32 ` William Lee Irwin III
@ 2003-09-18 16:20 ` Leandro Motta Barros
2003-09-18 17:08 ` William Lee Irwin III
0 siblings, 1 reply; 5+ messages in thread
From: Leandro Motta Barros @ 2003-09-18 16:20 UTC (permalink / raw)
To: William Lee Irwin III; +Cc: linux-mm, sisopiii-l
On Wednesday 17 September 2003 16:32, William Lee Irwin III wrote:
> Higher-order would probably not be as useful as you'd suspect; try
> looking at the distribution of available pages of given sizes in /proc/.
> OTOH, just being able to get more than one page in one call (not relying
> on physically contiguous memory) would be a simple and useful optimization.
I'm not sure if I really understood what you said. Does it means that in some
cases (e.g., when the buddy allocator has a free chunk of the proper size)
this could be good, even though this will not help other things (like
reducing the number of splits in the buddy allocator)?
LMB
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"aart@kvack.org"> aart@kvack.org </a>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: __vmalloc and alloc_page
2003-09-18 16:20 ` Leandro Motta Barros
@ 2003-09-18 17:08 ` William Lee Irwin III
0 siblings, 0 replies; 5+ messages in thread
From: William Lee Irwin III @ 2003-09-18 17:08 UTC (permalink / raw)
To: Leandro Motta Barros; +Cc: linux-mm, sisopiii-l
On Wednesday 17 September 2003 16:32, William Lee Irwin III wrote:
>> Higher-order would probably not be as useful as you'd suspect; try
>> looking at the distribution of available pages of given sizes in /proc/.
>> OTOH, just being able to get more than one page in one call (not relying
>> on physically contiguous memory) would be a simple and useful optimization.
On Thu, Sep 18, 2003 at 01:20:08PM -0300, Leandro Motta Barros wrote:
> I'm not sure if I really understood what you said. Does it means that in some
> cases (e.g., when the buddy allocator has a free chunk of the proper size)
> this could be good, even though this will not help other things (like
> reducing the number of splits in the buddy allocator)?
No.
Relying on there being contiguous memory means it will fail more often
than it has to and/or does now.
The suggestion was to add an interface to fetch more than one page in
one call, to reduce various kinds of overheads associated with the round
trip through the codepaths (dis/re -enabling ints, ticking counters, etc.)
-- wli
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"aart@kvack.org"> aart@kvack.org </a>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2003-09-18 17:08 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-09-17 16:26 __vmalloc and alloc_page Leandro Motta Barros
2003-09-17 17:19 ` Ravi Krishnamurthy
2003-09-17 19:32 ` William Lee Irwin III
2003-09-18 16:20 ` Leandro Motta Barros
2003-09-18 17:08 ` William Lee Irwin III
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox