Re: [RFC PATCH v2] SLUB: enhance slub to handle memory nodes without normal memory

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 24 Jul 2012, Jiang Liu wrote:

>
> diff --git a/mm/slub.c b/mm/slub.c
> index 8c691fa..3976745 100644
> --- a/mm/slub.c
> +++ b/mm/slub.c
> @@ -2803,6 +2803,17 @@ static inline int alloc_kmem_cache_cpus(struct kmem_cache *s)
>
>  static struct kmem_cache *kmem_cache_node;
>
> +static bool node_has_normal_memory(int node)
> +{
> +	int i;
> +
> +	for (i = ZONE_NORMAL; i >= 0; i--)
> +		if (populated_zone(&NODE_DATA(node)->node_zones[i]))
> +			return true;
> +
> +	return false;
> +}

There is already a N_NORMAL_MEMORY node map that contains a list of node
that have *normal* memory usable by slab allocators etc. I think the
cleanest solution would be to clear the corresponding node bits for your
special movable only zones. Then you wont be needing to modify other
subsystems anymore.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]