From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id 8IE6A+lc31/zEQAA0tVLHw (envelope-from ) for ; Sun, 20 Dec 2020 14:17:13 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id 2HCpOuhc319NagAA1q6Kng (envelope-from ) for ; Sun, 20 Dec 2020 14:17:12 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 5A50A9403D5 for ; Sun, 20 Dec 2020 14:17:12 +0000 (UTC) Received: from localhost ([::1]:56776 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kqzWI-00043k-W8 for larch@yhetil.org; Sun, 20 Dec 2020 09:17:11 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:50664) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kqzWA-00041h-AA for guix-patches@gnu.org; Sun, 20 Dec 2020 09:17:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:60628) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kqzWA-0000w1-2H for guix-patches@gnu.org; Sun, 20 Dec 2020 09:17:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kqzW9-0005FR-U6 for guix-patches@gnu.org; Sun, 20 Dec 2020 09:17:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#45327] [PATCH] git: Periodically delete least-recently-used cached checkouts. Resent-From: Guillaume Le Vaillant Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 20 Dec 2020 14:17:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 45327 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Received: via spool by 45327-submit@debbugs.gnu.org id=B45327.160847379520132 (code B ref 45327); Sun, 20 Dec 2020 14:17:01 +0000 Received: (at 45327) by debbugs.gnu.org; 20 Dec 2020 14:16:35 +0000 Received: from localhost ([127.0.0.1]:43941 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kqzVi-0005Ed-Ks for submit@debbugs.gnu.org; Sun, 20 Dec 2020 09:16:34 -0500 Received: from mout01.posteo.de ([185.67.36.65]:49215) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kqzVg-0005EN-Th for 45327@debbugs.gnu.org; Sun, 20 Dec 2020 09:16:33 -0500 Received: from submission (posteo.de [89.146.220.130]) by mout01.posteo.de (Postfix) with ESMTPS id 67F13160063 for <45327@debbugs.gnu.org>; Sun, 20 Dec 2020 15:16:26 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1608473786; bh=p+IiPmUXxoIl922Y/kfvQ4rcws9zlQCCZQ9MIXka4AI=; h=From:To:Cc:Subject:Date:From; b=Merq4Ibe83iQTEAO50zjNPTvfY9r44pF4oI5zVpXs6EX5+AWvTD/yTrro/uRDv1Gs ow/1ZwIa6lomAFwwxGl3efISuuqOkwdNHeWvWpmUG+WEb5sTF6THj6tlUI5AdXDmXa sxzwC/ZVC/FFwqtaWFiQhYvP7zneSubB88FB9IxnXEP4fOG/vEkkSoxTThCj1wjmOh 6hxPMcCvMDz6/IioZR6/zjW2vqAD/3iA6bUQLgADpg0gD32yY0XZsIWKB+acBdzR/D MfqBNTHeBKaICuMaKBg3yBTeqgEoMmVho+tDrrDxHhBBquBtSNCRMNwZJoDc6SSVhz 0bxBk7Gpqf2uQ== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4CzPm93m8Bz6tmB; Sun, 20 Dec 2020 15:16:25 +0100 (CET) References: <20201219220630.24605-1-ludo@gnu.org> <87pn34n4ab.fsf@yamatai> <87eejk8u8u.fsf@gnu.org> User-agent: mu4e 1.4.13; emacs 27.1 From: Guillaume Le Vaillant In-reply-to: <87eejk8u8u.fsf@gnu.org> Date: Sun, 20 Dec 2020 15:16:22 +0100 Message-ID: <87mty8mukp.fsf@yamatai> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: 45327@debbugs.gnu.org Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -2.82 Authentication-Results: aspmx1.migadu.com; dkim=fail (headers rsa verify failed) header.d=posteo.net header.s=2017 header.b=Merq4Ibe; dmarc=fail reason="SPF not aligned (strict)" header.from=posteo.net (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: 5A50A9403D5 X-Spam-Score: -2.82 X-Migadu-Scanner: scn1.migadu.com X-TUID: kb7OSvRkaK8y --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Ludovic Court=C3=A8s skribis: > Hi, > > Guillaume Le Vaillant skribis: > >> Ludovic Court=C3=A8s skribis: >> >>> Hi! >>> >>> I noticed that my ~/.cache/guix/checkouts directory had accumulated >>> a lot of cruft from channels, playing with =E2=80=98--with-branch=E2=80= =99 and such, >>> and that it would be nice to clean it up once in a while. >>> >>> This is what this patch does. It uses the (guix cache) default >>> strategy, which consists in deleting least-recently-used items by >>> looking at their atime. >>> >>> Thoughts? >> >> How does it behave when the cache is on a file system mounted with the >> 'noatime' option? > > I guess the worst that could happen is that checkouts are removed too > frequently (because the atime is not updated), meaning that users find > themselves making full clones more often than we=E2=80=99d like. > > Perhaps we could use the mtime instead, since when checkouts are > updated, the mtime is presumably updated too. > > Thoughts? > > Ludo=E2=80=99. I guess either using mtime or making Guix update the atime when using a cached checkout would work. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iIUEAREKAC0WIQTLxZxm7Ce5cXlAaz5r6CCK3yH+PwUCX99ctg8cZ2x2QHBvc3Rl by5uZXQACgkQa+ggit8h/j8WfwD/f/8ohoVqsuunW5+oz4nWVry826NaW4eAAeCN ymejEx8BAJiv/7/OyGR0WyDJXLa+79K6VkKbSz4LLZAm7Aj9dgG8 =A+Nf -----END PGP SIGNATURE----- --=-=-=--