Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758073Ab3IMOXN (ORCPT ); Fri, 13 Sep 2013 10:23:13 -0400 Received: from mga03.intel.com ([143.182.124.21]:13494 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758046Ab3IMOXL (ORCPT ); Fri, 13 Sep 2013 10:23:11 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.90,898,1371106800"; d="scan'208";a="294503875" From: "Kirill A. Shutemov" To: Peter Zijlstra Cc: "Kirill A. Shutemov" , Alex Thorlton , Ingo Molnar , Andrew Morton , Naoya Horiguchi , "Eric W . Biederman" , "Paul E . McKenney" , Al Viro , Andi Kleen , Andrea Arcangeli , Dave Hansen , Dave Jones , David Howells , Frederic Weisbecker , Johannes Weiner , Kees Cook , Mel Gorman , Michael Kerrisk , Oleg Nesterov , Rik van Riel , Robin Holt , Sedat Dilek , Srikar Dronamraju , Thomas Gleixner , linux-kernel@vger.kernel.org, linux-mm@kvack.org In-Reply-To: <20130913131907.GC21832@twins.programming.kicks-ass.net> References: <20130910074748.GA2971@gmail.com> <1379077576-2472-1-git-send-email-kirill.shutemov@linux.intel.com> <1379077576-2472-4-git-send-email-kirill.shutemov@linux.intel.com> <20130913131907.GC21832@twins.programming.kicks-ass.net> Subject: Re: [PATCH 3/9] mm: introduce api for split page table lock for PMD level Content-Transfer-Encoding: 7bit Message-Id: <20130913142253.11FCFE0090@blue.fi.intel.com> Date: Fri, 13 Sep 2013 17:22:52 +0300 (EEST) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1507 Lines: 44 Peter Zijlstra wrote: > On Fri, Sep 13, 2013 at 04:06:10PM +0300, Kirill A. Shutemov wrote: > > Basic api, backed by mm->page_table_lock for now. Actual implementation > > will be added later. > > > > Signed-off-by: Naoya Horiguchi > > Signed-off-by: Kirill A. Shutemov > > --- > > include/linux/mm.h | 13 +++++++++++++ > > 1 file changed, 13 insertions(+) > > > > diff --git a/include/linux/mm.h b/include/linux/mm.h > > index 6cf8ddb..d4361e7 100644 > > --- a/include/linux/mm.h > > +++ b/include/linux/mm.h > > @@ -1294,6 +1294,19 @@ static inline void pgtable_page_dtor(struct page *page) > > ((unlikely(pmd_none(*(pmd))) && __pte_alloc_kernel(pmd, address))? \ > > NULL: pte_offset_kernel(pmd, address)) > > > > +static inline spinlock_t *huge_pmd_lockptr(struct mm_struct *mm, pmd_t *pmd) > > +{ > > + return &mm->page_table_lock; > > +} > > + > > + > > +static inline spinlock_t *huge_pmd_lock(struct mm_struct *mm, pmd_t *pmd) > > +{ > > + spinlock_t *ptl = huge_pmd_lockptr(mm, pmd); > > + spin_lock(ptl); > > + return ptl; > > +} > > Why not call the thing pmd_lock()? The pmd bit differentiates it from > pte_lock() enough IMIO. Okay, will rename it. -- Kirill A. Shutemov -- 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/