 
	
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 08/13] xen: dynamically allocate cpu_evtchn_mask
 On 31/01/13 14:47, Wei Liu wrote:
> Signed-off-by: Wei Liu <wei.liu2@xxxxxxxxxx>
> ---
>  drivers/xen/events.c |   21 ++++++++++++++++++---
>  1 file changed, 18 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/xen/events.c b/drivers/xen/events.c
> index 4820a52..30ca620 100644
> --- a/drivers/xen/events.c
> +++ b/drivers/xen/events.c
[...]
> +     for_each_possible_cpu(cpu) {
> +             void *p;
> +             unsigned int nr = nr_event_channels / BITS_PER_LONG;
> +
> +             p = kzalloc_node(sizeof(unsigned long) * nr,
> +                              GFP_KERNEL,
> +                              cpu_to_node(cpu));
> +             if (!p)
> +                     p = kzalloc(sizeof(unsigned long) * nr,
> +                                 GFP_KERNEL);
kzalloc_node() will fallback to allocating from other nodes, no need to
try as well.
David
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
 | 
|  | Lists.xenproject.org is hosted with RackSpace, monitoring our |