From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id F36B5C433DF for ; Sun, 31 May 2020 08:17:09 +0000 (UTC) Received: from shelob.surriel.com (shelob.surriel.com [96.67.55.147]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A6D612070B for ; Sun, 31 May 2020 08:17:09 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A6D612070B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=vt.edu Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kernelnewbies-bounces@kernelnewbies.org Received: from localhost ([::1] helo=shelob.surriel.com) by shelob.surriel.com with esmtp (Exim 4.93) (envelope-from ) id 1jfJ9B-0003zv-7t; Sun, 31 May 2020 04:16:45 -0400 Received: from omr2.cc.ipv6.vt.edu ([2607:b400:92:8400:0:33:fb76:806e] helo=omr2.cc.vt.edu) by shelob.surriel.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.93) (envelope-from ) id 1jfJ99-0003zm-CC for kernelnewbies@kernelnewbies.org; Sun, 31 May 2020 04:16:43 -0400 Received: from mr1.cc.vt.edu (mr1.cc.vt.edu [IPv6:2607:b400:92:8300:0:31:1732:8aa4]) by omr2.cc.vt.edu (8.14.4/8.14.4) with ESMTP id 04V8GfFf030764 for ; Sun, 31 May 2020 04:16:42 -0400 Received: from mail-qk1-f197.google.com (mail-qk1-f197.google.com [209.85.222.197]) by mr1.cc.vt.edu (8.14.7/8.14.7) with ESMTP id 04V8GaFV029836 for ; Sun, 31 May 2020 04:16:41 -0400 Received: by mail-qk1-f197.google.com with SMTP id m29so5437442qkm.17 for ; Sun, 31 May 2020 01:16:41 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:in-reply-to:references :mime-version:content-transfer-encoding:date:message-id; bh=VthN81z8X5Wy2UfOhrlm1joPkfmP0DgWOFyf22SPGbo=; b=lR4DS1LNb9doWxsUyg5RX8fgt0v7MUdsUKRUa/50wFNNMiWxfNBckLVBPtxZG2OvWK 7l+N/ieiFKmJ9bzrZIMM/vziQ9ZvOAm4oizeSJqQJ1jTpu9oVhPAXij3g0MrTKKQOVt/ 9n9aY8s30XzSHqQoREGbmdYZemWGYBuv0gWem2RapxTL3WkuKcUtVlnKVBy+EdSUjMF4 xOVkI9nTVZW+/HiPZQxJS76RUulG7+eeX2Jgz/3ThBI0O0tEy36j2bZgFGbpraIA/1Ma gKCN1kasF48M0MIyBN4awWUczn/HLlu8fmBxm4umj6BaXHjzSn1LRQ26TvLfcGmJaRht f2Nw== X-Gm-Message-State: AOAM532xdFFiY++VbXg0UlX/0kyKf+jmWlnZblkOHkurBmy8AVVJRLGF PFCr4PuYL1ZAXrS9XJWZ2Z4nUxNv887wrQhZYfVKQ7JGMUUhXhg54j+6IuptpD5BqLo1pZZbDS0 ZNR3+mj0fbjQRl3eb1IXMhO9Wgsg+DwT5a9M3uP0= X-Received: by 2002:ac8:a45:: with SMTP id f5mr13923006qti.116.1590912996544; Sun, 31 May 2020 01:16:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyeEuhmmflqhTCWhVxn3eScRMej8hMSpmAjmi/AOSo2ntOX5ISPuLa+jJG2WQ/YACsPf2juEg== X-Received: by 2002:ac8:a45:: with SMTP id f5mr13922984qti.116.1590912996180; Sun, 31 May 2020 01:16:36 -0700 (PDT) Received: from turing-police ([2601:5c0:c001:c9e1::359]) by smtp.gmail.com with ESMTPSA id w68sm11369482qkc.68.2020.05.31.01.16.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 31 May 2020 01:16:34 -0700 (PDT) From: "Valdis Kl=?utf-8?Q?=c4=93?=tnieks" X-Google-Original-From: "Valdis Kl=?utf-8?Q?=c4=93?=tnieks" X-Mailer: exmh version 2.9.0 11/07/2018 with nmh-1.7+dev To: Harsh chopra Subject: Re: Computing resources required for kernel development In-Reply-To: References: Mime-Version: 1.0 Date: Sun, 31 May 2020 04:16:33 -0400 Message-ID: <32604.1590912993@turing-police> Cc: kernelnewbies@kernelnewbies.org X-BeenThere: kernelnewbies@kernelnewbies.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Learn about the Linux kernel List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: multipart/mixed; boundary="===============3915561879570918377==" Errors-To: kernelnewbies-bounces@kernelnewbies.org --===============3915561879570918377== Content-Type: multipart/signed; boundary="==_Exmh_1590912993_23433P"; micalg=pgp-sha1; protocol="application/pgp-signature" Content-Transfer-Encoding: 7bit --==_Exmh_1590912993_23433P Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On Sat, 30 May 2020 20:56:21 +0530, Harsh chopra said: > I have been following the Kernel Hacking steps to submit my first patch= but > I am facing problem in the kernel compilation as its taking more than a= day > may be due to low computing resources.. On a Raspberry Pi 4 with 4G of RAM, overclocked to 2Ghz, and using a 256G= USB3 SSD as the system disk instead of an SD card, a 'make allmodconfig' has t= o build 28,302 .o files and from a tree that had a 'make clean', a 'make' t= akes: real 585m58.387s user 537m15.917s sys 65m59.296s Note that the RPi4 has 4 cores, so a 'make -j4' will go even faster, but = you will need a case that provides cooling for the CPU/GPU, especially if overclocked. (And just a few days ago, the RPi crew dropped a new firmwar= e that allows booting straight from a USB device, so no SD card is needed at all= ) Meanwhile, a config for my laptop that's been somewhat minimized by using 'make localmodconfig' only has to build 4,996 .o files (and I could= probably trim that back a whole bunch), which makes kernel builds about 8 times fa= ster than an 'allmodconfig' :) How to: Step 1 - boot a current kernel. Step 2 - plug in any and all USB disks, cameras, keyboards/mice and anyth= ing else that you might have, so their drivers get loaded. Make sure that you= get everything, because if you miss something, the device won't work because = there won't be a driver. Step 3 - cd to wherever you're doing your kernel builds Step 4 - 'make localmodconfig' Step 5 - make and install your new kernel config. Note that if you're doing patches for code in modules you don't have load= ed, you may need to go do 'make menuconfig' to enable building the the module.=20 > I have Ubuntu 20.04 LTS with 4GB DDR3 ram 1 TB HDD, Intel i3 2.GHZ an= d 4 > cores but I have been using virt-manager for the kernel development wit= h > CentOS 8.1 (minimal req.) and resources 70 GB storage, 2 GB ram and 2 > cores. That's not that much different from the RPi I mentioned above except for = the HDD rather than an SSD. Note that even a smaller SSD for just your kerne= l source will get you most of the bang for your buck, because gcc, the most= heavily used *.h files, and other stuff like that should remain in memory= so after the first few modules are compiled, pretty much all your disk I/O i= s for *.c files from the source tree. And although USB3 is preferable, you'll= get a speedup even if you only have USB2 ports available. > Thus if anyone could suggest how much computing power to have or any ot= her > method so that I could make my development process smooth. Work smarter, not harder. The two biggest things you can do to speed things up are getting an SSD f= or your system disk, and 'localmodconfig' to minimize the amount of extraneo= us stuff you have to build. The SSD may be more money than you're willing to spend, but the other suggestion is essentially free. --==_Exmh_1590912993_23433P Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Comment: Exmh version 2.9.0 11/07/2018 iQIVAwUBXtNn4AdmEQWDXROgAQLvOA//XaB/nNJgYgH1/Oh0lujzDFgBuv+SGXCM 4K+LNQGCqBvI1cDwQoQkYH/QxvidG9+dY4anA2vlACnhXEY3OSwz6zee3bF6NX5F OBQ6k97SkZtVtAnHKGka0CwwDJgkwjUs9PAPTUlCEgNiasZoTYkjSKlhCTDsjCe7 FtyfSkTqStJ7dkkayafeaIF3pB4JlVuHcpbOlPBM4bahbdjn0Huun5WcfLMfKqbT FSV5oZekm0WlDO3kT5muif7TSSgFW7N8hwATViWZo6Z1e9BeKD+jg32gGZfvlIux twbJ0GdJalwKa86w4K2gc3l36RubXdastWUXVWY7FCGGt1Ue7OVMAAHw4R5UshMz 0kkuflnbtXrt1yAiM6ky8mJRgTXuUc+M3Sz6gHf70qHMJVbgHyMoyWZcGDN4js6S B6E+SoObcVMXF5+boN+j8NGzdw/so2VkLa/SzpARot7vezOTZbilbeALWa+reO/V fhUMJi77noTS1A7ryr+kKozazEpqZOXSTxL4RcNwx99eJrroMqQeyNzBRSFMWqn5 NLHL9ZQF9DlQuvn/gIOWhlgfM4mY+EZhKXY2KSn6sbpdY6bdHKdhcLMK3iwdk7XF Xwy2ZO46pQLrMjnfBExYdJKh+ecuUqCPwyDFcYS7clR+L9WCtIqJSsqgJGLT5bFW nxCHabzRycQ= =CjCT -----END PGP SIGNATURE----- --==_Exmh_1590912993_23433P-- --===============3915561879570918377== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies --===============3915561879570918377==--