lkml.org 
[lkml]   [2022]   [Jul]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] fs: drop_caches: skip dropping pagecache which is always dirty
On Wed, Jul 20, 2022 at 06:02:32AM +0000, CGEL wrote:
> 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.

This is a terrible reason.

> 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.

If that's actually a problem, work on fixing that.

\
 
 \ /
  Last update: 2022-07-20 17:03    [W:1.030 / U:0.052 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site