linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] merge_config.sh: Use the first file as the initial config
@ 2012-02-01 17:01 Josh Boyer
  2012-02-02 20:14 ` John Stultz
  2012-03-24 22:26 ` Michal Marek
  0 siblings, 2 replies; 4+ messages in thread
From: Josh Boyer @ 2012-02-01 17:01 UTC (permalink / raw)
  To: John Stultz, Michal Marek; +Cc: kernel-team, linux-kernel

Take the first config fragment and use it verbatim as the initial config set.
This avoids running the verification loop for the first file, as nothing has
actually been merged at this point.  This significantly increases performance
for large config fragments.

Signed-off-by: Josh Boyer <jwboyer@redhat.com>
---

When experimenting with merge_config.sh on the Fedora config fragments, this
cut the execution time of a single invocation with all the config fragments
in half (from 28 seconds to 13 seconds).

 scripts/kconfig/merge_config.sh |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/scripts/kconfig/merge_config.sh b/scripts/kconfig/merge_config.sh
index ceadf0e..23d738a 100644
--- a/scripts/kconfig/merge_config.sh
+++ b/scripts/kconfig/merge_config.sh
@@ -58,12 +58,16 @@ while true; do
 	esac
 done
 
-
+INITFILE=$1
+shift;
 
 MERGE_LIST=$*
 SED_CONFIG_EXP="s/^\(# \)\{0,1\}\(CONFIG_[a-zA-Z0-9_]*\)[= ].*/\2/p"
 TMP_FILE=$(mktemp ./.tmp.config.XXXXXXXXXX)
 
+echo "Using $INITFILE as base"
+cat $INITFILE > $TMP_FILE
+
 # Merge files, printing warnings on overrided values
 for MERGE_FILE in $MERGE_LIST ; do
 	echo "Merging $MERGE_FILE"
-- 
1.7.8.4


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] merge_config.sh: Use the first file as the initial config
  2012-02-01 17:01 [PATCH] merge_config.sh: Use the first file as the initial config Josh Boyer
@ 2012-02-02 20:14 ` John Stultz
  2012-02-02 20:37   ` Darren Hart
  2012-03-24 22:26 ` Michal Marek
  1 sibling, 1 reply; 4+ messages in thread
From: John Stultz @ 2012-02-02 20:14 UTC (permalink / raw)
  To: Josh Boyer; +Cc: Michal Marek, kernel-team, linux-kernel, Darren Hart

On Wed, 2012-02-01 at 12:01 -0500, Josh Boyer wrote:
> Take the first config fragment and use it verbatim as the initial config set.
> This avoids running the verification loop for the first file, as nothing has
> actually been merged at this point.  This significantly increases performance
> for large config fragments.
> 
> Signed-off-by: Josh Boyer <jwboyer@redhat.com>
> ---
> 
> When experimenting with merge_config.sh on the Fedora config fragments, this
> cut the execution time of a single invocation with all the config fragments
> in half (from 28 seconds to 13 seconds).

Adding Darren to the CC.

Nice! Looks ok to me.

Acked-by: John Stultz <john.stultz@linaro.org>

>  scripts/kconfig/merge_config.sh |    6 +++++-
>  1 files changed, 5 insertions(+), 1 deletions(-)
> 
> diff --git a/scripts/kconfig/merge_config.sh b/scripts/kconfig/merge_config.sh
> index ceadf0e..23d738a 100644
> --- a/scripts/kconfig/merge_config.sh
> +++ b/scripts/kconfig/merge_config.sh
> @@ -58,12 +58,16 @@ while true; do
>  	esac
>  done
> 
> -
> +INITFILE=$1
> +shift;
> 
>  MERGE_LIST=$*
>  SED_CONFIG_EXP="s/^\(# \)\{0,1\}\(CONFIG_[a-zA-Z0-9_]*\)[= ].*/\2/p"
>  TMP_FILE=$(mktemp ./.tmp.config.XXXXXXXXXX)
> 
> +echo "Using $INITFILE as base"
> +cat $INITFILE > $TMP_FILE
> +
>  # Merge files, printing warnings on overrided values
>  for MERGE_FILE in $MERGE_LIST ; do
>  	echo "Merging $MERGE_FILE"



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] merge_config.sh: Use the first file as the initial config
  2012-02-02 20:14 ` John Stultz
@ 2012-02-02 20:37   ` Darren Hart
  0 siblings, 0 replies; 4+ messages in thread
From: Darren Hart @ 2012-02-02 20:37 UTC (permalink / raw)
  To: John Stultz; +Cc: Josh Boyer, Michal Marek, kernel-team, linux-kernel



On 02/02/2012 12:14 PM, John Stultz wrote:
> On Wed, 2012-02-01 at 12:01 -0500, Josh Boyer wrote:
>> Take the first config fragment and use it verbatim as the initial config set.
>> This avoids running the verification loop for the first file, as nothing has
>> actually been merged at this point.  This significantly increases performance
>> for large config fragments.
>>
>> Signed-off-by: Josh Boyer <jwboyer@redhat.com>
>> ---
>>
>> When experimenting with merge_config.sh on the Fedora config fragments, this
>> cut the execution time of a single invocation with all the config fragments
>> in half (from 28 seconds to 13 seconds).
> 
> Adding Darren to the CC.
> 
> Nice! Looks ok to me.
> 
> Acked-by: John Stultz <john.stultz@linaro.org>

Thanks Josh,

Acked-by: Darren Hart <dvhart@linux.intel.com>

> 
>>  scripts/kconfig/merge_config.sh |    6 +++++-
>>  1 files changed, 5 insertions(+), 1 deletions(-)
>>
>> diff --git a/scripts/kconfig/merge_config.sh b/scripts/kconfig/merge_config.sh
>> index ceadf0e..23d738a 100644
>> --- a/scripts/kconfig/merge_config.sh
>> +++ b/scripts/kconfig/merge_config.sh
>> @@ -58,12 +58,16 @@ while true; do
>>  	esac
>>  done
>>
>> -
>> +INITFILE=$1
>> +shift;
>>
>>  MERGE_LIST=$*
>>  SED_CONFIG_EXP="s/^\(# \)\{0,1\}\(CONFIG_[a-zA-Z0-9_]*\)[= ].*/\2/p"
>>  TMP_FILE=$(mktemp ./.tmp.config.XXXXXXXXXX)
>>
>> +echo "Using $INITFILE as base"
>> +cat $INITFILE > $TMP_FILE
>> +
>>  # Merge files, printing warnings on overrided values
>>  for MERGE_FILE in $MERGE_LIST ; do
>>  	echo "Merging $MERGE_FILE"
> 
> 

-- 
Darren Hart
Intel Open Source Technology Center
Yocto Project - Linux Kernel

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] merge_config.sh: Use the first file as the initial config
  2012-02-01 17:01 [PATCH] merge_config.sh: Use the first file as the initial config Josh Boyer
  2012-02-02 20:14 ` John Stultz
@ 2012-03-24 22:26 ` Michal Marek
  1 sibling, 0 replies; 4+ messages in thread
From: Michal Marek @ 2012-03-24 22:26 UTC (permalink / raw)
  To: Josh Boyer; +Cc: John Stultz, kernel-team, linux-kernel

On Wed, Feb 01, 2012 at 12:01:58PM -0500, Josh Boyer wrote:
> Take the first config fragment and use it verbatim as the initial config set.
> This avoids running the verification loop for the first file, as nothing has
> actually been merged at this point.  This significantly increases performance
> for large config fragments.
> 
> Signed-off-by: Josh Boyer <jwboyer@redhat.com>

Applied to kbuild.git#kconfig, thanks.

Michal

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-03-24 22:26 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-02-01 17:01 [PATCH] merge_config.sh: Use the first file as the initial config Josh Boyer
2012-02-02 20:14 ` John Stultz
2012-02-02 20:37   ` Darren Hart
2012-03-24 22:26 ` Michal Marek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).