Re: [PATCH v2] mm/hugetlb.c: make huge_pte_offset() consistent and document behaviour

2017-08-30 Thread Michal Hocko
On Fri 18-08-17 15:54:15, Punit Agrawal wrote: > When walking the page tables to resolve an address that points to > !p*d_present() entry, huge_pte_offset() returns inconsistent values > depending on the level of page table (PUD or PMD). > > It returns NULL in the case of a PUD entry while in the

Re: [PATCH v2] mm/hugetlb.c: make huge_pte_offset() consistent and document behaviour

2017-08-30 Thread Michal Hocko
On Fri 18-08-17 15:54:15, Punit Agrawal wrote: > When walking the page tables to resolve an address that points to > !p*d_present() entry, huge_pte_offset() returns inconsistent values > depending on the level of page table (PUD or PMD). > > It returns NULL in the case of a PUD entry while in the

Re: [PATCH v2] mm/hugetlb.c: make huge_pte_offset() consistent and document behaviour

2017-08-22 Thread Punit Agrawal
Hi Mike, Mike Kravetz writes: > On 08/21/2017 11:07 AM, Catalin Marinas wrote: >> On Fri, Aug 18, 2017 at 02:29:18PM -0700, Mike Kravetz wrote: >>> On 08/18/2017 07:54 AM, Punit Agrawal wrote: When walking the page tables to resolve an address that points to

Re: [PATCH v2] mm/hugetlb.c: make huge_pte_offset() consistent and document behaviour

2017-08-22 Thread Punit Agrawal
Hi Mike, Mike Kravetz writes: > On 08/21/2017 11:07 AM, Catalin Marinas wrote: >> On Fri, Aug 18, 2017 at 02:29:18PM -0700, Mike Kravetz wrote: >>> On 08/18/2017 07:54 AM, Punit Agrawal wrote: When walking the page tables to resolve an address that points to !p*d_present() entry,

Re: [PATCH v2] mm/hugetlb.c: make huge_pte_offset() consistent and document behaviour

2017-08-22 Thread Catalin Marinas
On Fri, Aug 18, 2017 at 03:54:15PM +0100, Punit Agrawal wrote: > When walking the page tables to resolve an address that points to > !p*d_present() entry, huge_pte_offset() returns inconsistent values > depending on the level of page table (PUD or PMD). > > It returns NULL in the case of a PUD

Re: [PATCH v2] mm/hugetlb.c: make huge_pte_offset() consistent and document behaviour

2017-08-22 Thread Catalin Marinas
On Fri, Aug 18, 2017 at 03:54:15PM +0100, Punit Agrawal wrote: > When walking the page tables to resolve an address that points to > !p*d_present() entry, huge_pte_offset() returns inconsistent values > depending on the level of page table (PUD or PMD). > > It returns NULL in the case of a PUD

Re: [PATCH v2] mm/hugetlb.c: make huge_pte_offset() consistent and document behaviour

2017-08-21 Thread Mike Kravetz
On 08/21/2017 11:07 AM, Catalin Marinas wrote: > On Fri, Aug 18, 2017 at 02:29:18PM -0700, Mike Kravetz wrote: >> On 08/18/2017 07:54 AM, Punit Agrawal wrote: >>> When walking the page tables to resolve an address that points to >>> !p*d_present() entry, huge_pte_offset() returns inconsistent

Re: [PATCH v2] mm/hugetlb.c: make huge_pte_offset() consistent and document behaviour

2017-08-21 Thread Mike Kravetz
On 08/21/2017 11:07 AM, Catalin Marinas wrote: > On Fri, Aug 18, 2017 at 02:29:18PM -0700, Mike Kravetz wrote: >> On 08/18/2017 07:54 AM, Punit Agrawal wrote: >>> When walking the page tables to resolve an address that points to >>> !p*d_present() entry, huge_pte_offset() returns inconsistent

Re: [PATCH v2] mm/hugetlb.c: make huge_pte_offset() consistent and document behaviour

2017-08-21 Thread Catalin Marinas
On Fri, Aug 18, 2017 at 02:29:18PM -0700, Mike Kravetz wrote: > On 08/18/2017 07:54 AM, Punit Agrawal wrote: > > When walking the page tables to resolve an address that points to > > !p*d_present() entry, huge_pte_offset() returns inconsistent values > > depending on the level of page table (PUD

Re: [PATCH v2] mm/hugetlb.c: make huge_pte_offset() consistent and document behaviour

2017-08-21 Thread Catalin Marinas
On Fri, Aug 18, 2017 at 02:29:18PM -0700, Mike Kravetz wrote: > On 08/18/2017 07:54 AM, Punit Agrawal wrote: > > When walking the page tables to resolve an address that points to > > !p*d_present() entry, huge_pte_offset() returns inconsistent values > > depending on the level of page table (PUD

Re: [PATCH v2] mm/hugetlb.c: make huge_pte_offset() consistent and document behaviour

2017-08-18 Thread Mike Kravetz
On 08/18/2017 07:54 AM, Punit Agrawal wrote: > When walking the page tables to resolve an address that points to > !p*d_present() entry, huge_pte_offset() returns inconsistent values > depending on the level of page table (PUD or PMD). > > It returns NULL in the case of a PUD entry while in the

Re: [PATCH v2] mm/hugetlb.c: make huge_pte_offset() consistent and document behaviour

2017-08-18 Thread Mike Kravetz
On 08/18/2017 07:54 AM, Punit Agrawal wrote: > When walking the page tables to resolve an address that points to > !p*d_present() entry, huge_pte_offset() returns inconsistent values > depending on the level of page table (PUD or PMD). > > It returns NULL in the case of a PUD entry while in the

[PATCH v2] mm/hugetlb.c: make huge_pte_offset() consistent and document behaviour

2017-08-18 Thread Punit Agrawal
When walking the page tables to resolve an address that points to !p*d_present() entry, huge_pte_offset() returns inconsistent values depending on the level of page table (PUD or PMD). It returns NULL in the case of a PUD entry while in the case of a PMD entry, it returns a pointer to the page

[PATCH v2] mm/hugetlb.c: make huge_pte_offset() consistent and document behaviour

2017-08-18 Thread Punit Agrawal
When walking the page tables to resolve an address that points to !p*d_present() entry, huge_pte_offset() returns inconsistent values depending on the level of page table (PUD or PMD). It returns NULL in the case of a PUD entry while in the case of a PMD entry, it returns a pointer to the page