<HTML><BODY><br>
<blockquote style="border-left:1px solid #0857A6; margin:10px; padding:0 0 0 10px;" class="mailru-blockquote">
        <div id=""><div class="js-helper js-readmsg-msg">
        <style type="text/css"></style>
        <div id="style_13605783940000000327" class="mr_read__body">
                <base target="_self" href="https://e.mail.ru/cgi-bin/">
                
                        <div id="style_13605783940000000327_BODY">"Aneesh Kumar K.V" <<a href="sentmsg?compose&To=aneesh.kumar@linux.vnet.ibm.com">aneesh.kumar@linux.vnet.ibm.com</a>> writes:<br><br>> Phileas Fogg <<a href="sentmsg?compose&To=phileas%2dfogg@mail.ru">phileas-fogg@mail.ru</a>> writes:<br>><br>>>  And another note.<br>>> I took a look at the MMU chapter in the Cell Architecture handbook and indeed the first 15 bits in VA are treated as 0 by the hardware.<br>>><br>>> Quote:<br>>><br>>> 1. High-order bits above 65 bits in the 80-bit virtual address (VA[0:14]) are not implemented. The hardware always<br>>>    treats these bits as `0'. Software must not set these bits to any other value than `0' or the results are undefined in<br>>>    the PPE.<br>>><br>>><br>><br>> True, we missed the below part of ISA doc:<br>><br>> ISA doc says<br>><br>> "On implementations that support a virtual address size<br>> of only n bits, n < 78, bits 0:77-n of the AVA field must be<br>> zeros. "<br>><br>> The Cell document I found at <br>><br>> <a href="https://www-01.ibm.com/chips/techlib/techlib.nsf/techdocs/7A77CCDF14FE70D5852575CA0074E8ED/$file/CellBE_Handbook_v1.12_3Apr09_pub.pdf" target="_blank">https://www-01.ibm.com/chips/techlib/techlib.nsf/techdocs/7A77CCDF14FE70D5852575CA0074E8ED/$file/CellBE_Handbook_v1.12_3Apr09_pub.pdf</a><br>><br>> gives <br>><br>> Virtual Address (VA) Size -> 65 bits<br>><br>> So as per ISA, bits 0:12 should be zero, which should make 0:14 of PTE<br>> fields zero for Cell.<br>><br>> I will try to do a patch. <br>><br><br>Can you try this patch ?<br><br>diff --git a/arch/powerpc/include/asm/mmu-hash64.h b/arch/powerpc/include/asm/mmu-hash64.h<br>index 2fdb47a..f01fd9a 100644<br>--- a/arch/powerpc/include/asm/mmu-hash64.h<br>+++ b/arch/powerpc/include/asm/mmu-hash64.h<br>@@ -381,21 +381,37 @@ extern void slb_set_size(u16 size);<br>  * hash collisions.<br>  */<br> <br>+/* This should go in Kconfig */<br>+/*<br>+ * Be careful with this value. This determines the VSID_MODULUS_*  and that<br>+ * need to be co-prime with VSID_MULTIPLIER*<br>+ */<br>+#if 1<br>+#define MAX_VIRTUAL_ADDR_BITS    65<br>+#else<br>+#define MAX_VIRTUAL_ADDR_BITS      66<br>+#endif<br>+/*<br>+ * One bit is taken by the kernel, only the rest of space is available for the<br>+ * user space.<br>+ */<br>+#define CONTEXT_BITS         (MAX_VIRTUAL_ADDR_BITS - \<br>+                            (USER_ESID_BITS + SID_SHIFT + 1))<br>+#define USER_ESID_BITS             18<br>+#define USER_ESID_BITS_1T  6<br>+<br> /*<br>  * This should be computed such that protovosid * vsid_mulitplier<br>  * doesn't overflow 64 bits. It should also be co-prime to vsid_modulus<br>  */<br> #define VSID_MULTIPLIER_256M    ASM_CONST(12538073)     /* 24-bit prime */<br>-#define VSID_BITS_256M             38<br>+#define VSID_BITS_256M             (CONTEXT_BITS + USER_ESID_BITS + 1)<br> #define VSID_MODULUS_256M    ((1UL<<VSID_BITS_256M)-1)<br> <br> #define VSID_MULTIPLIER_1T       ASM_CONST(12538073)     /* 24-bit prime */<br>-#define VSID_BITS_1T               26<br>+#define VSID_BITS_1T               (CONTEXT_BITS + USER_ESID_BITS_1T + 1)<br> #define VSID_MODULUS_1T           ((1UL<<VSID_BITS_1T)-1)<br> <br>-#define CONTEXT_BITS            19<br>-#define USER_ESID_BITS             18<br>-#define USER_ESID_BITS_1T  6<br> <br> #define USER_VSID_RANGE        (1UL << (USER_ESID_BITS + SID_SHIFT))<br> <br><br></div>
                        
                
                <base target="_self" href="https://e.mail.ru/cgi-bin/">
        </div>

        
</div>


</div>
</blockquote>
<br>Testing it with Linux 3.8.0-rc7, it looks good so far under heavy hard disk usage.<br><br></BODY></HTML>