linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Matthew Wilcox <willy@infradead.org>
To: NeilBrown <neilb@suse.de>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Mel Gorman <mgorman@suse.de>,
	Philipp Reisner <philipp.reisner@linbit.com>,
	Lars Ellenberg <lars.ellenberg@linbit.com>,
	Jan Kara <jack@suse.com>,
	Ryusuke Konishi <konishi.ryusuke@gmail.com>,
	"Darrick J. Wong" <djwong@kernel.org>,
	linux-xfs@vger.kernel.org, linux-ext4@vger.kernel.org,
	linux-nilfs@vger.kernel.org, linux-mm@kvack.org,
	linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] Remove inode_congested()
Date: Mon, 13 Dec 2021 04:22:38 +0000	[thread overview]
Message-ID: <YbbKjjFzIzSBJWCn@casper.infradead.org> (raw)
In-Reply-To: <163936886725.23860.2403757518009677424.stgit@noble.brown>

On Mon, Dec 13, 2021 at 03:14:27PM +1100, NeilBrown wrote:
> diff --git a/mm/vmscan.c b/mm/vmscan.c
> index fb9584641ac7..540aa0ea67ff 100644
> --- a/mm/vmscan.c
> +++ b/mm/vmscan.c
> @@ -989,17 +989,6 @@ static inline int is_page_cache_freeable(struct page *page)
>  	return page_count(page) - page_has_private(page) == 1 + page_cache_pins;
>  }
>  
> -static int may_write_to_inode(struct inode *inode)
> -{
> -	if (current->flags & PF_SWAPWRITE)
> -		return 1;
> -	if (!inode_write_congested(inode))
> -		return 1;
> -	if (inode_to_bdi(inode) == current->backing_dev_info)
> -		return 1;
> -	return 0;
> -}

Why is it safe to get rid of the PF_SWAPWRITE and current->backing_dev_info
checks?

> @@ -1158,8 +1147,6 @@ static pageout_t pageout(struct page *page, struct address_space *mapping)
>  	}
>  	if (mapping->a_ops->writepage == NULL)
>  		return PAGE_ACTIVATE;
> -	if (!may_write_to_inode(mapping->host))
> -		return PAGE_KEEP;
>  
>  	if (clear_page_dirty_for_io(page)) {
>  		int res;


  reply	other threads:[~2021-12-13  4:23 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-13  4:14 [PATCH 0/2] Remove some 'congested' tests NeilBrown
2021-12-13  4:14 ` [PATCH 2/2] Remove bdi_congested() and wb_congested() and related functions NeilBrown
2021-12-13  5:07   ` Dave Chinner
2021-12-13  7:04     ` NeilBrown
2021-12-13  5:56   ` kernel test robot
2021-12-13  4:14 ` [PATCH 1/2] Remove inode_congested() NeilBrown
2021-12-13  4:22   ` Matthew Wilcox [this message]
2021-12-13  4:59     ` NeilBrown

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=YbbKjjFzIzSBJWCn@casper.infradead.org \
    --to=willy@infradead.org \
    --cc=akpm@linux-foundation.org \
    --cc=djwong@kernel.org \
    --cc=jack@suse.com \
    --cc=konishi.ryusuke@gmail.com \
    --cc=lars.ellenberg@linbit.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linux-nilfs@vger.kernel.org \
    --cc=linux-xfs@vger.kernel.org \
    --cc=mgorman@suse.de \
    --cc=neilb@suse.de \
    --cc=philipp.reisner@linbit.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