From: Gioh Kim <gioh.kim@lge.com>
To: Andrew Morton <akpm@linux-foundation.org>,
Joonsoo Kim <iamjoonsoo.kim@lge.com>
Cc: "Michal Nazarewicz" <mina86@mina86.com>,
"Laura Abbott" <lauraa@codeaurora.org>,
"Marek Szyprowski" <m.szyprowski@samsung.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>,
"Johannes Weiner" <hannes@cmpxchg.org>,
"Mel Gorman" <mel@csn.ul.ie>
Subject: Re: [PATCH] [RFC] CMA: clear buffer-head lru before page migration
Date: Tue, 15 Jul 2014 15:25:48 +0900 [thread overview]
Message-ID: <53C4C96C.3050104@lge.com> (raw)
In-Reply-To: <20140714133714.343ff0be6ea2bae651dc6f57@linux-foundation.org>
2014-07-15 오전 5:37, Andrew Morton 쓴 글:
> On Mon, 14 Jul 2014 16:02:25 +0900 Joonsoo Kim <iamjoonsoo.kim@lge.com> wrote:
>
>> On Tue, Jul 08, 2014 at 06:46:31PM +0200, Michal Nazarewicz wrote:
>>> On Mon, Jul 07 2014, Andrew Morton <akpm@linux-foundation.org> wrote:
>>>> What I proposed is that CMA call invalidate_bh_lrus() right at the
>>>> outset. Something along the lines of
>>>>
>>>> --- a/mm/page_alloc.c~a
>>>> +++ a/mm/page_alloc.c
>>>> @@ -6329,6 +6329,14 @@ int alloc_contig_range(unsigned long sta
>>>> };
>>>> INIT_LIST_HEAD(&cc.migratepages);
>>>>
>>>> +#ifdef CONFIG_CMA
>>>> + /*
>>>> + * Comment goes here
>>>> + */
>>>> + if (migratetype == MIGRATE_CMA)
>>>> + invalidate_bh_lrus();
>>>> +#endif
>>>> +
>>>
>>> This seems reasonable, except I think it should go after
>>> start_isolate_page_range call because otherwise there's no guarantee
>>> that someone won't grab those pages back.
>>>
>>> Also to avoid the #ifdef perhaps we want this as well:
>>
>> I think that we just want to remove ifdef CONFIG_CMA on above code
>> snippet, because invalidate_bh_lrus() would also help user of
>> alloc_contig_range() with MIGRATE_MOVABLE.
>
> That's what I believe also. I pinged Mel and Johannes off-list and Mel
> said "I hit it, the invalidation cost wasn't worth it for a THP alloc".
>
> So hm. I do think it's worth additional investigation but some careful
> testing would be needed to demonstrate that it's worthwhile. If the
> invalidation cost is hurting then perhaps additional logic will be
> needed to perform the invalidation only as a last-resort thing.
>
>
>
Adding invalidate_bh_lrus() between start_isolate_page_range and
__alloc_contig_migrate_range is working well on my platform.
But I'd like to test performance before sending patch.
Would anybody recommend me a benchmark tool?
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
WARNING: multiple messages have this Message-ID (diff)
From: Gioh Kim <gioh.kim@lge.com>
To: Andrew Morton <akpm@linux-foundation.org>,
Joonsoo Kim <iamjoonsoo.kim@lge.com>
Cc: "Michal Nazarewicz" <mina86@mina86.com>,
"Laura Abbott" <lauraa@codeaurora.org>,
"Marek Szyprowski" <m.szyprowski@samsung.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>,
"Johannes Weiner" <hannes@cmpxchg.org>,
"Mel Gorman" <mel@csn.ul.ie>
Subject: Re: [PATCH] [RFC] CMA: clear buffer-head lru before page migration
Date: Tue, 15 Jul 2014 15:25:48 +0900 [thread overview]
Message-ID: <53C4C96C.3050104@lge.com> (raw)
In-Reply-To: <20140714133714.343ff0be6ea2bae651dc6f57@linux-foundation.org>
2014-07-15 오전 5:37, Andrew Morton 쓴 글:
> On Mon, 14 Jul 2014 16:02:25 +0900 Joonsoo Kim <iamjoonsoo.kim@lge.com> wrote:
>
>> On Tue, Jul 08, 2014 at 06:46:31PM +0200, Michal Nazarewicz wrote:
>>> On Mon, Jul 07 2014, Andrew Morton <akpm@linux-foundation.org> wrote:
>>>> What I proposed is that CMA call invalidate_bh_lrus() right at the
>>>> outset. Something along the lines of
>>>>
>>>> --- a/mm/page_alloc.c~a
>>>> +++ a/mm/page_alloc.c
>>>> @@ -6329,6 +6329,14 @@ int alloc_contig_range(unsigned long sta
>>>> };
>>>> INIT_LIST_HEAD(&cc.migratepages);
>>>>
>>>> +#ifdef CONFIG_CMA
>>>> + /*
>>>> + * Comment goes here
>>>> + */
>>>> + if (migratetype == MIGRATE_CMA)
>>>> + invalidate_bh_lrus();
>>>> +#endif
>>>> +
>>>
>>> This seems reasonable, except I think it should go after
>>> start_isolate_page_range call because otherwise there's no guarantee
>>> that someone won't grab those pages back.
>>>
>>> Also to avoid the #ifdef perhaps we want this as well:
>>
>> I think that we just want to remove ifdef CONFIG_CMA on above code
>> snippet, because invalidate_bh_lrus() would also help user of
>> alloc_contig_range() with MIGRATE_MOVABLE.
>
> That's what I believe also. I pinged Mel and Johannes off-list and Mel
> said "I hit it, the invalidation cost wasn't worth it for a THP alloc".
>
> So hm. I do think it's worth additional investigation but some careful
> testing would be needed to demonstrate that it's worthwhile. If the
> invalidation cost is hurting then perhaps additional logic will be
> needed to perform the invalidation only as a last-resort thing.
>
>
>
Adding invalidate_bh_lrus() between start_isolate_page_range and
__alloc_contig_migrate_range is working well on my platform.
But I'd like to test performance before sending patch.
Would anybody recommend me a benchmark tool?
next prev parent reply other threads:[~2014-07-15 6:25 UTC|newest]
Thread overview: 12+ 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
2014-07-08 16:46 ` Michal Nazarewicz
2014-07-08 16:46 ` Michal Nazarewicz
2014-07-14 7:02 ` Joonsoo Kim
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 [this message]
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=53C4C96C.3050104@lge.com \
--to=gioh.kim@lge.com \
--cc=akpm@linux-foundation.org \
--cc=gunho.lee@lge.com \
--cc=gurugio@gmail.com \
--cc=hannes@cmpxchg.org \
--cc=iamjoonsoo.kim@lge.com \
--cc=lauraa@codeaurora.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=m.szyprowski@samsung.com \
--cc=mel@csn.ul.ie \
--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 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.