Re: [PATCH 07/31] sched, numa, mm, s390/thp: Implement pmd_pgprot() for s390

2012-11-01 Thread Mel Gorman
On Thu, Oct 25, 2012 at 02:16:24PM +0200, Peter Zijlstra wrote:
> From: Gerald Schaefer 
> 
> This patch adds an implementation of pmd_pgprot() for s390,
> in preparation to future THP changes.
> 

The additional pmd_pgprot implementations only are necessary if we want
to preserve the PROT_NONE protections across a split but that somewhat
forces that PROT_NONE be used as the protection bit across all
architectures. Is that possible? I think I would prefer that
prot-protection-across-splits just went away until it was proven
necessary and potentially recoded in terms of _PAGE_NUMA and friends
instead.

-- 
Mel Gorman
SUSE Labs
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 07/31] sched, numa, mm, s390/thp: Implement pmd_pgprot() for s390

2012-11-01 Thread Mel Gorman
On Thu, Oct 25, 2012 at 02:16:24PM +0200, Peter Zijlstra wrote:
 From: Gerald Schaefer gerald.schae...@de.ibm.com
 
 This patch adds an implementation of pmd_pgprot() for s390,
 in preparation to future THP changes.
 

The additional pmd_pgprot implementations only are necessary if we want
to preserve the PROT_NONE protections across a split but that somewhat
forces that PROT_NONE be used as the protection bit across all
architectures. Is that possible? I think I would prefer that
prot-protection-across-splits just went away until it was proven
necessary and potentially recoded in terms of _PAGE_NUMA and friends
instead.

-- 
Mel Gorman
SUSE Labs
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 07/31] sched, numa, mm, s390/thp: Implement pmd_pgprot() for s390

2012-10-25 Thread Peter Zijlstra
From: Gerald Schaefer 

This patch adds an implementation of pmd_pgprot() for s390,
in preparation to future THP changes.

Reported-by: Stephen Rothwell 
Signed-off-by: Gerald Schaefer 
Cc: Martin Schwidefsky 
Cc: Heiko Carstens 
Cc: Peter Zijlstra 
Cc: Ralf Baechle 
Signed-off-by: Ingo Molnar 
---
 arch/s390/include/asm/pgtable.h |   13 +
 1 file changed, 13 insertions(+)

Index: tip/arch/s390/include/asm/pgtable.h
===
--- tip.orig/arch/s390/include/asm/pgtable.h
+++ tip/arch/s390/include/asm/pgtable.h
@@ -1240,6 +1240,19 @@ static inline void set_pmd_at(struct mm_
*pmdp = entry;
 }
 
+static inline pgprot_t pmd_pgprot(pmd_t pmd)
+{
+   pgprot_t prot = PAGE_RW;
+
+   if (pmd_val(pmd) & _SEGMENT_ENTRY_RO) {
+   if (pmd_val(pmd) & _SEGMENT_ENTRY_INV)
+   prot = PAGE_NONE;
+   else
+   prot = PAGE_RO;
+   }
+   return prot;
+}
+
 static inline unsigned long massage_pgprot_pmd(pgprot_t pgprot)
 {
unsigned long pgprot_pmd = 0;


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 07/31] sched, numa, mm, s390/thp: Implement pmd_pgprot() for s390

2012-10-25 Thread Peter Zijlstra
From: Gerald Schaefer gerald.schae...@de.ibm.com

This patch adds an implementation of pmd_pgprot() for s390,
in preparation to future THP changes.

Reported-by: Stephen Rothwell s...@canb.auug.org.au
Signed-off-by: Gerald Schaefer gerald.schae...@de.ibm.com
Cc: Martin Schwidefsky schwidef...@de.ibm.com
Cc: Heiko Carstens heiko.carst...@de.ibm.com
Cc: Peter Zijlstra pet...@infradead.org
Cc: Ralf Baechle r...@linux-mips.org
Signed-off-by: Ingo Molnar mi...@kernel.org
---
 arch/s390/include/asm/pgtable.h |   13 +
 1 file changed, 13 insertions(+)

Index: tip/arch/s390/include/asm/pgtable.h
===
--- tip.orig/arch/s390/include/asm/pgtable.h
+++ tip/arch/s390/include/asm/pgtable.h
@@ -1240,6 +1240,19 @@ static inline void set_pmd_at(struct mm_
*pmdp = entry;
 }
 
+static inline pgprot_t pmd_pgprot(pmd_t pmd)
+{
+   pgprot_t prot = PAGE_RW;
+
+   if (pmd_val(pmd)  _SEGMENT_ENTRY_RO) {
+   if (pmd_val(pmd)  _SEGMENT_ENTRY_INV)
+   prot = PAGE_NONE;
+   else
+   prot = PAGE_RO;
+   }
+   return prot;
+}
+
 static inline unsigned long massage_pgprot_pmd(pgprot_t pgprot)
 {
unsigned long pgprot_pmd = 0;


--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/