From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754466Ab3JCXLN (ORCPT ); Thu, 3 Oct 2013 19:11:13 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:58965 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754397Ab3JCXLL (ORCPT ); Thu, 3 Oct 2013 19:11:11 -0400 Date: Thu, 3 Oct 2013 16:11:09 -0700 From: Andrew Morton To: "Kirill A. Shutemov" Cc: Alex Thorlton , Ingo Molnar , 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 , Peter Zijlstra , Rik van Riel , Robin Holt , Sedat Dilek , Srikar Dronamraju , Thomas Gleixner , linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCHv4 09/10] mm: implement split page table lock for PMD level Message-Id: <20131003161109.aa568784d6fc48e61dc1d33e@linux-foundation.org> In-Reply-To: <1380287787-30252-10-git-send-email-kirill.shutemov@linux.intel.com> References: <1380287787-30252-1-git-send-email-kirill.shutemov@linux.intel.com> <1380287787-30252-10-git-send-email-kirill.shutemov@linux.intel.com> X-Mailer: Sylpheed 3.2.0beta5 (GTK+ 2.24.10; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 27 Sep 2013 16:16:26 +0300 "Kirill A. Shutemov" wrote: > The basic idea is the same as with PTE level: the lock is embedded into > struct page of table's page. > > We can't use mm->pmd_huge_pte to store pgtables for THP, since we don't > take mm->page_table_lock anymore. Let's reuse page->lru of table's page > for that. > > pgtable_pmd_page_ctor() returns true, if initialization is successful > and false otherwise. Current implementation never fails, but assumption > that constructor can fail will help to port it to -rt where spinlock_t > is rather huge and cannot be embedded into struct page -- dynamic > allocation is required. spinlock_t is rather large when lockdep is enabled. What happens? From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pb0-f49.google.com (mail-pb0-f49.google.com [209.85.160.49]) by kanga.kvack.org (Postfix) with ESMTP id C92256B0031 for ; Thu, 3 Oct 2013 19:11:14 -0400 (EDT) Received: by mail-pb0-f49.google.com with SMTP id xb4so3113553pbc.36 for ; Thu, 03 Oct 2013 16:11:14 -0700 (PDT) Date: Thu, 3 Oct 2013 16:11:09 -0700 From: Andrew Morton Subject: Re: [PATCHv4 09/10] mm: implement split page table lock for PMD level Message-Id: <20131003161109.aa568784d6fc48e61dc1d33e@linux-foundation.org> In-Reply-To: <1380287787-30252-10-git-send-email-kirill.shutemov@linux.intel.com> References: <1380287787-30252-1-git-send-email-kirill.shutemov@linux.intel.com> <1380287787-30252-10-git-send-email-kirill.shutemov@linux.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-linux-mm@kvack.org List-ID: To: "Kirill A. Shutemov" Cc: Alex Thorlton , Ingo Molnar , 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 , Peter Zijlstra , Rik van Riel , Robin Holt , Sedat Dilek , Srikar Dronamraju , Thomas Gleixner , linux-kernel@vger.kernel.org, linux-mm@kvack.org On Fri, 27 Sep 2013 16:16:26 +0300 "Kirill A. Shutemov" wrote: > The basic idea is the same as with PTE level: the lock is embedded into > struct page of table's page. > > We can't use mm->pmd_huge_pte to store pgtables for THP, since we don't > take mm->page_table_lock anymore. Let's reuse page->lru of table's page > for that. > > pgtable_pmd_page_ctor() returns true, if initialization is successful > and false otherwise. Current implementation never fails, but assumption > that constructor can fail will help to port it to -rt where spinlock_t > is rather huge and cannot be embedded into struct page -- dynamic > allocation is required. spinlock_t is rather large when lockdep is enabled. What happens? -- 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: email@kvack.org