linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* A solution for more GFP_xx flags?
@ 2006-09-12  2:28 Christoph Lameter
  2006-09-12  2:44 ` Nick Piggin
  2006-09-12  6:16 ` Paul Jackson
  0 siblings, 2 replies; 8+ messages in thread
From: Christoph Lameter @ 2006-09-12  2:28 UTC (permalink / raw)
  To: linux-mm

I wonder if we could pass a pointer to an allocation structure
to the allocators instead of an unsigned long?

Right now the problem is that we need _node allocators to specify nodes 
and the memory policies and cpusets are determined by the allocation 
context of a process. This makes the allocators difficult to handle.

We could define a structure

struct allocation_control {
	unsigned long flags;	/* Traditional flags */
	int node;
	struct cpuset_context *cpuset;
	struct mempol *mpol;
};

We could define struct constants called GFP_KERNEL and GFP_ATOMIC.
const struct allocation_control gfp_kernel {
	GFP_KERNEL, -1, NULL, NULL
}

And then do

alloc_pages(n, gfp_kernel)

?

This would also solve the problem of allocations that do not occur in a 
proper process context. F.e. slab allocations are on behalf of the slab 
allocator and not on behalf of a process. Thus the cpuset and the memory 
policies should not influence that allocation. In that case we could have 
a special allocation_control structure for that context.

It would also get rid off all the xxx_node allocator variations.


--
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:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2006-09-12  8:51 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-09-12  2:28 A solution for more GFP_xx flags? Christoph Lameter
2006-09-12  2:44 ` Nick Piggin
2006-09-12  3:01   ` Christoph Lameter
2006-09-12  3:05     ` Peter Chubb
2006-09-12  3:07       ` Christoph Lameter
2006-09-12  3:11         ` Peter Chubb
2006-09-12  5:32           ` Christoph Lameter
2006-09-12  6:16 ` Paul Jackson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox