From: Nick Piggin <npiggin@suse.de>
To: Pekka Enberg <penberg@cs.helsinki.fi>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: [patch 2/2] slqb: x86 cleanup
Date: Mon, 2 Mar 2009 07:52:47 +0100 [thread overview]
Message-ID: <20090302065247.GB1257@wotan.suse.de> (raw)
In-Reply-To: <20090302064735.GA1257@wotan.suse.de>
My virt_to_page_fast speedup for x86-64 snuck in to the slqb patch, where it
does not belong. Oops.
Signed-off-by: Nick Piggin <npiggin@suse.de>
---
Index: linux-2.6/arch/x86/include/asm/page.h
===================================================================
--- linux-2.6.orig/arch/x86/include/asm/page.h 2009-03-02 17:41:56.000000000 +1100
+++ linux-2.6/arch/x86/include/asm/page.h 2009-03-02 17:42:02.000000000 +1100
@@ -193,7 +193,6 @@ static inline pteval_t native_pte_flags(
* virt_addr_valid(kaddr) returns true.
*/
#define virt_to_page(kaddr) pfn_to_page(__pa(kaddr) >> PAGE_SHIFT)
-#define virt_to_page_fast(kaddr) pfn_to_page(((unsigned long)(kaddr) - PAGE_OFFSET) >> PAGE_SHIFT)
#define pfn_to_kaddr(pfn) __va((pfn) << PAGE_SHIFT)
extern bool __virt_addr_valid(unsigned long kaddr);
#define virt_addr_valid(kaddr) __virt_addr_valid((unsigned long) (kaddr))
Index: linux-2.6/mm/slqb.c
===================================================================
--- linux-2.6.orig/mm/slqb.c 2009-03-02 17:41:56.000000000 +1100
+++ linux-2.6/mm/slqb.c 2009-03-02 17:42:09.000000000 +1100
@@ -156,11 +156,7 @@ static inline struct zone *slqb_page_zon
static inline int virt_to_nid(const void *addr)
{
-#ifdef virt_to_page_fast
- return page_to_nid(virt_to_page_fast(addr));
-#else
return page_to_nid(virt_to_page(addr));
-#endif
}
static inline struct slqb_page *virt_to_head_slqb_page(const void *addr)
Index: linux-2.6/include/linux/mm.h
===================================================================
--- linux-2.6.orig/include/linux/mm.h 2009-03-02 17:42:59.000000000 +1100
+++ linux-2.6/include/linux/mm.h 2009-03-02 17:43:09.000000000 +1100
@@ -305,11 +305,7 @@ static inline void get_page(struct page
static inline struct page *virt_to_head_page(const void *x)
{
-#ifdef virt_to_page_fast
- struct page *page = virt_to_page_fast(x);
-#else
struct page *page = virt_to_page(x);
-#endif
return compound_head(page);
}
next prev parent reply other threads:[~2009-03-02 6:53 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-02 6:47 [patch 1/2] slqb: fix deadlock Nick Piggin
2009-03-02 6:52 ` Nick Piggin [this message]
2009-03-02 8:09 ` [patch 2/2] slqb: x86 cleanup Pekka Enberg
2009-03-02 8:09 ` [patch 1/2] slqb: fix deadlock Pekka Enberg
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=20090302065247.GB1257@wotan.suse.de \
--to=npiggin@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=penberg@cs.helsinki.fi \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®