[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <200812081635.35166.rusty@rustcorp.com.au>
Date: Mon, 8 Dec 2008 16:35:34 +1030
From: Rusty Russell <rusty@...tcorp.com.au>
To: Avi Kivity <avi@...hat.com>
Cc: "kvm-devel" <kvm@...r.kernel.org>, linux-kernel@...r.kernel.org,
Mike Travis <travis@....com>
Subject: Re: [PATCH 2/2] kvm: use cpumask_var_t for cpus_hardware_enabled
On Monday 08 December 2008 02:25:50 Avi Kivity wrote:
> Rusty Russell wrote:
> > This changes cpus_hardware_enabled from a cpumask_t to a cpumask_var_t:
> > equivalent for CONFIG_CPUMASKS_OFFSTACK=n, otherwise dynamically allocated.
> >
> >
> > -static cpumask_t cpus_hardware_enabled;
> > +static cpumask_var_t cpus_hardware_enabled
>
> This isn't on stack, so it isn't buying us anything.
It's the CONFIG_NR_CPUS=4096 but nr_cpu_ids=4 case which we win using
dynamic allocation. Gotta love distribution kernels.
> Is the plan to drop cpumask_t?
Yes. And undefine 'struct cpumask' if CONFIG_CPUMASK_OFFSTACK. That
will stop assignment and on-stack declarations for all but the most
determined.
> If so, we're penalizing non-stack users
> by forcing them to go through another pointer (and cacheline).
Not quite. If !CONFIG_CPUMASK_OFFSTACK, cpumask_var_t == cpumask_t[1].
Blame Linus :)
Cheers,
Rusty.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists