From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.archlinux.org (mail.archlinux.org [95.216.189.61]) by sourceware.org (Postfix) with ESMTPS id 2BA543858D1E for ; Wed, 29 Mar 2023 21:32:19 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 2BA543858D1E Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=archlinux.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=archlinux.org X-Gm-Message-State: AAQBX9ddKoAgfDWNPcM4EyuGcuMR8U3rILqJeZkcx3+ULd+LsR6Jfbv6 3PgQtR5YubPOUWrNFdET/FHdJdtBX/XEKzmsnrI= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=archlinux.org; s=dkim-rsa; t=1680125537; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=EYfERoEnYPKvnjBel76RoHa4O2cLIAm5fN5uhogxr+Q=; b=zkRp5CKHmoE3JOp6DDw55pVpG98nOoT22EIkOmgX04bRDENLhpZPWMP3EzgnGMJvX9rKOk YZchE61ZebBHBee2ocn5Q5WqxzHrBuMPfDaNjmc3B8POculsrHnexCYgXKwsNY7VfRwqDn pcPSjFjHLXkGPan7oGWAHrXn+6wRa3mClIKkg3T6G8VsJuz0+m4e/U1jo3MJkKzREEln1Q 0Slipt8qepuN38txu4B93wRj2To7/WTtAKNABt77o+RKyA1zQJ2+PjvPlctoWbWa4j9zko xcDMOkIMmqTRW5I8mPN8ekkEXPN8ObN9PGMHyyjStTs5SZU30BPmlT/73G9QnDoO3xlBcs HSpwDZFSiF5T60P8TuUPA/f6qDcYSUkUJMhi2aCMoD40lbahsBk8hnKJskeVWbAxheRPFy VDHiDv1qAajP36G4TugsZaS9jyJ8hXIjrQTgYJFLSV7o2bA3LVf1lhSRKZal5AwIDJx+uL AsNWN4Xip7hYdLWVuA43iNSBHB2zmXkVvHttzKCfpEUz3/8RaqsGmBhILzuaweZaDg9LFq +b5J55mSKdftfdwbfGea0j7B4EgqH7oXSy8qjYSMFe3+4u9OBKf7KvqaNncUoFUZRwEIOD mCQtLJWcZBaWozBBntG41Z5+btQrGcE2vNc30prUrCmDuwWdGFZmE= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=archlinux.org; s=dkim-ed25519; t=1680125537; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=EYfERoEnYPKvnjBel76RoHa4O2cLIAm5fN5uhogxr+Q=; b=O5XzR3fKisUVcBVuDxbyfUlK1z40a2CoU3hnOxbNSRR4wnVpPH0NvCcE4VbAOjGRYI1DHW Dnu36RunBu+nz7BQ== Authentication-Results: mail.archlinux.org; auth=pass smtp.auth=heftig smtp.mailfrom=heftig@archlinux.org X-Google-Smtp-Source: AKy350bHh/fDQduUqqP486H6nZgZEXX6U6otrc6P2bGK4Q4DbjgsHeCqcL0W0kbFVy9DPM3yacpAJayG4tTffKiVu9Y= X-Received: by 2002:a17:90a:d684:b0:23b:517d:beca with SMTP id x4-20020a17090ad68400b0023b517dbecamr6484005pju.0.1680125535912; Wed, 29 Mar 2023 14:32:15 -0700 (PDT) MIME-Version: 1.0 References: <20230324004805.156080-1-heftig@archlinux.org> <20230324004805.156080-3-heftig@archlinux.org> <20230329205453.GE30778@redhat.com> In-Reply-To: <20230329205453.GE30778@redhat.com> From: "Jan Alexander Steffens (heftig)" Date: Wed, 29 Mar 2023 23:32:04 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 3/3] debuginfod: When retrieving files from cache, update atime manually To: "Frank Ch. Eigler" Cc: elfutils-devel@sourceware.org Content-Type: multipart/alternative; boundary="000000000000bf0a7005f810b5c0" X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,HTML_MESSAGE,SPF_HELO_PASS,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: --000000000000bf0a7005f810b5c0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, Mar 29, 2023 at 10:54=E2=80=AFPM Frank Ch. Eigler = wrote: > Hi - > > > The cache cleaning logic requires atime to be correct (strictatime) but > > most users on Linux only have relatime or even noatime. > > This is not really correct: relatime is the kernel default and works > fine with the cache. atime values updated once a day are still plenty > for caches with a multi-day preservation default. > Ah, I didn't know about the one-day threshold. So that means only noatime is actually affected. > > > Attempt to update the atime manually so that the cache works properly. > > Has this been observed to work on noatime-mounted filesystems? It's > at worst harmless so we could merge it, but it's kind of weird. Do > you know such precedents in other software that consumes atime? > Yes, I have a noatime-mounted btrfs (because with snapshots, relatime can cause entire directory trees to get copied-on-write) and with this patch series the cache seems to work properly. Without it it is pretty broken, immediately evicting files that were just downloaded. The only software I know of that uses atime is mutt, although I have never used it myself. Looking through the source of mutt and neomutt on GitHub shows that they use the same approach: https://github.com/muttmua/mutt/blob/1066be975f284ce6fdbb00a4e41b1738d52887= d0/muttlib.c#L2204-L2212 (mutt muttlib.c:2204) https://github.com/neomutt/neomutt/blob/d13dd3bb912d93f73dd4dd2d476e1c37d31= a8422/mutt/file.c#L1062-L1075 (neomutt mutt/file.c:1062) --000000000000bf0a7005f810b5c0--