linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Gioh Kim <gioh.kim@lge.com>
Cc: "Laura Abbott" <lauraa@codeaurora.org>,
	"Michal Nazarewicz" <mina86@mina86.com>,
	"Marek Szyprowski" <m.szyprowski@samsung.com>,
	"Joonsoo Kim" <js1304@gmail.com>,
	"Alexander Viro" <viro@zeniv.linux.org.uk>,
	linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
	이건호 <gunho.lee@lge.com>, "Gi-Oh Kim" <gurugio@gmail.com>
Subject: Re: [PATCH] [RFC] CMA: clear buffer-head lru before page migration
Date: Mon, 7 Jul 2014 21:48:46 -0700	[thread overview]
Message-ID: <20140707214846.0224d697.akpm@linux-foundation.org> (raw)
In-Reply-To: <53BB7714.2020102@lge.com>

On Tue, 08 Jul 2014 13:44:04 +0900 Gioh Kim <gioh.kim@lge.com> wrote:

> 2014-07-08 ______ 7:52, Andrew Morton ___ ___:
> > On Fri, 04 Jul 2014 17:25:09 +0900 Gioh Kim <gioh.kim@lge.com> wrote:
> >
> >> From: Gioh Kim <gioh.kim@lge.com>
> >> Date: Fri, 4 Jul 2014 16:53:22 +0900
> >> Subject: [PATCH] [RFC] CMA: clear buffer-head lru before page migration
> >>
> >> When CMA try to migrate page, some buffer-heads can exist on lru.
> >> The bh on lru has non-zero count value so that it cannot be dropped
> >> even-if it is not used. We can drop only buffers related to the
> >> migrated page, but it can take long time more than dropping all
> >> because of searching list. There all buffers in lru are dropped.
> >>
> >> Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
> >> Signed-off-by: Gioh Kim <gioh.kim@lge.com>
> >> ---
> >>   fs/buffer.c |   13 +++++++++++++
> >>   1 file changed, 13 insertions(+)
> >>
> >> diff --git a/fs/buffer.c b/fs/buffer.c
> >> index eba6e4f..4f11b7a 100644
> >> --- a/fs/buffer.c
> >> +++ b/fs/buffer.c
> >> @@ -3233,6 +3233,19 @@ int try_to_free_buffers(struct page *page)
> >>          if (PageWriteback(page))
> >>                  return 0;
> >>
> >> +#ifdef CONFIG_CMA
> >> +       /*
> >> +        * When CMA try to migrate page, some buffer-heads can exist on lru.
> >> +        * The bh on lru has non-zero count value so that it cannot
> >> +        * be dropped even-if it is not used.
> >> +        * We can drop only buffers related to the migrated page,
> >> +        * but it can take long time more than dropping all
> >> +        * because of searching list.
> >> +        * There all buffers in lru are dropped first.
> >> +        */
> >> +       invalidate_bh_lrus();
> >> +#endif
> >
> > No, this will be tremendously expensive.
> >
> > What I proposed is that CMA call invalidate_bh_lrus() right at the
> > outset.  Something along the lines of

Please do not top-post your email replies - it makes it very hard to
conduct a coherent discussion.

> It's my fault.
> I'm going to send another patch ASAP.

No, not "ASAP".  Such a patch will require careful testing on numerous
system configurations and workloads.  Take however much time it needs
to get it right.

  reply	other threads:[~2014-07-08  4:48 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-04  8:25 [PATCH] [RFC] CMA: clear buffer-head lru before page migration Gioh Kim
2014-07-07 22:52 ` Andrew Morton
2014-07-08  4:44   ` Gioh Kim
2014-07-08  4:48     ` Andrew Morton [this message]
2014-07-08 16:46   ` Michal Nazarewicz
2014-07-14  7:02     ` Joonsoo Kim
2014-07-14 15:25       ` Michal Nazarewicz
2014-07-14 20:37       ` Andrew Morton
2014-07-15  6:25         ` Gioh Kim

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=20140707214846.0224d697.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=gioh.kim@lge.com \
    --cc=gunho.lee@lge.com \
    --cc=gurugio@gmail.com \
    --cc=js1304@gmail.com \
    --cc=lauraa@codeaurora.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=m.szyprowski@samsung.com \
    --cc=mina86@mina86.com \
    --cc=viro@zeniv.linux.org.uk \
    /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;
as well as URLs for NNTP newsgroup(s).