All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thorsten Leemhuis <linux@leemhuis.info>
To: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
Cc: Greg KH <gregkh@linuxfoundation.org>,
	Randy Dunlap <rdunlap@infradead.org>,
	Lukas Bulwahn <lukas.bulwahn@gmail.com>,
	linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org,
	Jonathan Corbet <corbet@lwn.net>,
	Linux regressions mailing list <regressions@lists.linux.dev>
Subject: Re: [PATCH v1] docs: describe how to quickly build Linux
Date: Thu, 2 Feb 2023 16:36:59 +0100	[thread overview]
Message-ID: <ee3a168f-66e3-14a3-3890-90dc5c8153d1@leemhuis.info> (raw)
In-Reply-To: <20230202150856.lchr76nqih3vdul6@nitro.local>

On 02.02.23 16:08, Konstantin Ryabitsev wrote:
> On Thu, Feb 02, 2023 at 12:15:36PM +0100, Linux kernel regression tracking (Thorsten Leemhuis) wrote:
>> Then I tried creating a shallow clone like this:
>>
>> git clone
>> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
>> --depth 1 -b v6.1
>> git remote set-branches --add origin master
>> git fetch --all --shallow-exclude=v6.1
>> git remote add -t linux-6.1.y linux-stable
>> https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
>> git fetch --all --shallow-exclude=v6.1
>>
>> This took only roundabout 2 minutes and downloads & stores ~512 MByte
>> data (without checkout).
> 
> Can we also include the option of just downloading the tarball, if it's a
> released version? That's the fastest and most lightweight option 100% of the
> time. :)

Don't worry, that was in there and will stay in there:

+   If you plan to only build one particular kernel version, download
its source
+   archive from https://kernel.org; afterwards extract its content to
'~/linux/'
+   and change into the directory created during extraction.
>> Not totally sure, but the shallow clone somehow feels more appropriate
>> for the use case (reminder, there is a "quickly" in the document title),
>> even if such a clone is less flexible (e.g. users have to manually add
>> stable branches they are interested it; and they need to be careful when
>> using git fetch).
>>
>> That's why I now strongly consider using the shallow clone method by
>> default in v2 of this text. Or does that also create a lot of load on
>> the servers? Or are there other strong reason why using a shallow clone
>> might be a bad idea for this use case?
> 
> As I mentioned elsewhere, this is only a problem when it's done in batch mode
> by CI systems. A full clone uses pregenerated pack files and is very cheap,
> because it's effectively a sendfile operation. A shallow clone requires
> generating a brand new pack, compressing it, and then keeping it around in
> memory for the duration of the clone process. Not a big deal when a few humans
> here and there do it, but when 50 CI nodes do it all at once, it effectively
> becomes a DDoS. :)

Thx again for your insights, much appreciated.

Ciao, Thorsten

  reply	other threads:[~2023-02-02 15:37 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-01 11:52 [PATCH v1] docs: describe how to quickly build Linux Thorsten Leemhuis
2023-02-01 12:42 ` Greg KH
2023-02-01 12:44   ` Greg KH
2023-02-01 13:22     ` Thorsten Leemhuis
2023-02-01 14:02       ` Greg KH
2023-02-02 11:15 ` Linux kernel regression tracking (Thorsten Leemhuis)
2023-02-02 14:27   ` Greg KH
2023-02-02 14:57     ` Thorsten Leemhuis
2023-02-02 15:08   ` Konstantin Ryabitsev
2023-02-02 15:36     ` Thorsten Leemhuis [this message]
2023-02-03  9:44       ` Jani Nikula
2023-02-03  9:52         ` Thorsten Leemhuis
2023-02-10 11:38   ` Thorsten Leemhuis
2023-02-10 13:55     ` Konstantin Ryabitsev
2023-02-25  9:17 ` Pavel Machek
2023-02-25  9:29   ` Thorsten Leemhuis
2023-02-25 13:34     ` Thorsten Leemhuis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ee3a168f-66e3-14a3-3890-90dc5c8153d1@leemhuis.info \
    --to=linux@leemhuis.info \
    --cc=corbet@lwn.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=konstantin@linuxfoundation.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lukas.bulwahn@gmail.com \
    --cc=rdunlap@infradead.org \
    --cc=regressions@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.