All of lore.kernel.org
 help / color / mirror / Atom feed
From: Johannes Weiner <hannes@cmpxchg.org>
To: Michal Hocko <mhocko@kernel.org>
Cc: Tahsin Erdogan <tahsin@google.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Jan Kara <jack@suse.cz>,
	Vladimir Davydov <vdavydov.dev@gmail.com>,
	Jeff Layton <jlayton@redhat.com>,
	Matthew Wilcox <mawilcox@microsoft.com>,
	Masahiro Yamada <yamada.masahiro@socionext.com>,
	Theodore Ts'o <tytso@mit.edu>,
	Nikolay Borisov <nborisov@suse.com>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] writeback: remove unused parameter from balance_dirty_pages()
Date: Mon, 2 Oct 2017 15:54:25 -0400	[thread overview]
Message-ID: <20171002195425.GA18075@cmpxchg.org> (raw)
In-Reply-To: <20171002075616.mro36ci7gk5k6vbc@dhcp22.suse.cz>

On Mon, Oct 02, 2017 at 09:56:16AM +0200, Michal Hocko wrote:
> On Wed 27-09-17 15:13:11, Tahsin Erdogan wrote:
> > "mapping" parameter to balance_dirty_pages() is not used anymore.
> > 
> > Fixes: dfb8ae567835 ("writeback: let balance_dirty_pages() work on the matching cgroup bdi_writeback")
> 
> balance_dirty_pages_ratelimited doesn't really need mapping as well. All
> it needs is the inode and we already have it in callers. So would it
> make sense to refactor a bit further and make its argument an inode?

It's nicer to keep this a "page cache" interface, as its primary
callsites are in mm/memory.c and mm/filemap.c:

	$ git grep -c 'inode' mm/filemap.c mm/memory.c 
	mm/filemap.c:38
	$ git grep -c 'mapping' mm/filemap.c mm/memory.c 
	mm/filemap.c:260
	mm/memory.c:93

> > Signed-off-by: Tahsin Erdogan <tahsin@google.com>
> 
> Acked-by: Michal Hocko <mhocko@suse.com>

Acked-by: Johannes Weiner <hannes@cmpxchg.org>

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

WARNING: multiple messages have this Message-ID (diff)
From: Johannes Weiner <hannes@cmpxchg.org>
To: Michal Hocko <mhocko@kernel.org>
Cc: Tahsin Erdogan <tahsin@google.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Jan Kara <jack@suse.cz>,
	Vladimir Davydov <vdavydov.dev@gmail.com>,
	Jeff Layton <jlayton@redhat.com>,
	Matthew Wilcox <mawilcox@microsoft.com>,
	Masahiro Yamada <yamada.masahiro@socionext.com>,
	"Theodore Ts'o" <tytso@mit.edu>,
	Nikolay Borisov <nborisov@suse.com>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] writeback: remove unused parameter from balance_dirty_pages()
Date: Mon, 2 Oct 2017 15:54:25 -0400	[thread overview]
Message-ID: <20171002195425.GA18075@cmpxchg.org> (raw)
In-Reply-To: <20171002075616.mro36ci7gk5k6vbc@dhcp22.suse.cz>

On Mon, Oct 02, 2017 at 09:56:16AM +0200, Michal Hocko wrote:
> On Wed 27-09-17 15:13:11, Tahsin Erdogan wrote:
> > "mapping" parameter to balance_dirty_pages() is not used anymore.
> > 
> > Fixes: dfb8ae567835 ("writeback: let balance_dirty_pages() work on the matching cgroup bdi_writeback")
> 
> balance_dirty_pages_ratelimited doesn't really need mapping as well. All
> it needs is the inode and we already have it in callers. So would it
> make sense to refactor a bit further and make its argument an inode?

It's nicer to keep this a "page cache" interface, as its primary
callsites are in mm/memory.c and mm/filemap.c:

	$ git grep -c 'inode' mm/filemap.c mm/memory.c 
	mm/filemap.c:38
	$ git grep -c 'mapping' mm/filemap.c mm/memory.c 
	mm/filemap.c:260
	mm/memory.c:93

> > Signed-off-by: Tahsin Erdogan <tahsin@google.com>
> 
> Acked-by: Michal Hocko <mhocko@suse.com>

Acked-by: Johannes Weiner <hannes@cmpxchg.org>

  parent reply	other threads:[~2017-10-02 19:54 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-27 22:13 [PATCH] writeback: remove unused parameter from balance_dirty_pages() Tahsin Erdogan
2017-09-27 22:13 ` Tahsin Erdogan
2017-10-02  7:56 ` Michal Hocko
2017-10-02  7:56   ` Michal Hocko
2017-10-02 17:20   ` Tahsin Erdogan
2017-10-02 17:20     ` Tahsin Erdogan
2017-10-02 18:02     ` Michal Hocko
2017-10-02 18:02       ` Michal Hocko
2017-10-02 19:54   ` Johannes Weiner [this message]
2017-10-02 19:54     ` Johannes Weiner

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=20171002195425.GA18075@cmpxchg.org \
    --to=hannes@cmpxchg.org \
    --cc=akpm@linux-foundation.org \
    --cc=jack@suse.cz \
    --cc=jlayton@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mawilcox@microsoft.com \
    --cc=mhocko@kernel.org \
    --cc=nborisov@suse.com \
    --cc=tahsin@google.com \
    --cc=tytso@mit.edu \
    --cc=vdavydov.dev@gmail.com \
    --cc=yamada.masahiro@socionext.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.