lkml.org 
[lkml]   [2012]   [Feb]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 2/2] mm: make do_writepages() use plugging
From
Date
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;
> }
>





\
 
 \ /
  Last update: 2012-02-03 14:35    [W:0.048 / U:1.224 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site