Re: [PATCH V12] mm/debug: Add tests validating architecture page table helpers

2020-02-12 Thread Anshuman Khandual
On 02/12/2020 11:25 PM, Gerald Schaefer wrote: > On Wed, 12 Feb 2020 15:12:54 +0530 > Anshuman Khandual wrote: > +/* + * On s390 platform, the lower 12 bits are used to identify given page table + * entry type and for other arch specific requirements. But these bits

Re: [PATCH V12] mm/debug: Add tests validating architecture page table helpers

2020-02-12 Thread Gerald Schaefer
On Wed, 12 Feb 2020 15:12:54 +0530 Anshuman Khandual wrote: > >> +/* > >> + * On s390 platform, the lower 12 bits are used to identify given page > >> table > >> + * entry type and for other arch specific requirements. But these bits > >> might > >> + * affect the ability to clear entries with

Re: [PATCH V12] mm/debug: Add tests validating architecture page table helpers

2020-02-12 Thread Anshuman Khandual
On 02/10/2020 09:07 PM, Catalin Marinas wrote: > On Tue, Jan 28, 2020 at 06:57:53AM +0530, Anshuman Khandual wrote: >> This gets build and run when CONFIG_DEBUG_VM_PGTABLE is selected along with >> CONFIG_VM_DEBUG. Architectures willing to subscribe this test also need to >> select

Re: [PATCH V12] mm/debug: Add tests validating architecture page table helpers

2020-02-10 Thread Catalin Marinas
On Tue, Jan 28, 2020 at 06:57:53AM +0530, Anshuman Khandual wrote: > This gets build and run when CONFIG_DEBUG_VM_PGTABLE is selected along with > CONFIG_VM_DEBUG. Architectures willing to subscribe this test also need to > select CONFIG_ARCH_HAS_DEBUG_VM_PGTABLE which for now is limited to x86

Re: [PATCH V12] mm/debug: Add tests validating architecture page table helpers

2020-02-03 Thread Qian Cai
On Mon, 2020-02-03 at 16:14 +0100, Christophe Leroy wrote: > > Le 02/02/2020 à 12:26, Qian Cai a écrit : > > > > > > > On Jan 30, 2020, at 9:13 AM, Christophe Leroy > > > wrote: > > > > > > config DEBUG_VM_PGTABLE > > > bool "Debug arch page table for semantics compliance" if > > >

Re: [PATCH V12] mm/debug: Add tests validating architecture page table helpers

2020-02-03 Thread Christophe Leroy
Le 02/02/2020 à 12:26, Qian Cai a écrit : On Jan 30, 2020, at 9:13 AM, Christophe Leroy wrote: config DEBUG_VM_PGTABLE bool "Debug arch page table for semantics compliance" if ARCH_HAS_DEBUG_VM_PGTABLE || EXPERT depends on MMU default 'n' if !ARCH_HAS_DEBUG_VM_PGTABLE

Re: [PATCH V12] mm/debug: Add tests validating architecture page table helpers

2020-02-02 Thread Qian Cai
> On Jan 30, 2020, at 9:13 AM, Christophe Leroy wrote: > > config DEBUG_VM_PGTABLE >bool "Debug arch page table for semantics compliance" if > ARCH_HAS_DEBUG_VM_PGTABLE || EXPERT >depends on MMU >default 'n' if !ARCH_HAS_DEBUG_VM_PGTABLE >default 'y' if DEBUG_VM Does it

Re: [PATCH V12] mm/debug: Add tests validating architecture page table helpers

2020-02-02 Thread Christophe Leroy
Le 02/02/2020 à 08:18, Anshuman Khandual a écrit : On 01/30/2020 07:43 PM, Christophe Leroy wrote: Le 30/01/2020 à 14:04, Anshuman Khandual a écrit : On 01/28/2020 10:35 PM, Christophe Leroy wrote: I think we could make it standalone and 'default y if DEBUG_VM' instead. Which will

Re: [PATCH V12] mm/debug: Add tests validating architecture page table helpers

2020-02-02 Thread Anshuman Khandual
On 01/30/2020 06:34 PM, Anshuman Khandual wrote: > On 01/28/2020 10:35 PM, Christophe Leroy wrote: >> >> Le 28/01/2020 à 02:27, Anshuman Khandual a écrit : >>> This adds tests which will validate architecture page table helpers and >>> other accessors in their compliance with expected generic

Re: [PATCH V12] mm/debug: Add tests validating architecture page table helpers

2020-02-01 Thread Anshuman Khandual
On 01/30/2020 07:43 PM, Christophe Leroy wrote: > > > Le 30/01/2020 à 14:04, Anshuman Khandual a écrit : >> >> On 01/28/2020 10:35 PM, Christophe Leroy wrote: >>> >>> >>> Le 28/01/2020 à 02:27, Anshuman Khandual a écrit : diff --git a/arch/x86/include/asm/pgtable_64.h

Re: [PATCH V12] mm/debug: Add tests validating architecture page table helpers

2020-01-30 Thread Anshuman Khandual
On 01/28/2020 06:57 AM, Anshuman Khandual wrote: > This adds tests which will validate architecture page table helpers and > other accessors in their compliance with expected generic MM semantics. > This will help various architectures in validating changes to existing > page table helpers or

Re: [PATCH V12] mm/debug: Add tests validating architecture page table helpers

2020-01-30 Thread Christophe Leroy
Le 30/01/2020 à 14:04, Anshuman Khandual a écrit : On 01/28/2020 10:35 PM, Christophe Leroy wrote: Le 28/01/2020 à 02:27, Anshuman Khandual a écrit : diff --git a/arch/x86/include/asm/pgtable_64.h b/arch/x86/include/asm/pgtable_64.h index 0b6c4042942a..fb0e76d254b3 100644 ---

Re: [PATCH V12] mm/debug: Add tests validating architecture page table helpers

2020-01-30 Thread Anshuman Khandual
On 01/30/2020 12:57 PM, Mike Rapoport wrote: > On Wed, Jan 29, 2020 at 11:20:44PM +0100, Gerald Schaefer wrote: >> On Mon, 27 Jan 2020 22:33:08 -0500 >> >> For example, who would have thought that pXd_bad() is supposed to >> report large entries as bad? It's not really documented anywhere, > >

Re: [PATCH V12] mm/debug: Add tests validating architecture page table helpers

2020-01-30 Thread Anshuman Khandual
On 01/30/2020 03:50 AM, Gerald Schaefer wrote: > On Tue, 28 Jan 2020 06:57:53 +0530 > Anshuman Khandual wrote: > >> This adds tests which will validate architecture page table helpers and >> other accessors in their compliance with expected generic MM semantics. >> This will help various

Re: [PATCH V12] mm/debug: Add tests validating architecture page table helpers

2020-01-30 Thread Anshuman Khandual
On 01/28/2020 10:35 PM, Christophe Leroy wrote: > > > Le 28/01/2020 à 02:27, Anshuman Khandual a écrit : >> This adds tests which will validate architecture page table helpers and >> other accessors in their compliance with expected generic MM semantics. >> This will help various architectures

Re: [PATCH V12] mm/debug: Add tests validating architecture page table helpers

2020-01-29 Thread Mike Rapoport
On Wed, Jan 29, 2020 at 11:20:44PM +0100, Gerald Schaefer wrote: > On Mon, 27 Jan 2020 22:33:08 -0500 > > For example, who would have thought that pXd_bad() is supposed to > report large entries as bad? It's not really documented anywhere, A bit off-topic, @Anshuman, maybe you could start a

Re: [PATCH V12] mm/debug: Add tests validating architecture page table helpers

2020-01-29 Thread Gerald Schaefer
On Mon, 27 Jan 2020 22:33:08 -0500 Qian Cai wrote: > > > >> Did those tests ever find any regression or this is almost only useful for > >> new > > > > The test has already found problems with s390 page table helpers. > > Hmm, that is pretty weak where s390 is not even official supported

Re: [PATCH V12] mm/debug: Add tests validating architecture page table helpers

2020-01-29 Thread Gerald Schaefer
On Tue, 28 Jan 2020 06:57:53 +0530 Anshuman Khandual wrote: > This adds tests which will validate architecture page table helpers and > other accessors in their compliance with expected generic MM semantics. > This will help various architectures in validating changes to existing > page table

Re: [PATCH V12] mm/debug: Add tests validating architecture page table helpers

2020-01-29 Thread Qian Cai
> On Jan 29, 2020, at 5:36 AM, Catalin Marinas wrote: > > On Tue, Jan 28, 2020 at 02:07:10PM -0500, Qian Cai wrote: >> On Jan 28, 2020, at 12:47 PM, Catalin Marinas >> wrote: >>> The primary goal here is not finding regressions but having clearly >>> defined semantics of the page table

Re: [PATCH V12] mm/debug: Add tests validating architecture page table helpers

2020-01-29 Thread Catalin Marinas
On Tue, Jan 28, 2020 at 02:07:10PM -0500, Qian Cai wrote: > On Jan 28, 2020, at 12:47 PM, Catalin Marinas wrote: > > The primary goal here is not finding regressions but having clearly > > defined semantics of the page table accessors across architectures. x86 > > and arm64 are a good starting

Re: [PATCH V12] mm/debug: Add tests validating architecture page table helpers

2020-01-28 Thread Qian Cai
> On Jan 28, 2020, at 12:47 PM, Catalin Marinas wrote: > > The primary goal here is not finding regressions but having clearly > defined semantics of the page table accessors across architectures. x86 > and arm64 are a good starting point and other architectures will be > enabled as they are

Re: [PATCH V12] mm/debug: Add tests validating architecture page table helpers

2020-01-28 Thread Catalin Marinas
On Mon, Jan 27, 2020 at 09:11:53PM -0500, Qian Cai wrote: > On Jan 27, 2020, at 8:28 PM, Anshuman Khandual > wrote: > > This adds tests which will validate architecture page table helpers and > > other accessors in their compliance with expected generic MM semantics. > > This will help various

Re: [PATCH V12] mm/debug: Add tests validating architecture page table helpers

2020-01-28 Thread Vineet Gupta
On 1/27/20 7:33 PM, Qian Cai wrote: > >>> What’s the value of this block of new code? It only supports x86 and arm64 >>> which are supposed to be good now. >> We have been over the usefulness of this code many times before as the patch >> is >> already in it's V12. Currently it is enabled on

Re: [PATCH V12] mm/debug: Add tests validating architecture page table helpers

2020-01-28 Thread Christophe Leroy
Le 28/01/2020 à 02:27, Anshuman Khandual a écrit : This adds tests which will validate architecture page table helpers and other accessors in their compliance with expected generic MM semantics. This will help various architectures in validating changes to existing page table helpers or

Re: [PATCH V12] mm/debug: Add tests validating architecture page table helpers

2020-01-28 Thread Qian Cai
> On Jan 28, 2020, at 7:10 AM, Mike Rapoport wrote: > > Aren't x86 and arm64 not decent enough? > Even if this test could be used to detect regressions only on these two > platforms, the test is valuable. The question is does it detect regressions good enough? Where is the list of past bugs

Re: [PATCH V12] mm/debug: Add tests validating architecture page table helpers

2020-01-28 Thread Mike Rapoport
Hello Qian, On Mon, Jan 27, 2020 at 10:33:08PM -0500, Qian Cai wrote: > > > On Jan 27, 2020, at 10:06 PM, Anshuman Khandual > > wrote: > > > > enablement of this test (for the moment) but then the goal is to integrate > > all > > of them going forward. The test not only validates platform's

Re: [PATCH V12] mm/debug: Add tests validating architecture page table helpers

2020-01-28 Thread Mark Brown
On Tue, Jan 28, 2020 at 02:12:56AM -0500, Qian Cai wrote: > > On Jan 28, 2020, at 1:13 AM, Christophe Leroy > > wrote: > > ppc32 an indecent / legacy platform ? Are you kidying ? > > Powerquicc II PRO for instance is fully supported by the > > manufacturer and widely used in many small

Re: [PATCH V12] mm/debug: Add tests validating architecture page table helpers

2020-01-27 Thread Qian Cai
> On Jan 28, 2020, at 1:13 AM, Christophe Leroy wrote: > > ppc32 an indecent / legacy platform ? Are you kidying ? > > Powerquicc II PRO for instance is fully supported by the manufacturer and > widely used in many small networking devices. Of course I forgot about embedded devices. The

Re: [PATCH V12] mm/debug: Add tests validating architecture page table helpers

2020-01-27 Thread Qian Cai
> On Jan 28, 2020, at 2:03 AM, Anshuman Khandual > wrote: > > 'allyesconfig' makes 'DEBUG_VM = y' which in turn will enable > 'DEBUG_VM_PGTABLE = y' > on platforms that subscribe ARCH_HAS_DEBUG_VM_PGTABLE. Isn’t that only for compiling testing? Who is booting such a beast and make sure

Re: [PATCH V12] mm/debug: Add tests validating architecture page table helpers

2020-01-27 Thread Anshuman Khandual
On 01/28/2020 12:06 PM, Qian Cai wrote: > > >> On Jan 28, 2020, at 1:17 AM, Christophe Leroy >> wrote: >> >> It is 'default y' so there is no much risk that it is forgotten, at least >> all test suites run with 'allyes_defconfig' will trigger the test, so I >> think it is really a good

Re: [PATCH V12] mm/debug: Add tests validating architecture page table helpers

2020-01-27 Thread Qian Cai
> On Jan 28, 2020, at 1:17 AM, Christophe Leroy wrote: > > It is 'default y' so there is no much risk that it is forgotten, at least all > test suites run with 'allyes_defconfig' will trigger the test, so I think it > is really a good feature. This thing depends on DEBUG_VM which I don’t

Re: [PATCH V12] mm/debug: Add tests validating architecture page table helpers

2020-01-27 Thread Christophe Leroy
Le 28/01/2020 à 06:48, Qian Cai a écrit : On Jan 27, 2020, at 11:58 PM, Anshuman Khandual wrote: As I had mentioned before, the test attempts to formalize page table helper semantics as expected from generic MM code paths and intend to catch deviations when enabled on a given

Re: [PATCH V12] mm/debug: Add tests validating architecture page table helpers

2020-01-27 Thread Christophe Leroy
Le 28/01/2020 à 04:33, Qian Cai a écrit : On Jan 27, 2020, at 10:06 PM, Anshuman Khandual wrote: On 01/28/2020 07:41 AM, Qian Cai wrote: On Jan 27, 2020, at 8:28 PM, Anshuman Khandual wrote: This adds tests which will validate architecture page table helpers and other accessors

Re: [PATCH V12] mm/debug: Add tests validating architecture page table helpers

2020-01-27 Thread Qian Cai
> On Jan 27, 2020, at 11:58 PM, Anshuman Khandual > wrote: > > As I had mentioned before, the test attempts to formalize page table helper > semantics > as expected from generic MM code paths and intend to catch deviations when > enabled on > a given platform. How else should we test

Re: [PATCH V12] mm/debug: Add tests validating architecture page table helpers

2020-01-27 Thread Anshuman Khandual
On 01/28/2020 09:03 AM, Qian Cai wrote: > > >> On Jan 27, 2020, at 10:06 PM, Anshuman Khandual >> wrote: >> >> >> >> On 01/28/2020 07:41 AM, Qian Cai wrote: >>> >>> On Jan 27, 2020, at 8:28 PM, Anshuman Khandual wrote: This adds tests which will validate architecture

Re: [PATCH V12] mm/debug: Add tests validating architecture page table helpers

2020-01-27 Thread Qian Cai
> On Jan 27, 2020, at 10:06 PM, Anshuman Khandual > wrote: > > > > On 01/28/2020 07:41 AM, Qian Cai wrote: >> >> >>> On Jan 27, 2020, at 8:28 PM, Anshuman Khandual >>> wrote: >>> >>> This adds tests which will validate architecture page table helpers and >>> other accessors in their

Re: [PATCH V12] mm/debug: Add tests validating architecture page table helpers

2020-01-27 Thread Anshuman Khandual
On 01/28/2020 07:41 AM, Qian Cai wrote: > > >> On Jan 27, 2020, at 8:28 PM, Anshuman Khandual >> wrote: >> >> This adds tests which will validate architecture page table helpers and >> other accessors in their compliance with expected generic MM semantics. >> This will help various

Re: [PATCH V12] mm/debug: Add tests validating architecture page table helpers

2020-01-27 Thread Qian Cai
> On Jan 27, 2020, at 8:28 PM, Anshuman Khandual > wrote: > > This adds tests which will validate architecture page table helpers and > other accessors in their compliance with expected generic MM semantics. > This will help various architectures in validating changes to existing > page