mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Huang Shijie <huangsj@hygon.cn>
To: Christoph Hellwig <hch@infradead.org>
Cc: <viro@zeniv.linux.org.uk>, <brauner@kernel.org>,
	<zhongyuan@hygon.cn>, <fangbaoshun@hygon.cn>,
	<yingzhiwei@hygon.cn>, <jack@suse.cz>, <dev.jain@arm.com>,
	<ljs@kernel.org>, <adobriyan@gmail.com>,
	<akpm@linux-foundation.org>, <hpa@zytor.com>,
	<ryan.roberts@arm.com>, <mjguzik@gmail.com>,
	<joel.granados@kernel.org>, <jannh@google.com>, <oleg@redhat.com>,
	<aleksa@amutable.com>, <legion@kernel.org>, <kees@kernel.org>,
	<joannelkoong@gmail.com>, <tj@kernel.org>,
	<libaokun@linux.alibaba.com>, <ebiggers@kernel.org>,
	<sandeen@redhat.com>, <linux-fsdevel@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>
Subject: Re: [RFC PATCH v2 1/3] fs/drop_caches: skip filesystems without page cache
Date: Wed, 23 Sep 2026 13:49:11 +0800	[thread overview]
Message-ID: <arNoV2MdtTK-Ruw9@hsj-2U-Workstation> (raw)
In-Reply-To: <arIVBpMZk5-O2AZc@infradead.org>

On Mon, Sep 21, 2026 at 10:41:26PM -0700, Christoph Hellwig wrote:
> On Sun, Sep 20, 2026 at 03:28:09PM +0800, Huang Shijie wrote:
> > Add a new flag SB_I_NO_PAGECACHE for superblock.
> > 
> > Skip scanning the inode lists of filesystems that have no page cache
> > in drop_pagecache_sb(), as indicated by the SB_I_NO_PAGECACHE flag.
> 
> I don't think we need a new flag.  This can check for
> 
> 	sb->s_bdi == &noop_backing_dev_info
> 
Okay. I can use this method.

> which is actually the more relevant concept - not if a file system
> uses the page cache, but if it supports page cache writeback.
> E.g. for ramfs there is page cache, but it is the only data store.
> For shmemfs, there is writeback, but it is driven in a different
> way (through the anonymous memory code and not fs writeback).
> 
> And most importantly it just work, no need to mark file systems,
> as you're currently missing a lot of those that can have a fair
> number of inodes, e.g., sysfs, kernfs, cgroupfs or configfs.
> 
I ever added support for these file systems, but I deleted the code before
I sent out this patch.

To Jan Kara,
   thanks for the information about the issue.
   I will check the inode iteration issue firstly.

Thanks
Huang Shijie




  reply	other threads:[~2026-09-23  5:49 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-20  7:28 [RFC PATCH v2 0/3] fs/proc: split the inode list for procfs Huang Shijie
2026-09-20  7:28 ` [RFC PATCH v2 1/3] fs/drop_caches: skip filesystems without page cache Huang Shijie
2026-09-22  5:41   ` Christoph Hellwig
2026-09-23  5:49     ` Huang Shijie [this message]
2026-09-20  7:28 ` [RFC PATCH v2 2/3] fs/super: introduce a helper sb_inodes_empty() Huang Shijie
2026-09-20  7:28 ` [RFC PATCH v2 3/3] fs/proc: split the inode list Huang Shijie
2026-09-22 13:29   ` Jan Kara

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=arNoV2MdtTK-Ruw9@hsj-2U-Workstation \
    --to=huangsj@hygon.cn \
    --cc=adobriyan@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=aleksa@amutable.com \
    --cc=brauner@kernel.org \
    --cc=dev.jain@arm.com \
    --cc=ebiggers@kernel.org \
    --cc=fangbaoshun@hygon.cn \
    --cc=hch@infradead.org \
    --cc=hpa@zytor.com \
    --cc=jack@suse.cz \
    --cc=jannh@google.com \
    --cc=joannelkoong@gmail.com \
    --cc=joel.granados@kernel.org \
    --cc=kees@kernel.org \
    --cc=legion@kernel.org \
    --cc=libaokun@linux.alibaba.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ljs@kernel.org \
    --cc=mjguzik@gmail.com \
    --cc=oleg@redhat.com \
    --cc=ryan.roberts@arm.com \
    --cc=sandeen@redhat.com \
    --cc=tj@kernel.org \
    --cc=viro@zeniv.linux.org.uk \
    --cc=yingzhiwei@hygon.cn \
    --cc=zhongyuan@hygon.cn \
    /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

all inboxes | Powered by JetHome®