From: Michal Hocko <mhocko@suse.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Kefeng Wang <wangkefeng.wang@huawei.com>,
David Hildenbrand <david@kernel.org>,
Christian Brauner <brauner@kernel.org>,
Alexander Viro <viro@zeniv.linux.org.uk>,
"Matthew Wilcox (Oracle)" <willy@infradead.org>,
Jan Kara <jack@suse.cz>,
"Liam R. Howlett" <Liam.Howlett@oracle.com>,
Lorenzo Stoakes <ljs@kernel.org>, Mike Rapoport <rppt@kernel.org>,
Suren Baghdasaryan <surenb@google.com>,
Vlastimil Babka <vbabka@kernel.org>,
linux-fsdevel@vger.kernel.org, linux-mm@kvack.org
Subject: Re: [PATCH RFC] fs: drop_caches: introduce per-node drop_caches interface
Date: Thu, 9 Apr 2026 21:41:12 +0200 [thread overview]
Message-ID: <adgA2IKrdStZJ6AX@tiehlicka> (raw)
In-Reply-To: <20260409081619.34f172dad0e5a56923b7eb2d@linux-foundation.org>
On Thu 09-04-26 08:16:19, Andrew Morton wrote:
> On Thu, 9 Apr 2026 16:08:37 +0800 Kefeng Wang <wangkefeng.wang@huawei.com> wrote:
>
> > > Quite honestly drop_caches is not the best interface to build any new
> > > functionality on top of. It has backfired a lot in the past and we have
> > > tried to make it extra clear that this should be used for debugging
> > > purposes only. Extending it further sounds like a bad step.
> >
> >
> > I am not clear about this history of this interface, but some of our
> > products do use this interface :(
>
> I added it more than 20 years ago (before debugfs existed) as a way of
> exercising cold-cache testing fs/pagecache code. My stress-testing
> code was previously using umount/mount but this was inconvenient for
> some reason.
>
> But the damn thing because so popular! Mainly because our caching code
> has always been problematic in various ways and people found that
> drop_caches was an effective workaround :(
>
> So it's an unhappy story. Caching causes people problems, caching code
> doesn't get fixed, people get stuck on using a stupid debug thing which
> I guess I should have just kept local in my tree.
<rant>
Our caching strategies might not be fitting all existing usecases but as
usual we are targetting as many of them as viable. The problem with
drop_caches is that it has grown unproportianal amount of cargo cult and
grown into "solution for any performance problems" magic pill. Even when
proven to cause more problems than it solves so many times. Again and
again. That is really sad. Same as THP causes more problems than it
solves and that you should be using 2GB of swap space or that swap out
is a signal of a disaster. There are more and they are hard to die.
</rant>
--
Michal Hocko
SUSE Labs
next prev parent reply other threads:[~2026-04-09 19:41 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-09 6:35 Kefeng Wang
2026-04-09 7:06 ` Michal Hocko
2026-04-09 7:19 ` Lorenzo Stoakes
2026-04-09 8:21 ` Kefeng Wang
2026-04-09 8:27 ` Lorenzo Stoakes
2026-04-09 8:08 ` Kefeng Wang
2026-04-09 8:22 ` Michal Hocko
2026-04-09 8:54 ` Kefeng Wang
2026-04-09 10:52 ` Michal Hocko
2026-04-09 12:50 ` Kefeng Wang
2026-04-09 13:00 ` Kefeng Wang
2026-04-09 13:01 ` Michal Hocko
2026-04-09 13:45 ` Kefeng Wang
2026-04-09 8:30 ` Lorenzo Stoakes
2026-04-09 15:16 ` Andrew Morton
2026-04-09 19:41 ` Michal Hocko [this message]
2026-04-09 20:39 ` Matthew Wilcox
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=adgA2IKrdStZJ6AX@tiehlicka \
--to=mhocko@suse.com \
--cc=Liam.Howlett@oracle.com \
--cc=akpm@linux-foundation.org \
--cc=brauner@kernel.org \
--cc=david@kernel.org \
--cc=jack@suse.cz \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=ljs@kernel.org \
--cc=rppt@kernel.org \
--cc=surenb@google.com \
--cc=vbabka@kernel.org \
--cc=viro@zeniv.linux.org.uk \
--cc=wangkefeng.wang@huawei.com \
--cc=willy@infradead.org \
/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