Re: [PATCH 8/8] kconfig: implement KCONFIG_PROBABILITY for randconfig

From: Michal Marek
Date: Thu Apr 25 2013 - 04:57:35 EST


On 25.4.2013 00:29, Yann E. MORIN wrote:
> From: "Yann E. MORIN" <yann.morin.1998@xxxxxxx>
>
> Currently the odds to set each symbol is (rounded):
> booleans: y: 50% n: 50%
> tristates: y: 33% m: 33% n: 33%
>
> Introduce a KCONFIG_PROBABILITY environment variable to tweak the
> probabilities (in percentage), as such:
> KCONFIG_PROBABILITY y:n split y:m:n split
> -----------------------------------------------------------------
> [1] unset or empty 50 : 50 33 : 33 : 34
> [2] N N : 100-N N/2 : N/2 : 100-N
> N:M N+M : 100-(N+M) N : M : 100-(N+M)
> N:M:L N : 100-N M : L : 100-(M+L)

I did a naive test with the current kconfig branch and with
yem-kconfig-for-next:

$ git checkout a45c7df
$ echo CONFIG_MODULES=y >all.config
$ >test-orig; for i in `seq 1000`; do KCONFIG_ALLCONFIG=1 make
randconfig || break; grep -c '=m' .config >>test-orig; done
...
$ git checkout e43956e
$ >test-new; ...

$ awk '{ sum += $1; num++ } END { print sum / num}' test-orig
573.247
$ awk '{ sum += $1; num++ } END { print sum / num}' test-new
565.194

I am not a statistician, but this looks OK to me. For reference, the
figure was ~340 with the previous patch.

I pulled your changes to kbuild.git#kconfig.

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