From mboxrd@z Thu Jan 1 00:00:00 1970 From: debiandev@gmail.com (Andev) Date: Wed, 4 Jun 2014 15:02:02 -0400 Subject: How to test a syscall prior to compiling the kernel In-Reply-To: References: <20140604035223.GA28272@kroah.com> <20140604041935.GB30014@kroah.com> <20857.1401904575@turing-police.cc.vt.edu> Message-ID: To: kernelnewbies@lists.kernelnewbies.org List-Id: kernelnewbies.lists.kernelnewbies.org On Wed, Jun 4, 2014 at 2:33 PM, Andev wrote: > On Wed, Jun 4, 2014 at 1:56 PM, wrote: >> >> The trick to remember is that you probably don't want to use the ramdisk >> as the permanent host, so... >> >> 1) Setup your git tree on permanent storage >> 2) Set up your ramdisk >> 3) cd /my/source/tree >> 4) tar -c --exclude=.git -f - . | (cd /mnt/ramdisk && tar -xvf -) >> >> then cd /mnt/ramdisk and start building. Remember if you make changes to >> copy them back to /my/source/tree :) >> >> (The --exclude=.git will avoid copying about 900M onto the ramdisk. Skip that >> if you need the git history on the ramdisk for doing a bisect or similar) > > Thanks Valdis for the instructions. > > So I tried the following to mount a tmpfs > > $ sudo mount -t tmpfs -o size=2000m tmpfs ./ramlinux/ > $ tar -c --exclude=.git -f - . | (cd ~/ramlinux && tar -xvf -) > > And it works fine. I am not sure if tmpfs has any advantages over ramdisk. > So I might have jumped the bullet on saying that it works fine. I see no difference between the compilation speed on native disk vs tmpfs. For a defconfig this is the time I get: real 6m35.407s user 10m3.734s sys 1m0.514s I have 4 gigs RAM and as mentioned earlier I created a 2 gig tmpfs and disabled swap. What am I missing? $ df -Ph tmpfs 2.0G 913M 1.1G 46% /home/andev/ramlinux -- Andev