[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <SN1PR0301MB1550139916D439D875E436D39B9F0@SN1PR0301MB1550.namprd03.prod.outlook.com>
Date: Fri, 10 Jul 2015 05:28:06 +0000
From: Zhao Qiang <qiang.zhao@...escale.com>
To: Scott Wood <scottwood@...escale.com>
CC: "lauraa@...eaurora.org" <lauraa@...eaurora.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linuxppc-dev@...ts.ozlabs.org" <linuxppc-dev@...ts.ozlabs.org>,
"akpm@...ux-foundation.org" <akpm@...ux-foundation.org>,
"olof@...om.net" <olof@...om.net>,
"catalin.marinas@....com" <catalin.marinas@....com>,
"Xiaobo Xie" <X.Xie@...escale.com>
Subject: RE: [RFC] genalloc:add an gen_pool_alloc_align func to genalloc
> -----Original Message-----
> From: Wood Scott-B07421
> Sent: Friday, July 10, 2015 6:20 AM
> To: Zhao Qiang-B45475
> Cc: lauraa@...eaurora.org; linux-kernel@...r.kernel.org; linuxppc-
> dev@...ts.ozlabs.org; akpm@...ux-foundation.org; olof@...om.net;
> catalin.marinas@....com; Xie Xiaobo-R63061
> Subject: Re: [RFC] genalloc:add an gen_pool_alloc_align func to genalloc
>
> On Thu, 2015-07-09 at 15:47 +0800, Zhao Qiang wrote:
> > @@ -541,13 +562,14 @@ EXPORT_SYMBOL(gen_pool_first_fit_order_align);
> > * which we can allocate the memory.
> > */
> > unsigned long gen_pool_best_fit(unsigned long *map, unsigned long size,
> > - unsigned long start, unsigned int nr, void *data)
> > + unsigned long start, unsigned int nr,
> > + void *data, unsigned long align_mask)
> > {
> > unsigned long start_bit = size;
> > unsigned long len = size + 1;
> > unsigned long index;
> >
> > - index = bitmap_find_next_zero_area(map, size, start, nr, 0);
> > + index = bitmap_find_next_zero_area(map, size, start, nr,
> align_mask);
> >
> > while (index < size) {
> > int next_bit = find_next_bit(map, size, index + nr);
>
> What about the other call to bitmap_find_next_zero_area()?
All others will pass the align_mask to bitmap_find_next_zero_area.
>
> -Scott
Powered by blists - more mailing lists