Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757774Ab3GRJHZ (ORCPT ); Thu, 18 Jul 2013 05:07:25 -0400 Received: from lgeamrelo01.lge.com ([156.147.1.125]:49200 "EHLO LGEAMRELO01.lge.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757072Ab3GRJHV (ORCPT ); Thu, 18 Jul 2013 05:07:21 -0400 X-AuditID: 9c93017d-b7b45ae000000e34-eb-51e7b047b040 Date: Thu, 18 Jul 2013 18:07:19 +0900 From: Joonsoo Kim To: Davidlohr Bueso Cc: Andrew Morton , David Gibson , Hugh Dickins , Rik van Riel , Michel Lespinasse , Mel Gorman , Konstantin Khlebnikov , Michal Hocko , "AneeshKumarK.V" , KAMEZAWA Hiroyuki , Hillf Danton , linux-mm@kvack.org, LKML , Eric B Munson , Anton Blanchard Subject: Re: [PATCH] hugepage: allow parallelization of the hugepage fault path Message-ID: <20130718090719.GB9761@lge.com> References: <1373671681.2448.10.camel@buesod1.americas.hpqcorp.net> <1373858204.13826.9.camel@buesod1.americas.hpqcorp.net> <20130715072432.GA28053@voom.fritz.box> <20130715160802.9d0cdc0ee012b5e119317a98@linux-foundation.org> <1374090625.15271.2.camel@buesod1.americas.hpqcorp.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1374090625.15271.2.camel@buesod1.americas.hpqcorp.net> User-Agent: Mutt/1.5.21 (2010-09-15) X-Brightmail-Tracker: AAAAAA== Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1847 Lines: 44 On Wed, Jul 17, 2013 at 12:50:25PM -0700, Davidlohr Bueso wrote: > From: Davidlohr Bueso > > - Cleaned up and forward ported to Linus' latest. > - Cache aligned mutexes. > - Keep non SMP systems using a single mutex. > > It was found that this mutex can become quite contended > during the early phases of large databases which make use of huge pages - for instance > startup and initial runs. One clear example is a 1.5Gb Oracle database, where lockstat > reports that this mutex can be one of the top 5 most contended locks in the kernel during > the first few minutes: > > hugetlb_instantiation_mutex: 10678 10678 > --------------------------- > hugetlb_instantiation_mutex 10678 [] hugetlb_fault+0x9e/0x340 > --------------------------- > hugetlb_instantiation_mutex 10678 [] hugetlb_fault+0x9e/0x340 > > contentions: 10678 > acquisitions: 99476 > waittime-total: 76888911.01 us Hello, I have a question :) So, each contention takes 7.6 ms in your result. Do you map this area with VM_NORESERVE? If we map with VM_RESERVE, when page fault, we just dequeue a huge page from a queue and clear a page and then map it to a page table. So I guess, it shouldn't take so long. I'm wondering why it takes so long. And do you use 16KB-size hugepage? If so, region handling could takes some times. If you access the area as random order, the number of region can be more than 90000. I guess, this can be one reason to too long waittime. Thanks. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/