linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Matthew Wilcox <willy@infradead.org>
To: Christoph Hellwig <hch@infradead.org>
Cc: linux-mm@kvack.org, linux-fsdevel@vger.kernel.org
Subject: Re: set_page_dirty variants
Date: Tue, 23 Mar 2021 16:30:27 +0000	[thread overview]
Message-ID: <20210323163027.GH1719932@casper.infradead.org> (raw)
In-Reply-To: <20210323154125.GA2438080@infradead.org>

On Tue, Mar 23, 2021 at 03:41:25PM +0000, Christoph Hellwig wrote:
> On Mon, Mar 22, 2021 at 01:19:07AM +0000, Matthew Wilcox wrote:
> > I'd like to get it down to zero.  After all, the !mapping case in
> > set_page_dirty() is exactly what we want.  So is there a problem
> > with doing this?
> > 
> > +++ b/mm/page-writeback.c
> > @@ -2562 +2562 @@ int set_page_dirty(struct page *page)
> > -       if (likely(mapping)) {
> > +       if (likely(mapping && mapping_can_writeback(mapping))) {
> > 
> > But then I noticed that we have both mapping_can_writeback()
> > and mapping_use_writeback_tags(), and I'm no longer sure
> > which one to use.  Also, why don't we mirror the results of
> > inode_to_bdi(mapping->host)->capabilities & BDI_CAP_WRITEBACK into
> > a mapping->flags & AS_something bit?
> 
> Probably because no one has bothered to submit a patch yet.

I was hoping for a little more guidance.  Are mapping_can_writeback()
and mapping_use_writeback_tags() really the same thing?  I mean,
obviously the swap spaces actually _can_ writeback, but it doesn't
use the tags to do it.



  reply	other threads:[~2021-03-23 16:32 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-22  1:19 Matthew Wilcox
2021-03-23 15:41 ` Christoph Hellwig
2021-03-23 16:30   ` Matthew Wilcox [this message]
2021-03-23 16:35     ` Christoph Hellwig

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=20210323163027.GH1719932@casper.infradead.org \
    --to=willy@infradead.org \
    --cc=hch@infradead.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-mm@kvack.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