Re: [RFC] mm/pgtable/debug: Add test validating architecture page table helpers

2019-08-04 Thread Anshuman Khandual
On 07/30/2019 10:33 PM, Matthew Wilcox wrote: > On Mon, Jul 29, 2019 at 02:02:52PM +0530, Anshuman Khandual wrote: >> On 07/27/2019 01:24 AM, Matthew Wilcox wrote: >>> On Fri, Jul 26, 2019 at 10:17:11AM +0530, Anshuman Khandual wrote: > But 'page' isn't necessarily PMD-aligned. I don't thin

Re: [RFC] mm/pgtable/debug: Add test validating architecture page table helpers

2019-07-30 Thread Matthew Wilcox
On Mon, Jul 29, 2019 at 02:02:52PM +0530, Anshuman Khandual wrote: > On 07/27/2019 01:24 AM, Matthew Wilcox wrote: > > On Fri, Jul 26, 2019 at 10:17:11AM +0530, Anshuman Khandual wrote: > >>> But 'page' isn't necessarily PMD-aligned. I don't think we can rely on > >>> architectures doing the right

Re: [RFC] mm/pgtable/debug: Add test validating architecture page table helpers

2019-07-29 Thread Anshuman Khandual
On 07/27/2019 01:24 AM, Matthew Wilcox wrote: > On Fri, Jul 26, 2019 at 10:17:11AM +0530, Anshuman Khandual wrote: >>> But 'page' isn't necessarily PMD-aligned. I don't think we can rely on >>> architectures doing the right thing if asked to make a PMD for a randomly >>> aligned page. >>> >>> How

Re: [RFC] mm/pgtable/debug: Add test validating architecture page table helpers

2019-07-26 Thread Matthew Wilcox
On Fri, Jul 26, 2019 at 10:17:11AM +0530, Anshuman Khandual wrote: > > But 'page' isn't necessarily PMD-aligned. I don't think we can rely on > > architectures doing the right thing if asked to make a PMD for a randomly > > aligned page. > > > > How about finding the physical address of something

Re: [RFC] mm/pgtable/debug: Add test validating architecture page table helpers

2019-07-25 Thread Anshuman Khandual
On 07/26/2019 03:24 AM, Russell King - ARM Linux admin wrote: > On Thu, Jul 25, 2019 at 12:25:23PM +0530, Anshuman Khandual wrote: >> This adds a test module which will validate architecture page table helpers >> and accessors regarding compliance with generic MM semantics expectations. >> This wil

Re: [RFC] mm/pgtable/debug: Add test validating architecture page table helpers

2019-07-25 Thread Anshuman Khandual
On 07/25/2019 08:09 PM, Matthew Wilcox wrote: > On Thu, Jul 25, 2019 at 12:25:23PM +0530, Anshuman Khandual wrote: >> This adds a test module which will validate architecture page table helpers >> and accessors regarding compliance with generic MM semantics expectations. >> This will help various a

Re: [RFC] mm/pgtable/debug: Add test validating architecture page table helpers

2019-07-25 Thread Anshuman Khandual
On 07/25/2019 10:37 PM, Catalin Marinas wrote: > On Thu, Jul 25, 2019 at 12:25:23PM +0530, Anshuman Khandual wrote: >> +#if !defined(__PAGETABLE_PMD_FOLDED) && !defined(__ARCH_HAS_4LEVEL_HACK) >> +static void pud_clear_tests(void) >> +{ >> +pud_t pud; >> + >> +pud_clear(&pud); >> +WAR

Re: [RFC] mm/pgtable/debug: Add test validating architecture page table helpers

2019-07-25 Thread Matthew Wilcox
On Thu, Jul 25, 2019 at 10:58:12PM +0100, Russell King - ARM Linux admin wrote: > On Thu, Jul 25, 2019 at 02:42:22PM -0700, Matthew Wilcox wrote: > > On Thu, Jul 25, 2019 at 10:38:58PM +0100, Russell King - ARM Linux admin > > wrote: > > > On Thu, Jul 25, 2019 at 07:39:21AM -0700, Matthew Wilcox w

Re: [RFC] mm/pgtable/debug: Add test validating architecture page table helpers

2019-07-25 Thread Russell King - ARM Linux admin
On Thu, Jul 25, 2019 at 02:42:22PM -0700, Matthew Wilcox wrote: > On Thu, Jul 25, 2019 at 10:38:58PM +0100, Russell King - ARM Linux admin > wrote: > > On Thu, Jul 25, 2019 at 07:39:21AM -0700, Matthew Wilcox wrote: > > > But 'page' isn't necessarily PMD-aligned. I don't think we can rely on > >

Re: [RFC] mm/pgtable/debug: Add test validating architecture page table helpers

2019-07-25 Thread Russell King - ARM Linux admin
On Thu, Jul 25, 2019 at 12:25:23PM +0530, Anshuman Khandual wrote: > This adds a test module which will validate architecture page table helpers > and accessors regarding compliance with generic MM semantics expectations. > This will help various architectures in validating changes to the existing

Re: [RFC] mm/pgtable/debug: Add test validating architecture page table helpers

2019-07-25 Thread Matthew Wilcox
On Thu, Jul 25, 2019 at 10:38:58PM +0100, Russell King - ARM Linux admin wrote: > On Thu, Jul 25, 2019 at 07:39:21AM -0700, Matthew Wilcox wrote: > > But 'page' isn't necessarily PMD-aligned. I don't think we can rely on > > architectures doing the right thing if asked to make a PMD for a randomly

Re: [RFC] mm/pgtable/debug: Add test validating architecture page table helpers

2019-07-25 Thread Russell King - ARM Linux admin
On Thu, Jul 25, 2019 at 07:39:21AM -0700, Matthew Wilcox wrote: > On Thu, Jul 25, 2019 at 12:25:23PM +0530, Anshuman Khandual wrote: > > This adds a test module which will validate architecture page table helpers > > and accessors regarding compliance with generic MM semantics expectations. > > Thi

Re: [RFC] mm/pgtable/debug: Add test validating architecture page table helpers

2019-07-25 Thread Catalin Marinas
On Thu, Jul 25, 2019 at 12:25:23PM +0530, Anshuman Khandual wrote: > +#if !defined(__PAGETABLE_PMD_FOLDED) && !defined(__ARCH_HAS_4LEVEL_HACK) > +static void pud_clear_tests(void) > +{ > + pud_t pud; > + > + pud_clear(&pud); > + WARN_ON(!pud_none(pud)); > +} For the clear tests, I thin

Re: [RFC] mm/pgtable/debug: Add test validating architecture page table helpers

2019-07-25 Thread Matthew Wilcox
On Thu, Jul 25, 2019 at 12:25:23PM +0530, Anshuman Khandual wrote: > This adds a test module which will validate architecture page table helpers > and accessors regarding compliance with generic MM semantics expectations. > This will help various architectures in validating changes to the existing

[RFC] mm/pgtable/debug: Add test validating architecture page table helpers

2019-07-24 Thread Anshuman Khandual
This adds a test module which will validate architecture page table helpers and accessors regarding compliance with generic MM semantics expectations. This will help various architectures in validating changes to the existing page table helpers or addition of new ones. Cc: Andrew Morton Cc: Micha