[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2E525E4A-66DC-45F9-B93B-4086668F7B02@akamai.com>
Date: Fri, 11 Sep 2015 11:17:30 +0000
From: "Baron, Jason" <jbaron@...mai.com>
To: Johannes Berg <johannes@...solutions.net>
CC: Peter Zijlstra <peterz@...radead.org>,
linux-kernel <linux-kernel@...r.kernel.org>
Subject: Re: static key arrays?
Hi,
Perhaps a bit wasteful, but I think you could have 2 arrays- an all true one and an all false one. And then just pick the right one at compile time? This also needs to be addressed for sched_feat() as well...
Thanks,
-Jason
> On Sep 11, 2015, at 5:46 AM, Johannes Berg <johannes@...solutions.net> wrote:
>
> Hi Peter, Jason, all,
>
> Per the recent type-safe API changes, it's no longer easy to generate
> an array of static keys. I was planning to do that for a set of very
> unlikely debug options.
>
> It sounds like you're planning to remove the previous API entirely at
> some point, so I'm wondering if you've given any thought to this
> possibility.
>
> I briefly played with the idea of adding a macro for that, but the
> necessary "REPEAT(n, d)" macro for the initialisation becomes ugly
> pretty quickly and, afaict, needs to have enough macros for the maximum
> expected numbers.
>
> For the case I was looking at it's static_key_false so a zero
> -initialized array would be sufficient, but that can't be done easily
> with a static_key_true.
>
> johannes
--
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