Thread (5 messages) 5 messages, 2 authors, 2013-08-22

Re: [PATCH v2 2/4] mm/sparse: introduce alloc_usemap_and_memmap

From: Wanpeng Li <hidden>
Date: 2013-08-22 12:15:06

Possibly related (same subject, not in this thread)

On Thu, Aug 22, 2013 at 08:08:09PM +0800, Wanpeng Li wrote:
On Wed, Aug 21, 2013 at 10:19:52PM -0700, Yinghai Lu wrote:
quoted
On Wed, Aug 21, 2013 at 12:29 AM, Wanpeng Li [off-list ref] wrote:
quoted
Hi Yinghai,
On Tue, Aug 20, 2013 at 09:28:29PM -0700, Yinghai Lu wrote:
quoted
On Tue, Aug 20, 2013 at 8:11 PM, Wanpeng Li [off-list ref] wrote:
quoted
Hi Yinghai,
On Tue, Aug 20, 2013 at 05:02:17PM -0700, Yinghai Lu wrote:
quoted
quoted
quoted
-     /* ok, last chunk */
-     sparse_early_usemaps_alloc_node(usemap_map, pnum_begin, NR_MEM_SECTIONS,
-                                      usemap_count, nodeid_begin);
+     alloc_usemap_and_memmap(usemap_map, true);
alloc_usemap_and_memmap() is somehow confusing.

Please check if you can pass function pointer instead of true/false.
sparse_early_usemaps_alloc_node and sparse_early_mem_maps_alloc_node is
similar, however, one has a parameter unsigned long ** and the other has
struct page **. function pointer can't help, isn't it? ;-)
you could have one generic function pointer like
void *alloc_func(void *data);

and in the every alloc function, have own struct data to pass in/out...
Sorry send you the wrong version, how about this one?

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help