[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CADDb1s0jj6gwJpinLcsAE14mhBqLSxQYdf8a0KfJXr8yBnORUw@mail.gmail.com>
Date: Fri, 3 Feb 2012 19:41:07 +0530
From: Amit Sahrawat <amit.sahrawat83@...il.com>
To: Peter Zijlstra <a.p.zijlstra@...llo.nl>
Cc: Wu Fengguang <fengguang.wu@...el.com>, Jan Kara <jack@...e.cz>,
Andrew Morton <akpm@...ux-foundation.org>,
Johannes Weiner <jweiner@...hat.com>,
Amit Sahrawat <a.sahrawat@...sung.com>, linux-mm@...ck.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/2] mm: make do_writepages() use plugging
Is there a case for introducing blk_plug in write_one_page() can't
seem to find that support in the code flow
write_one_page()->mpage_writepage()
Regards,
Amit Sahrawat
On Fri, Feb 3, 2012 at 7:31 PM, Amit Sahrawat <amit.sahrawat83@...il.com> wrote:
> Hi Peter,
> Thanks for pointing out.
>
> While checking the plug support in Write code flow, I came across this
> main point from which - we invoke
> writepages(mapping->a_ops->writepages(mapping, wbc)) from almost all
> the the filesystems.
>
> By mistake I checked 2 different kernel versions for this code(and
> missed that the current version already has put plug in
> mpage_writepages) ... so may be this patch is not worth considering.
>
> Regards,
> Amit Sahrawat
>
>
> On Fri, Feb 3, 2012 at 7:02 PM, Peter Zijlstra <a.p.zijlstra@...llo.nl> wrote:
>> 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@...sung.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 from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists