lkml.org 
[lkml]   [2013]   [Sep]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [RESEND PATCH v2 3/9] x86, dma: Support allocate memory from bottom upwards in dma_contiguous_reserve().
From
Date
On Fri, 2013-09-13 at 11:36 +0800, Tang Chen wrote:
> Hi Toshi,
>
> On 09/13/2013 03:22 AM, Toshi Kani wrote:
> ......
> >> + if (memblock_direction_bottom_up()) {
> >> + addr = memblock_alloc_bottom_up(
> >> + MEMBLOCK_ALLOC_ACCESSIBLE,
> >> + limit, size, alignment);
> >> + if (addr)
> >> + goto success;
> >> + }
> >
> > I am afraid that this version went to a wrong direction. Allocating
> > from the bottom up needs to be an internal logic within the memblock
> > allocator. It should not require the callers to be aware of the
> > direction and make a special request.
> >
>
> I think my v1 patch-set was trying to do so. Was it too complicated ?
>
> So just move this logic to memblock_find_in_range_node(), is this OK ?

Yes, the new version looks good on this.

Thanks,
-Toshi



\
 
 \ /
  Last update: 2013-09-14 00:21    [W:0.371 / U:0.072 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site