From: "Jan Alexander Steffens (heftig)" <heftig@archlinux.org>
To: "Frank Ch. Eigler" <fche@redhat.com>
Cc: elfutils-devel@sourceware.org
Subject: Re: [PATCH 3/3] debuginfod: When retrieving files from cache, update atime manually
Date: Wed, 29 Mar 2023 23:32:04 +0200 [thread overview]
Message-ID: <CAMQ-g0fWbN_7iyRfuLqk-ajD+8SVgOynatikoBwCw5=3DpDfzg@mail.gmail.com> (raw)
In-Reply-To: <20230329205453.GE30778@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 1567 bytes --]
On Wed, Mar 29, 2023 at 10:54 PM Frank Ch. Eigler <fche@redhat.com> 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/1066be975f284ce6fdbb00a4e41b1738d52887d0/muttlib.c#L2204-L2212
(mutt muttlib.c:2204)
https://github.com/neomutt/neomutt/blob/d13dd3bb912d93f73dd4dd2d476e1c37d31a8422/mutt/file.c#L1062-L1075
(neomutt mutt/file.c:1062)
next prev parent reply other threads:[~2023-03-29 21:32 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-24 0:48 [PATCH 1/3] debuginfod: Replace futimes with futimens Jan Alexander Steffens (heftig)
2023-03-24 0:48 ` [PATCH 2/3] debuginfod: Don't touch access time of new files Jan Alexander Steffens (heftig)
2023-03-24 0:48 ` [PATCH 3/3] debuginfod: When retrieving files from cache, update atime manually Jan Alexander Steffens (heftig)
2023-03-29 20:54 ` Frank Ch. Eigler
2023-03-29 21:32 ` Jan Alexander Steffens (heftig) [this message]
2023-03-29 20:47 ` [PATCH 1/3] debuginfod: Replace futimes with futimens Frank Ch. Eigler
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='CAMQ-g0fWbN_7iyRfuLqk-ajD+8SVgOynatikoBwCw5=3DpDfzg@mail.gmail.com' \
--to=heftig@archlinux.org \
--cc=elfutils-devel@sourceware.org \
--cc=fche@redhat.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).