From: Steven Rostedt <rostedt@goodmis.org>
To: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
Cc: Alex Thorlton <athorlton@sgi.com>, Ingo Molnar <mingo@redhat.com>,
Andrew Morton <akpm@linux-foundation.org>,
Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>,
"Eric W . Biederman" <ebiederm@xmission.com>,
"Paul E . McKenney" <paulmck@linux.vnet.ibm.com>,
Al Viro <viro@zeniv.linux.org.uk>,
Andi Kleen <ak@linux.intel.com>,
Andrea Arcangeli <aarcange@redhat.com>,
Dave Hansen <dave.hansen@intel.com>,
Dave Jones <davej@redhat.com>,
David Howells <dhowells@redhat.com>,
Frederic Weisbecker <fweisbec@gmail.com>,
Johannes Weiner <hannes@cmpxchg.org>,
Kees Cook <keescook@chromium.org>, Mel Gorman <mgorman@suse.de>,
Michael Kerrisk <mtk.manpages@gmail.com>,
Oleg Nesterov <oleg@redhat.com>,
Peter Zijlstra <peterz@infradead.org>,
Rik van Riel <riel@redhat.com>, Robin Holt <robinmholt@gmail.com>,
Sedat Dilek <sedat.dilek@gmail.com>,
Srikar Dronamraju <srikar@linux.vnet.ibm.com>,
Thomas Gleixner <tglx@linutronix.de>,
linux-kernel@vger.kernel.org, linux-mm@kvack.org
Subject: Re: [PATCHv5 11/11] x86, mm: enable split page table lock for PMD level
Date: Mon, 7 Oct 2013 12:09:09 -0400 [thread overview]
Message-ID: <20131007160909.GA15214@home.goodmis.org> (raw)
In-Reply-To: <1381154053-4848-12-git-send-email-kirill.shutemov@linux.intel.com>
On Mon, Oct 07, 2013 at 04:54:13PM +0300, Kirill A. Shutemov wrote:
>
> config ARCH_HIBERNATION_HEADER
> diff --git a/arch/x86/include/asm/pgalloc.h b/arch/x86/include/asm/pgalloc.h
> index b4389a468f..e2fb2b6934 100644
> --- a/arch/x86/include/asm/pgalloc.h
> +++ b/arch/x86/include/asm/pgalloc.h
> @@ -80,12 +80,21 @@ static inline void pmd_populate(struct mm_struct *mm, pmd_t *pmd,
> #if PAGETABLE_LEVELS > 2
> static inline pmd_t *pmd_alloc_one(struct mm_struct *mm, unsigned long addr)
> {
> - return (pmd_t *)get_zeroed_page(GFP_KERNEL|__GFP_REPEAT);
> + struct page *page;
> + page = alloc_pages(GFP_KERNEL | __GFP_REPEAT| __GFP_ZERO, 0);
> + if (!page)
> + return NULL;
> + if (!pgtable_pmd_page_ctor(page)) {
> + __free_pages(page, 0);
> + return NULL;
Thanks for thinking about us -rt folks :-)
Yeah, this is good, as we can't put the lock into the page table.
Consider this and the previous patch:
Reviewed-by: Steven Rostedt <rostedt@goodmis.org>
-- Steve
> + }
> + return (pmd_t *)page_address(page);
> }
>
> static inline void pmd_free(struct mm_struct *mm, pmd_t *pmd)
> {
> BUG_ON((unsigned long)pmd & (PAGE_SIZE-1));
> + pgtable_pmd_page_dtor(virt_to_page(pmd));
> free_page((unsigned long)pmd);
> }
>
> --
> 1.8.4.rc3
>
> --
> 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/
--
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: Steven Rostedt <rostedt@goodmis.org>
To: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
Cc: Alex Thorlton <athorlton@sgi.com>, Ingo Molnar <mingo@redhat.com>,
Andrew Morton <akpm@linux-foundation.org>,
Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>,
"Eric W . Biederman" <ebiederm@xmission.com>,
"Paul E . McKenney" <paulmck@linux.vnet.ibm.com>,
Al Viro <viro@zeniv.linux.org.uk>,
Andi Kleen <ak@linux.intel.com>,
Andrea Arcangeli <aarcange@redhat.com>,
Dave Hansen <dave.hansen@intel.com>,
Dave Jones <davej@redhat.com>,
David Howells <dhowells@redhat.com>,
Frederic Weisbecker <fweisbec@gmail.com>,
Johannes Weiner <hannes@cmpxchg.org>,
Kees Cook <keescook@chromium.org>, Mel Gorman <mgorman@suse.de>,
Michael Kerrisk <mtk.manpages@gmail.com>,
Oleg Nesterov <oleg@redhat.com>,
Peter Zijlstra <peterz@infradead.org>,
Rik van Riel <riel@redhat.com>, Robin Holt <robinmholt@gmail.com>,
Sedat Dilek <sedat.dilek@gmail.com>,
Srikar Dronamraju <srikar@linux.vnet.ibm.com>,
Thomas Gleixner <tglx@linutronix.de>,
linux-kernel@vger.kernel.org, linux-mm@kvack.org
Subject: Re: [PATCHv5 11/11] x86, mm: enable split page table lock for PMD level
Date: Mon, 7 Oct 2013 12:09:09 -0400 [thread overview]
Message-ID: <20131007160909.GA15214@home.goodmis.org> (raw)
In-Reply-To: <1381154053-4848-12-git-send-email-kirill.shutemov@linux.intel.com>
On Mon, Oct 07, 2013 at 04:54:13PM +0300, Kirill A. Shutemov wrote:
>
> config ARCH_HIBERNATION_HEADER
> diff --git a/arch/x86/include/asm/pgalloc.h b/arch/x86/include/asm/pgalloc.h
> index b4389a468f..e2fb2b6934 100644
> --- a/arch/x86/include/asm/pgalloc.h
> +++ b/arch/x86/include/asm/pgalloc.h
> @@ -80,12 +80,21 @@ static inline void pmd_populate(struct mm_struct *mm, pmd_t *pmd,
> #if PAGETABLE_LEVELS > 2
> static inline pmd_t *pmd_alloc_one(struct mm_struct *mm, unsigned long addr)
> {
> - return (pmd_t *)get_zeroed_page(GFP_KERNEL|__GFP_REPEAT);
> + struct page *page;
> + page = alloc_pages(GFP_KERNEL | __GFP_REPEAT| __GFP_ZERO, 0);
> + if (!page)
> + return NULL;
> + if (!pgtable_pmd_page_ctor(page)) {
> + __free_pages(page, 0);
> + return NULL;
Thanks for thinking about us -rt folks :-)
Yeah, this is good, as we can't put the lock into the page table.
Consider this and the previous patch:
Reviewed-by: Steven Rostedt <rostedt@goodmis.org>
-- Steve
> + }
> + return (pmd_t *)page_address(page);
> }
>
> static inline void pmd_free(struct mm_struct *mm, pmd_t *pmd)
> {
> BUG_ON((unsigned long)pmd & (PAGE_SIZE-1));
> + pgtable_pmd_page_dtor(virt_to_page(pmd));
> free_page((unsigned long)pmd);
> }
>
> --
> 1.8.4.rc3
>
> --
> 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/
next prev parent reply other threads:[~2013-10-07 16:09 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-07 13:54 [PATCHv5 00/11] split page table lock for PMD tables Kirill A. Shutemov
2013-10-07 13:54 ` Kirill A. Shutemov
2013-10-07 13:54 ` [PATCHv5 01/11] mm: avoid increase sizeof(struct page) due to split page table lock Kirill A. Shutemov
2013-10-07 13:54 ` Kirill A. Shutemov
2013-10-07 13:54 ` [PATCHv5 02/11] mm: rename USE_SPLIT_PTLOCKS to USE_SPLIT_PTE_PTLOCKS Kirill A. Shutemov
2013-10-07 13:54 ` Kirill A. Shutemov
2013-10-07 13:54 ` [PATCHv5 03/11] mm: convert mm->nr_ptes to atomic_long_t Kirill A. Shutemov
2013-10-07 13:54 ` Kirill A. Shutemov
2013-10-07 13:54 ` [PATCHv5 04/11] mm: introduce api for split page table lock for PMD level Kirill A. Shutemov
2013-10-07 13:54 ` Kirill A. Shutemov
2013-10-07 13:54 ` [PATCHv5 05/11] mm, thp: change pmd_trans_huge_lock() to return taken lock Kirill A. Shutemov
2013-10-07 13:54 ` Kirill A. Shutemov
2013-10-07 13:54 ` [PATCHv5 06/11] mm, thp: move ptl taking inside page_check_address_pmd() Kirill A. Shutemov
2013-10-07 13:54 ` Kirill A. Shutemov
2013-10-07 13:54 ` [PATCHv5 07/11] mm, thp: do not access mm->pmd_huge_pte directly Kirill A. Shutemov
2013-10-07 13:54 ` Kirill A. Shutemov
2013-10-07 13:54 ` [PATCHv5 08/11] mm, hugetlb: convert hugetlbfs to use split pmd lock Kirill A. Shutemov
2013-10-07 13:54 ` Kirill A. Shutemov
2013-10-07 13:54 ` [PATCHv5 09/11] mm: convent the rest to new page table lock api Kirill A. Shutemov
2013-10-07 13:54 ` Kirill A. Shutemov
2013-10-07 13:54 ` [PATCHv5 10/11] mm: implement split page table lock for PMD level Kirill A. Shutemov
2013-10-07 13:54 ` Kirill A. Shutemov
2013-10-07 13:54 ` [PATCHv5 11/11] x86, mm: enable " Kirill A. Shutemov
2013-10-07 13:54 ` Kirill A. Shutemov
2013-10-07 16:09 ` Steven Rostedt [this message]
2013-10-07 16:09 ` Steven Rostedt
2013-10-07 23:09 ` [PATCHv5 00/11] split page table lock for PMD tables Andrew Morton
2013-10-07 23:09 ` Andrew Morton
2013-10-08 8:49 ` Kirill A. Shutemov
2013-10-08 8:49 ` Kirill A. Shutemov
2013-10-08 9:04 ` Ingo Molnar
2013-10-08 9:04 ` Ingo Molnar
2013-10-08 9:50 ` Kirill A. Shutemov
2013-10-08 9:56 ` Peter Zijlstra
2013-10-08 9:56 ` Peter Zijlstra
2013-10-08 10:13 ` Ingo Molnar
2013-10-08 10:13 ` Ingo Molnar
2013-10-08 9:39 ` Peter Zijlstra
2013-10-08 9:39 ` Peter Zijlstra
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=20131007160909.GA15214@home.goodmis.org \
--to=rostedt@goodmis.org \
--cc=aarcange@redhat.com \
--cc=ak@linux.intel.com \
--cc=akpm@linux-foundation.org \
--cc=athorlton@sgi.com \
--cc=dave.hansen@intel.com \
--cc=davej@redhat.com \
--cc=dhowells@redhat.com \
--cc=ebiederm@xmission.com \
--cc=fweisbec@gmail.com \
--cc=hannes@cmpxchg.org \
--cc=keescook@chromium.org \
--cc=kirill.shutemov@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mgorman@suse.de \
--cc=mingo@redhat.com \
--cc=mtk.manpages@gmail.com \
--cc=n-horiguchi@ah.jp.nec.com \
--cc=oleg@redhat.com \
--cc=paulmck@linux.vnet.ibm.com \
--cc=peterz@infradead.org \
--cc=riel@redhat.com \
--cc=robinmholt@gmail.com \
--cc=sedat.dilek@gmail.com \
--cc=srikar@linux.vnet.ibm.com \
--cc=tglx@linutronix.de \
--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.