From: Rusty Russell <rusty@rustcorp.com.au>
To: Ingo Molnar <mingo@kernel.org>
Cc: Ingo Molnar <mingo@redhat.com>,
x86@kernel.org, LKML <linux-kernel@vger.kernel.org>,
anton@samba.org, Arnd Bergmann <arnd@arndb.de>,
KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>,
Mike Travis <travis@sgi.com>,
Thomas Gleixner <tglx@linutronix.de>,
Linus Torvalds <torvalds@linux-foundation.org>,
Al Viro <viro@zeniv.linux.org.uk>
Subject: Re: [PULL] cpumask: finally make them variable size w/ CPUMASK_OFFSTACK.
Date: Thu, 10 May 2012 09:59:12 +0930 [thread overview]
Message-ID: <87fwb8dgkn.fsf@rustcorp.com.au> (raw)
In-Reply-To: <20120509084453.GA6429@gmail.com>
On Wed, 9 May 2012 10:44:53 +0200, Ingo Molnar <mingo@kernel.org> wrote:
>
> * Rusty Russell <rusty@rustcorp.com.au> wrote:
>
> > Hi Ingo,
> >
> > I finally rebased this on top of your tip tree, and tested it
> > locally. Some more old-style cpumask usages have crept in, but it's a
> > fairly simple series.
>
> Cool! Most of it looks pretty sane. I have a question about the
> gist of the series:
>
> > commit 898eb73305e2277be91b931c5a75484f8c87ae36
> > Author: Rusty Russell <rusty@rustcorp.com.au>
> > Date: Wed May 9 15:01:15 2012 +0930
> >
> > cpumask: remove struct cpumask definition when CONFIG_CPUMASK_OFFSTACK=y
> >
> > We're about to change CONFIG_CPUMASK_OFFSTACK so it only allocate
> > nr_cpu_ids bits for all cpumasks. We need to make sure that when
> > CONFIG_CPUMASK_OFFSTACK is set:
> >
> > 1) Noone uses the old bitmap ops, which use NR_CPUS bits (use cpumask_*)
> > 2) Noone uses assignment of struct cpumask (use cpumask_copy)
> > 3) Noone passes a struct cpumask (pass a pointer)
> > 4) Noone declares them on the stack (use cpumask_var_t)
> >
> > So we finally remove the definition of struct cpumask when
> > CONFIG_CPUMASK_OFFSTACK=y. This means that these usages will hit a compile
> > error the moment that config option is turned on.
> >
> > Note that it also means you can't declare a static cpumask. You
> > should avoid this anyway (use cpumask_var_t), but there's a
> > deliberately-ugly workaround for special cases, using DECLARE_BITMAP()
> > and to_cpumask().
> >
> > Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
> > Cc: Arnd Bergmann <arnd@arndb.de>
> > Cc: anton@samba.org
> > Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
> > Cc: Mike Travis <travis@sgi.com>
>
> Is there any good reason to not remove it altogether, regardless
> of whether the OFFSTACK config is set? I mean, triggering build
> failures for a relatively rarely turned on config option is
> asking for constant maintenance trouble.
Mainly because I didn't want to disturb the archs which don't care at
all about large cpumasks. After all, putting a struct cpumask on the
stack is pretty convenient.
But we could add a new arch config which removes it, and set it from
x86.
Cheers,
Rusty.
next prev parent reply other threads:[~2012-05-10 1:10 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-09 6:10 [PULL] cpumask: finally make them variable size w/ CPUMASK_OFFSTACK Rusty Russell
2012-05-09 8:44 ` Ingo Molnar
2012-05-10 0:29 ` Rusty Russell [this message]
2012-05-10 7:42 ` Ingo Molnar
2012-05-14 3:22 ` Rusty Russell
2012-05-10 1:32 ` KOSAKI Motohiro
2012-05-10 2:16 ` Rusty Russell
2012-05-10 2:43 ` KOSAKI Motohiro
2012-05-10 4:54 ` Rusty Russell
2012-05-10 6:42 ` KOSAKI Motohiro
2012-05-14 2:58 ` Rusty Russell
2012-05-15 1:38 ` KOSAKI Motohiro
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87fwb8dgkn.fsf@rustcorp.com.au \
--to=rusty@rustcorp.com.au \
--cc=anton@samba.org \
--cc=arnd@arndb.de \
--cc=kosaki.motohiro@jp.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
--cc=travis@sgi.com \
--cc=viro@zeniv.linux.org.uk \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox