From: CGEL <cgel.zte@gmail.com>
To: Matthew Wilcox <willy@infradead.org>
Cc: viro@zeniv.linux.org.uk, hughd@google.com,
akpm@linux-foundation.org, hch@infradead.org,
hsiangkao@linux.alibaba.com, yang.yang29@zte.com.cn,
axboe@kernel.dk, yangerkun@huawei.com,
johannes.thumshirn@wdc.com, linux-fsdevel@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-mm@kvack.org,
Ran Xiaokai <ran.xiaokai@zte.com.cn>
Subject: Re: [PATCH] fs: drop_caches: skip dropping pagecache which is always dirty
Date: Wed, 20 Jul 2022 06:02:32 +0000 [thread overview]
Message-ID: <62d79a79.1c69fb81.e4cba.37f5@mx.google.com> (raw)
In-Reply-To: <YtdwULpWfSR3JI/u@casper.infradead.org>
On Wed, Jul 20, 2022 at 04:02:40AM +0100, Matthew Wilcox wrote:
> On Wed, Jul 20, 2022 at 02:21:19AM +0000, cgel.zte@gmail.com wrote:
> > From: Yang Yang <yang.yang29@zte.com.cn>
> >
> > Pagecache of some kind of fs has PG_dirty bit set once it was
> > allocated, so it can't be dropped. These fs include ramfs and
> > tmpfs. This can make drop_pagecache_sb() more efficient.
>
> Why do we want to make drop_pagecache_sb() more efficient?
Some users may use drop_caches besides testing or debugging.
For example, some systems will create a lot of pagecache when boot up
while reading bzImage, ramdisk, docker images etc. Most of this pagecache
is useless after boot up. It may has a longterm negative effects for the
workload when trigger page reclaim. It is especially harmful when trigger
direct_reclaim or we need allocate pages in atomic context. So users may
chose to drop_caches after boot up.
next prev parent reply other threads:[~2022-07-20 6:02 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-20 2:21 [PATCH] fs: drop_caches: skip dropping pagecache which is always dirty cgel.zte
2022-07-20 3:02 ` Matthew Wilcox
2022-07-20 6:02 ` CGEL [this message]
2022-07-20 6:04 ` Christoph Hellwig
2022-07-20 7:01 ` CGEL
2022-07-20 15:02 ` Matthew Wilcox
2022-07-21 1:00 ` CGEL
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=62d79a79.1c69fb81.e4cba.37f5@mx.google.com \
--to=cgel.zte@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=axboe@kernel.dk \
--cc=hch@infradead.org \
--cc=hsiangkao@linux.alibaba.com \
--cc=hughd@google.com \
--cc=johannes.thumshirn@wdc.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=ran.xiaokai@zte.com.cn \
--cc=viro@zeniv.linux.org.uk \
--cc=willy@infradead.org \
--cc=yang.yang29@zte.com.cn \
--cc=yangerkun@huawei.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 NNTP newsgroup(s).