All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <a.p.zijlstra@chello.nl>
To: Amit Sahrawat <amit.sahrawat83@gmail.com>
Cc: Wu Fengguang <fengguang.wu@intel.com>, Jan Kara <jack@suse.cz>,
	Andrew Morton <akpm@linux-foundation.org>,
	Johannes Weiner <jweiner@redhat.com>,
	Amit Sahrawat <a.sahrawat@samsung.com>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] mm: make do_writepages() use plugging
Date: Fri, 03 Feb 2012 14:32:28 +0100	[thread overview]
Message-ID: <1328275948.2662.15.camel@laptop> (raw)
In-Reply-To: <1328275626-5322-1-git-send-email-amit.sahrawat83@gmail.com>

On Fri, 2012-02-03 at 18:57 +0530, Amit Sahrawat wrote:
> This will cover all the invocations for writepages to be called with
> plugging support.

This changelog fails to explain why this is a good thing... I thought
the idea of the new plugging stuff was that we now don't need to
sprinkle plugs all over the kernel..

> Signed-off-by: Amit Sahrawat <a.sahrawat@samsung.com>
> ---
>  mm/page-writeback.c |    4 ++++
>  1 files changed, 4 insertions(+), 0 deletions(-)
> 
> diff --git a/mm/page-writeback.c b/mm/page-writeback.c
> index 363ba70..2bea32c 100644
> --- a/mm/page-writeback.c
> +++ b/mm/page-writeback.c
> @@ -1866,14 +1866,18 @@ EXPORT_SYMBOL(generic_writepages);
>  
>  int do_writepages(struct address_space *mapping, struct writeback_control *wbc)
>  {
> +	struct blk_plug plug;
>  	int ret;
>  
>  	if (wbc->nr_to_write <= 0)
>  		return 0;
> +
> +	blk_start_plug(&plug);
>  	if (mapping->a_ops->writepages)
>  		ret = mapping->a_ops->writepages(mapping, wbc);
>  	else
>  		ret = generic_writepages(mapping, wbc);
> +	blk_finish_plug(&plug);
>  	return ret;
>  }
>  



--
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/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

WARNING: multiple messages have this Message-ID (diff)
From: Peter Zijlstra <a.p.zijlstra@chello.nl>
To: Amit Sahrawat <amit.sahrawat83@gmail.com>
Cc: Wu Fengguang <fengguang.wu@intel.com>, Jan Kara <jack@suse.cz>,
	Andrew Morton <akpm@linux-foundation.org>,
	Johannes Weiner <jweiner@redhat.com>,
	Amit Sahrawat <a.sahrawat@samsung.com>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] mm: make do_writepages() use plugging
Date: Fri, 03 Feb 2012 14:32:28 +0100	[thread overview]
Message-ID: <1328275948.2662.15.camel@laptop> (raw)
In-Reply-To: <1328275626-5322-1-git-send-email-amit.sahrawat83@gmail.com>

On Fri, 2012-02-03 at 18:57 +0530, Amit Sahrawat wrote:
> This will cover all the invocations for writepages to be called with
> plugging support.

This changelog fails to explain why this is a good thing... I thought
the idea of the new plugging stuff was that we now don't need to
sprinkle plugs all over the kernel..

> Signed-off-by: Amit Sahrawat <a.sahrawat@samsung.com>
> ---
>  mm/page-writeback.c |    4 ++++
>  1 files changed, 4 insertions(+), 0 deletions(-)
> 
> diff --git a/mm/page-writeback.c b/mm/page-writeback.c
> index 363ba70..2bea32c 100644
> --- a/mm/page-writeback.c
> +++ b/mm/page-writeback.c
> @@ -1866,14 +1866,18 @@ EXPORT_SYMBOL(generic_writepages);
>  
>  int do_writepages(struct address_space *mapping, struct writeback_control *wbc)
>  {
> +	struct blk_plug plug;
>  	int ret;
>  
>  	if (wbc->nr_to_write <= 0)
>  		return 0;
> +
> +	blk_start_plug(&plug);
>  	if (mapping->a_ops->writepages)
>  		ret = mapping->a_ops->writepages(mapping, wbc);
>  	else
>  		ret = generic_writepages(mapping, wbc);
> +	blk_finish_plug(&plug);
>  	return ret;
>  }
>  




  reply	other threads:[~2012-02-03 13:32 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-03 13:27 [PATCH 2/2] mm: make do_writepages() use plugging Amit Sahrawat
2012-02-03 13:27 ` Amit Sahrawat
2012-02-03 13:32 ` Peter Zijlstra [this message]
2012-02-03 13:32   ` Peter Zijlstra
2012-02-03 14:01   ` Amit Sahrawat
2012-02-03 14:01     ` Amit Sahrawat
2012-02-03 14:11     ` Amit Sahrawat
2012-02-03 14:11       ` Amit Sahrawat
2012-02-03 13:38 ` Wu Fengguang
2012-02-03 13:38   ` Wu Fengguang
2012-02-03 14:08   ` Christoph Hellwig
2012-02-03 14:08     ` Christoph Hellwig
2012-02-03 14:21     ` Chris Mason
2012-02-03 14:21       ` Chris Mason

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=1328275948.2662.15.camel@laptop \
    --to=a.p.zijlstra@chello.nl \
    --cc=a.sahrawat@samsung.com \
    --cc=akpm@linux-foundation.org \
    --cc=amit.sahrawat83@gmail.com \
    --cc=fengguang.wu@intel.com \
    --cc=jack@suse.cz \
    --cc=jweiner@redhat.com \
    --cc=linux-kernel@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 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.