mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: tj@kernel.org
Cc: linux-kernel@vger.kernel.org, rusty@rustcorp.com.au,
	cl@linux-foundation.org, mingo@elte.hu, hpa@zytor.com
Subject: Re: [PATCH 2/3] sparc64: implement page mapping percpu first chunk allocator
Date: Mon, 28 Sep 2009 14:36:56 -0700 (PDT)	[thread overview]
Message-ID: <20090928.143656.208349447.davem@davemloft.net> (raw)
In-Reply-To: <4ABB6C80.20109@kernel.org>

From: Tejun Heo <tj@kernel.org>
Date: Thu, 24 Sep 2009 21:56:32 +0900

> Implement page mapping percpu first chunk allocator as a fallback to
> the embedding allocator.  The next patch will make the embedding
> allocator check distances between units to determine whether it fits
> within the vmalloc area so that this fallback can be used on such
> cases.
> 
> sparc64 currently has relatively small vmalloc area which makes it
> impossible to create any dynamic chunks on certain configurations
> leading to percpu allocation failures.  This and the next patch should
> allow those configurations to keep working until proper solution is
> found.
> 
> Signed-off-by: Tejun Heo <tj@kernel.org>
> ---
> David, can you please ack this after reviewing?

Tejun I am testing out the following patch which will make these
patches of your's basically unnecessary:

diff --git a/arch/sparc/include/asm/pgtable_64.h b/arch/sparc/include/asm/pgtable_64.h
index 0ff92fa..f3cb790 100644
--- a/arch/sparc/include/asm/pgtable_64.h
+++ b/arch/sparc/include/asm/pgtable_64.h
@@ -41,8 +41,8 @@
 #define LOW_OBP_ADDRESS		_AC(0x00000000f0000000,UL)
 #define HI_OBP_ADDRESS		_AC(0x0000000100000000,UL)
 #define VMALLOC_START		_AC(0x0000000100000000,UL)
-#define VMALLOC_END		_AC(0x0000000200000000,UL)
-#define VMEMMAP_BASE		_AC(0x0000000200000000,UL)
+#define VMALLOC_END		_AC(0x0000010000000000,UL)
+#define VMEMMAP_BASE		_AC(0x0000010000000000,UL)
 
 #define vmemmap			((struct page *)VMEMMAP_BASE)
 
diff --git a/arch/sparc/kernel/ktlb.S b/arch/sparc/kernel/ktlb.S
index 3ea6e8c..1d36147 100644
--- a/arch/sparc/kernel/ktlb.S
+++ b/arch/sparc/kernel/ktlb.S
@@ -280,8 +280,8 @@ kvmap_dtlb_nonlinear:
 
 #ifdef CONFIG_SPARSEMEM_VMEMMAP
 	/* Do not use the TSB for vmemmap.  */
-	mov		(VMEMMAP_BASE >> 24), %g5
-	sllx		%g5, 24, %g5
+	mov		(VMEMMAP_BASE >> 40), %g5
+	sllx		%g5, 40, %g5
 	cmp		%g4,%g5
 	bgeu,pn		%xcc, kvmap_vmemmap
 	 nop
@@ -293,8 +293,8 @@ kvmap_dtlb_tsbmiss:
 	sethi		%hi(MODULES_VADDR), %g5
 	cmp		%g4, %g5
 	blu,pn		%xcc, kvmap_dtlb_longpath
-	 mov		(VMALLOC_END >> 24), %g5
-	sllx		%g5, 24, %g5
+	 mov		(VMALLOC_END >> 40), %g5
+	sllx		%g5, 40, %g5
 	cmp		%g4, %g5
 	bgeu,pn		%xcc, kvmap_dtlb_longpath
 	 nop

  parent reply	other threads:[~2009-09-28 21:36 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-24 12:55 [PATCH 1/3] percpu: make pcpu_build_alloc_info() clear static buffers Tejun Heo
2009-09-24 12:56 ` [PATCH 2/3] sparc64: implement page mapping percpu first chunk allocator Tejun Heo
2009-09-24 12:57   ` [PATCH 3/3] percpu: make embedding first chunk allocator check vmalloc space size Tejun Heo
2009-09-24 22:51   ` [PATCH 2/3] sparc64: implement page mapping percpu first chunk allocator David Miller
2009-09-28 21:36   ` David Miller [this message]
2009-09-29  0:14     ` Tejun Heo
2009-09-29  0:16       ` David Miller

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=20090928.143656.208349447.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=cl@linux-foundation.org \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=rusty@rustcorp.com.au \
    --cc=tj@kernel.org \
    /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®