From: Dave Hansen <dave.hansen@intel.com>
To: Davidlohr Bueso <davidlohr@hp.com>
Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>,
Andrew Morton <akpm@linux-foundation.org>,
Rik van Riel <riel@redhat.com>, Mel Gorman <mgorman@suse.de>,
Michal Hocko <mhocko@suse.cz>,
"Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>,
KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>,
Hugh Dickins <hughd@google.com>,
Davidlohr Bueso <davidlohr.bueso@hp.com>,
David Gibson <david@gibson.dropbear.id.au>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
Joonsoo Kim <js1304@gmail.com>,
Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>,
Hillf Danton <dhillf@gmail.com>
Subject: Re: [PATCH v3 00/14] mm, hugetlb: remove a hugetlb_instantiation_mutex
Date: Mon, 31 Mar 2014 11:41:56 -0700 [thread overview]
Message-ID: <5339B6F4.9000809@intel.com> (raw)
In-Reply-To: <1396286773.2507.11.camel@buesod1.americas.hpqcorp.net>
On 03/31/2014 10:26 AM, Davidlohr Bueso wrote:
> On Mon, 2014-03-31 at 09:27 -0700, Dave Hansen wrote:
>> On 12/17/2013 10:53 PM, Joonsoo Kim wrote:
>>> * NOTE for v3
>>> - Updating patchset is so late because of other works, not issue from
>>> this patchset.
>>
>> I've got some folks with a couple TB of RAM seeing long startup times
>> with $LARGE_DATABASE_PRODUCT. It looks to be contention on
>> hugetlb_instantiation_mutex because everyone is trying to zero hugepages
>> under that lock in parallel. Just removing the lock sped things up
>> quite a bit.
>
> Welcome to my world. Regarding the instantiation mutex, it is addressed,
> see commit c999c05ff595 in -next.
Cool stuff. That does seem to fix my parallel-fault hugetlbfs
microbenchmark. I'll recommend that the $DATABASE folks check it as well.
> As for the clear page overhead, I brought this up in lsfmm last week,
> proposing some daemon to clear pages when we have idle cpu... but didn't
> get much positive feedback. Basically (i) not worth the additional
> complexity and (ii) can trigger different application startup times,
> which seems to be something negative. I do have a patch that implements
> huge_clear_page with non-temporal hinting but I didn't see much
> difference on my environment, would you want to give it a try?
I'd just be happy to see it happen outside of the locks. As it stands
now, I have 1 CPU zeroing a huge page, and 159 sitting there sleeping
waiting for it to release the hugetlb_instantiation_mutex. That's just
nonsense. I don't think making them non-temporal will fundamentally
help that. We need them parallelized. According to ftrace, a
hugetlb_fault() takes ~700us. Literally 99% of that is zeroing the page.
--
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/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
WARNING: multiple messages have this Message-ID (diff)
From: Dave Hansen <dave.hansen@intel.com>
To: Davidlohr Bueso <davidlohr@hp.com>
Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>,
Andrew Morton <akpm@linux-foundation.org>,
Rik van Riel <riel@redhat.com>, Mel Gorman <mgorman@suse.de>,
Michal Hocko <mhocko@suse.cz>,
"Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>,
KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>,
Hugh Dickins <hughd@google.com>,
Davidlohr Bueso <davidlohr.bueso@hp.com>,
David Gibson <david@gibson.dropbear.id.au>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
Joonsoo Kim <js1304@gmail.com>,
Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>,
Hillf Danton <dhillf@gmail.com>
Subject: Re: [PATCH v3 00/14] mm, hugetlb: remove a hugetlb_instantiation_mutex
Date: Mon, 31 Mar 2014 11:41:56 -0700 [thread overview]
Message-ID: <5339B6F4.9000809@intel.com> (raw)
In-Reply-To: <1396286773.2507.11.camel@buesod1.americas.hpqcorp.net>
On 03/31/2014 10:26 AM, Davidlohr Bueso wrote:
> On Mon, 2014-03-31 at 09:27 -0700, Dave Hansen wrote:
>> On 12/17/2013 10:53 PM, Joonsoo Kim wrote:
>>> * NOTE for v3
>>> - Updating patchset is so late because of other works, not issue from
>>> this patchset.
>>
>> I've got some folks with a couple TB of RAM seeing long startup times
>> with $LARGE_DATABASE_PRODUCT. It looks to be contention on
>> hugetlb_instantiation_mutex because everyone is trying to zero hugepages
>> under that lock in parallel. Just removing the lock sped things up
>> quite a bit.
>
> Welcome to my world. Regarding the instantiation mutex, it is addressed,
> see commit c999c05ff595 in -next.
Cool stuff. That does seem to fix my parallel-fault hugetlbfs
microbenchmark. I'll recommend that the $DATABASE folks check it as well.
> As for the clear page overhead, I brought this up in lsfmm last week,
> proposing some daemon to clear pages when we have idle cpu... but didn't
> get much positive feedback. Basically (i) not worth the additional
> complexity and (ii) can trigger different application startup times,
> which seems to be something negative. I do have a patch that implements
> huge_clear_page with non-temporal hinting but I didn't see much
> difference on my environment, would you want to give it a try?
I'd just be happy to see it happen outside of the locks. As it stands
now, I have 1 CPU zeroing a huge page, and 159 sitting there sleeping
waiting for it to release the hugetlb_instantiation_mutex. That's just
nonsense. I don't think making them non-temporal will fundamentally
help that. We need them parallelized. According to ftrace, a
hugetlb_fault() takes ~700us. Literally 99% of that is zeroing the page.
next prev parent reply other threads:[~2014-03-31 18:41 UTC|newest]
Thread overview: 90+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-18 6:53 [PATCH v3 00/14] mm, hugetlb: remove a hugetlb_instantiation_mutex Joonsoo Kim
2013-12-18 6:53 ` Joonsoo Kim
2013-12-18 6:53 ` [PATCH v3 01/14] mm, hugetlb: unify region structure handling Joonsoo Kim
2013-12-18 6:53 ` Joonsoo Kim
2013-12-21 9:04 ` David Gibson
2014-01-07 2:37 ` Davidlohr Bueso
2014-01-07 2:37 ` Davidlohr Bueso
2013-12-18 6:53 ` [PATCH v3 02/14] mm, hugetlb: region manipulation functions take resv_map rather list_head Joonsoo Kim
2013-12-18 6:53 ` Joonsoo Kim
2013-12-21 13:43 ` David Gibson
2014-01-07 2:39 ` Davidlohr Bueso
2014-01-07 2:39 ` Davidlohr Bueso
2013-12-18 6:53 ` [PATCH v3 03/14] mm, hugetlb: protect region tracking via newly introduced resv_map lock Joonsoo Kim
2013-12-18 6:53 ` Joonsoo Kim
2013-12-21 13:58 ` David Gibson
2013-12-23 1:05 ` Joonsoo Kim
2013-12-23 1:05 ` Joonsoo Kim
2013-12-24 12:00 ` David Gibson
2014-01-06 0:12 ` Joonsoo Kim
2014-01-06 0:12 ` Joonsoo Kim
2014-01-07 2:39 ` Davidlohr Bueso
2014-01-07 2:39 ` Davidlohr Bueso
2013-12-18 6:53 ` [PATCH v3 04/14] mm, hugetlb: remove resv_map_put() Joonsoo Kim
2013-12-18 6:53 ` Joonsoo Kim
2013-12-18 6:53 ` [PATCH v3 05/14] mm, hugetlb: make vma_resv_map() works for all mapping type Joonsoo Kim
2013-12-18 6:53 ` Joonsoo Kim
2013-12-18 6:53 ` [PATCH v3 06/14] mm, hugetlb: remove vma_has_reserves() Joonsoo Kim
2013-12-18 6:53 ` Joonsoo Kim
2013-12-18 6:53 ` [PATCH v3 07/14] mm, hugetlb: mm, hugetlb: unify chg and avoid_reserve to use_reserve Joonsoo Kim
2013-12-18 6:53 ` Joonsoo Kim
2013-12-18 6:53 ` [PATCH v3 08/14] mm, hugetlb: call vma_needs_reservation before entering alloc_huge_page() Joonsoo Kim
2013-12-18 6:53 ` Joonsoo Kim
2013-12-18 6:53 ` [PATCH v3 09/14] mm, hugetlb: remove a check for return value of alloc_huge_page() Joonsoo Kim
2013-12-18 6:53 ` Joonsoo Kim
2013-12-18 6:53 ` [PATCH v3 10/14] mm, hugetlb: move down outside_reserve check Joonsoo Kim
2013-12-18 6:53 ` Joonsoo Kim
2013-12-18 6:53 ` [PATCH v3 11/14] mm, hugetlb: move up anon_vma_prepare() Joonsoo Kim
2013-12-18 6:53 ` Joonsoo Kim
2013-12-18 6:53 ` [PATCH v3 12/14] mm, hugetlb: clean-up error handling in hugetlb_cow() Joonsoo Kim
2013-12-18 6:53 ` Joonsoo Kim
2013-12-18 6:53 ` [PATCH v3 13/14] mm, hugetlb: retry if failed to allocate and there is concurrent user Joonsoo Kim
2013-12-18 6:53 ` Joonsoo Kim
2013-12-20 1:02 ` Andrew Morton
2013-12-20 1:02 ` Andrew Morton
2013-12-20 1:58 ` Joonsoo Kim
2013-12-20 1:58 ` Joonsoo Kim
2013-12-20 2:15 ` Andrew Morton
2013-12-20 2:15 ` Andrew Morton
2013-12-20 5:00 ` Joonsoo Kim
2013-12-20 5:00 ` Joonsoo Kim
2013-12-20 2:31 ` Davidlohr Bueso
2013-12-20 2:31 ` Davidlohr Bueso
2013-12-20 4:47 ` Joonsoo Kim
2013-12-20 4:47 ` Joonsoo Kim
2013-12-20 14:01 ` Mel Gorman
2013-12-20 14:01 ` Mel Gorman
2013-12-21 6:48 ` Davidlohr Bueso
2013-12-21 6:48 ` Davidlohr Bueso
2013-12-23 0:44 ` Joonsoo Kim
2013-12-23 0:44 ` Joonsoo Kim
2013-12-23 2:11 ` Joonsoo Kim
2013-12-23 2:11 ` Joonsoo Kim
2014-01-03 19:55 ` Davidlohr Bueso
2014-01-03 19:55 ` Davidlohr Bueso
2014-01-06 0:19 ` Joonsoo Kim
2014-01-06 0:19 ` Joonsoo Kim
2014-01-06 12:19 ` Davidlohr Bueso
2014-01-06 12:19 ` Davidlohr Bueso
2014-01-07 1:57 ` Joonsoo Kim
2014-01-07 1:57 ` Joonsoo Kim
2014-01-07 2:36 ` Davidlohr Bueso
2014-01-07 2:36 ` Davidlohr Bueso
2014-01-15 3:08 ` David Rientjes
2014-01-15 3:08 ` David Rientjes
2014-01-15 4:37 ` Davidlohr Bueso
2014-01-15 4:37 ` Davidlohr Bueso
2014-01-15 4:56 ` Andrew Morton
2014-01-15 4:56 ` Andrew Morton
2014-01-15 20:47 ` Davidlohr Bueso
2014-01-15 20:47 ` Davidlohr Bueso
2014-01-15 20:50 ` Andrew Morton
2014-01-15 20:50 ` Andrew Morton
2013-12-18 6:54 ` [PATCH v3 14/14] mm, hugetlb: remove a hugetlb_instantiation_mutex Joonsoo Kim
2013-12-18 6:54 ` Joonsoo Kim
2014-03-31 16:27 ` [PATCH v3 00/14] " Dave Hansen
2014-03-31 16:27 ` Dave Hansen
2014-03-31 17:26 ` Davidlohr Bueso
2014-03-31 17:26 ` Davidlohr Bueso
2014-03-31 18:41 ` Dave Hansen [this message]
2014-03-31 18:41 ` Dave Hansen
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=5339B6F4.9000809@intel.com \
--to=dave.hansen@intel.com \
--cc=akpm@linux-foundation.org \
--cc=aneesh.kumar@linux.vnet.ibm.com \
--cc=david@gibson.dropbear.id.au \
--cc=davidlohr.bueso@hp.com \
--cc=davidlohr@hp.com \
--cc=dhillf@gmail.com \
--cc=hughd@google.com \
--cc=iamjoonsoo.kim@lge.com \
--cc=js1304@gmail.com \
--cc=kamezawa.hiroyu@jp.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mgorman@suse.de \
--cc=mhocko@suse.cz \
--cc=n-horiguchi@ah.jp.nec.com \
--cc=riel@redhat.com \
/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.