Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 36AC42AD16 for ; Wed, 17 Sep 2025 03:58:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758081484; cv=none; b=EteB4EFYtxOchyj/qGJ6SxSKclyMwdd5at4vHFvYwHdlkvjEkOYgl2C/93hwJzbw3/BO27YLbwy9f35drIlfHwDp67edAyXRI4lQmyTkNpjjWJcbs0+nE8KmpGMPLTVw9Lx+NHQilaaYsVnE5OtENNdvX2HAAHABxNjdRuXlqCo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758081484; c=relaxed/simple; bh=hq+n+nCjvNnnTcOFDCEIDj00mtycOYfXHii1lLDVUd0=; h=Message-ID:Date:MIME-Version:Subject:To:References:From: In-Reply-To:Content-Type; b=tFQVeQdmDfAWW+Q6HfwH+MyKRaN2+bZqJlArTUwrB7g+x04dpA+7EOhmcWjO1B37OKOk8CSn/COXewz+Gb7UJgAPVy2w8cy0f6oUOHkOKguEXInmk3f+SNKyrdFL5/bIJWEBvCmFO2UiIIASALbdLlbQ+yDMwArI9KLcrTGVrdo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=SYuFq1LF; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="SYuFq1LF" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 904B6C4CEF0; Wed, 17 Sep 2025 03:58:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1758081482; bh=hq+n+nCjvNnnTcOFDCEIDj00mtycOYfXHii1lLDVUd0=; h=Date:Subject:To:References:From:In-Reply-To:From; b=SYuFq1LF7+KLFtW60qBn6XLME5aA6nBEAdv0o1WbB1nvrKyfOaGdT7XqZ1RgEiz5D jE1BUUQqvBW0UhbVkzDDjb4muJzG0KBb175VDT4H9Olu8tEwV6eDIsNO90Y5dXmPz/ 1U0gw/K4kF7okV8hktgcxhReD+fICA9D/u/GnCLZeBcgB7gvqChgtT8aUaVcurw/Sw ju6q/XoPKNUnvyTPa7Un7CfQwshdYZxcGy693IcHnRndZ3BhdB5anA0Yqx78sYvT0q ceQ9SIBo/bhpXb9Hz00+PuyfXed0oEEAEpm0hFRPEBKPTvVVY4arERmd/XQjxjCtL9 OJRkJeSiDrXFw== Message-ID: <9899f6c3-6418-476b-98e3-5ee7825ebbe3@kernel.org> Date: Tue, 16 Sep 2025 20:58:01 -0700 Precedence: bulk X-Mailing-List: kdevops@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v4 3/8] aws: add optimized Kconfig generator using Chuck's scripts To: Luis Chamberlain , Daniel Gomez , kdevops@lists.linux.dev References: <20250917003451.2318229-1-mcgrof@kernel.org> <20250917003451.2318229-4-mcgrof@kernel.org> Content-Language: en-US From: Chuck Lever Organization: kernel.org In-Reply-To: <20250917003451.2318229-4-mcgrof@kernel.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 9/16/25 5:34 PM, Luis Chamberlain wrote: > Create a wrapper script that orchestrates Chuck's existing AWS scripts > (ec2_instance_info.py, aws_regions_info.py, aws_ami_info.py) to generate > Kconfig files with JSON caching and parallel processing. > > This approach leverages Chuck's already working scripts while adding: > - JSON caching with 24-hour TTL in ~/.cache/kdevops/aws/ > - Parallel fetching of instance data (10 concurrent workers) > - Parallel file writing (20 concurrent workers) > - Proper data structure handling for families list > > Performance improvements: > - First run: ~21 seconds to fetch all data from AWS > - Cached runs: ~0.04 seconds (525x faster) > - Generates 75 Kconfig files for 72 instance families > > The script properly uses Chuck's existing AWS API implementations > rather than reimplementing them, maintaining code reuse and consistency. > > Generated-by: Claude AI > Signed-off-by: Luis Chamberlain I've got a slightly different approach in mind, but same goal: make these scripts fast. Great minds think alike! After working with my scripts a bit, it seems like we really don't need the JSON intermediate step. It made sense when getting output from the CLI, but the response from the boto3 client is truly enough to assemble the Kconfig menus directly. Building the instance types is what seems to take the longest because the script repeatedly does a describe_instance_types and the response to that is HUGE. But we can do that once at the top of the script, and simply use the same response as often as needed. The use case seems to be "build the Kconfig menus" and then use them for a while. So we have the 21 second first run, but I'm not yet seeing a benefit to caching -- why rebuild the menus again if your input data is going to remain exactly the same for 24 hours? Let me know if I've misunderstood. And, I now agree it makes sense to get rid of the menu subdirectories. Sourcing the little files doesn't seem to add any value. My new scripts construct one large locations menu and one large compute menu. -- Chuck Lever