lkml.org 
[lkml]   [2005]   [Sep]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 0/3] netfilter : 3 patches to boost ip_tables performance
On Thu, Sep 22, 2005 at 02:11:26PM +0200, Eric Dumazet wrote:
> +#ifdef CONFIG_NUMA
> +/**
> + * vmalloc_node - allocate virtually contiguous memory
> + *
> + * @size: allocation size
> + * @node: preferred node
> + *
> + * This vmalloc variant try to allocate memory from a preferred node.
> + */
> +void *vmalloc_node(unsigned long size, int node)
> +{
> + void *result;
> + struct mempolicy *oldpol = current->mempolicy;
> + mm_segment_t oldfs = get_fs();
> + DECLARE_BITMAP(prefnode, MAX_NUMNODES);
> +
> + mpol_get(oldpol);
> + bitmap_zero(prefnode, MAX_NUMNODES);
> + set_bit(node, prefnode);
> +
> + set_fs(KERNEL_DS);
> + sys_set_mempolicy(MPOL_PREFERRED, prefnode, MAX_NUMNODES);
> + set_fs(oldfs);
> +
> + result = vmalloc(size);
> +
> + mpol_free(current->mempolicy);
> + current->mempolicy = oldpol;
> + return result;
> +}

No way, sorry. If you want a vmalloc node do it right.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-09-22 14:52    [W:0.062 / U:0.596 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site