Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm attempting to mount a partition from a NAS and the block size is 65536 bytes, this is above my distribution's precompiled kernel memory paging size of 4KiB, so I cannot mount it normally.

Which kernel compilation parameters would I need to change to get a memory paging size large enough? Would it be possible under the x86-64 architecture?

EDIT: There doesn't seem to be an option for it in make xconfig unless I'm just missing it.

From page_types.h under arch\x86\include\asm

/* PAGE_SHIFT determines the page size */
#define PAGE_SHIFT  12
#define PAGE_SIZE   (_AC(1,UL) << PAGE_SHIFT)
#define PAGE_MASK   (~(PAGE_SIZE-1))`

It doesn't look to be configurable. I could change this number directly to 16 and it would probably make pretty explosions and destroy Tokyo. I shall probably try it later this evening.

share|improve this question

You need to change your kernel page size. Not recommending it, but possible I suppose.

It has nothing to do with your architecture though. (i.e. if its possible, it can be done with your architecture, and if it can't its not because of your architecture)

share|improve this answer… ;) I also definitely have an ext4 partition with 64k block size. – OmnipotentEntity May 31 '11 at 20:25
Didn't see that :) but it seems that the upvoted answer agrees with me. I guess that means that you need to change the kernel page size to get it to work. – soandos May 31 '11 at 20:27
Yes, and my specific question was is it possible with the x86_64 arch and if so, which parameters do I need to change. :D – OmnipotentEntity May 31 '11 at 20:32
So yes, it is, you need to change the kernel page size in the kernel. It not some option lying around, but probably (speculation) will require a recompilation of the kernel (or have someone do it for you). Why does it matter btw? – soandos May 31 '11 at 20:36
Yes, it will require recompiling the kernel, this is not that big of a deal to me, I just need to know which parameter I need to change in the kernel's configuration wizard. All of this I mentioned in the original question btw. ;) It matters because my NAS died and I need the information off of it. – OmnipotentEntity May 31 '11 at 20:38
up vote 0 down vote accepted

From page_types.h under arch\x86\include\asm

/* PAGE_SHIFT determines the page size */
#define PAGE_SHIFT  12
#define PAGE_SIZE   (_AC(1,UL) << PAGE_SHIFT)
#define PAGE_MASK   (~(PAGE_SIZE-1))

changing the 12 into a 16 results in

arch/x86/kernel/head64.c: In function ‘x86_64_start_kernel’:
arch/x86/kernel/head64.c:71: error: negative width in bit-field ‘<anonymous>’
make[2]: *** [arch/x86/kernel/head64.o] Error 1

Because this is just sanity checking code for modules offsets it seems that changing the memory paging size has a lot of unintended side effects which will make this far from simple. I guess I'm stuck with finding another arch to run on. :(

Here is a list of the archs that support 64KiB or greater page sizes: ia64, mips, pa-risc, powerpc, sh, sparc64. So it looks like my best bet it to find an old-PPC Mac.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.