* [PATCH v2 0/3] Implement page table accounting for powerpc
@ 2017-05-01 6:34 Balbir Singh
2017-05-01 6:34 ` [PATCH v2 1/3] powerpc/mm/book(e)(3s)/64: Add page table accounting Balbir Singh
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Balbir Singh @ 2017-05-01 6:34 UTC (permalink / raw)
To: vdavydov, mpe, oss; +Cc: linuxppc-dev, linux-mm, Balbir Singh
(3e79ec7 arch: x86: charge page tables to kmemcg) added support for page
table accounting). This patch is the second iteration to add
support, in the earlier iteration only book3s 64 bit was supported.
This iteration adds support for booke/3s/32 and 64 bit.
There is some ugliness in this patchset, pgalloc.h is included
from book3s_64_mmu_radix.c to reuse the pte/pmd/pud and pgd
management routines. We use #ifdef MODULE to provide a version
that provides full accounting. The alternatives are discussed
in patch 1 below
Changelog v2:
- Added support for 32 bit and booke
- Added hugepte alloc accounting
Balbir Singh (3):
powerpc/mm/book(e)(3s)/64: Add page table accounting
powerpc/mm/book(e)(3s)/32: Add page table accounting
powerpc/mm/hugetlb: Add support for page accounting
arch/powerpc/include/asm/book3s/32/pgalloc.h | 3 ++-
arch/powerpc/include/asm/book3s/64/pgalloc.h | 17 +++++++++++------
arch/powerpc/include/asm/nohash/32/pgalloc.h | 3 ++-
arch/powerpc/include/asm/nohash/64/pgalloc.h | 12 ++++++++----
arch/powerpc/include/asm/pgalloc.h | 14 ++++++++++++++
arch/powerpc/mm/hugetlbpage.c | 2 +-
arch/powerpc/mm/pgtable_32.c | 2 +-
arch/powerpc/mm/pgtable_64.c | 3 ++-
8 files changed, 41 insertions(+), 15 deletions(-)
--
2.9.3
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH v2 1/3] powerpc/mm/book(e)(3s)/64: Add page table accounting
2017-05-01 6:34 [PATCH v2 0/3] Implement page table accounting for powerpc Balbir Singh
@ 2017-05-01 6:34 ` Balbir Singh
2017-05-01 6:34 ` [PATCH v2 2/3] powerpc/mm/book(e)(3s)/32: " Balbir Singh
2017-05-01 6:34 ` [PATCH v2 3/3] powerpc/mm/hugetlb: Add support for page accounting Balbir Singh
2 siblings, 0 replies; 7+ messages in thread
From: Balbir Singh @ 2017-05-01 6:34 UTC (permalink / raw)
To: vdavydov, mpe, oss; +Cc: linuxppc-dev, linux-mm, Balbir Singh
Introduce a helper pgtable_gfp_flags() which
just returns the current gfp flags and adds
__GFP_ACCOUNT to account for page table allocation.
The generic helper is added to include/asm/pgalloc.h
and has two variants - WARNING ugly bits ahead
1. If the header is included from a module, no check
for mm == &init_mm is done, since init_mm is not
exported
2. For kernel includes, the check is done and required
see (3e79ec7 arch: x86: charge page tables to kmemcg)
The fundamental assumption is that no module should be
doing pgd/pud/pmd and pte alloc's on behalf of init_mm
directly.
NOTE: This adds an overhead to pmd/pud/pgd allocations
similar to x86. The other alternative was to implement
pmd_alloc_kernel/pud_alloc_kernel and pgd_alloc_kernel
with their offset variants.
For 4k page size, pte_alloc_one no longer calls
pte_alloc_one_kernel.
Signed-off-by: Balbir Singh <bsingharora@gmail.com>
---
arch/powerpc/include/asm/book3s/32/pgalloc.h | 3 ++-
arch/powerpc/include/asm/book3s/64/pgalloc.h | 17 +++++++++++------
arch/powerpc/include/asm/nohash/64/pgalloc.h | 12 ++++++++----
arch/powerpc/include/asm/pgalloc.h | 14 ++++++++++++++
arch/powerpc/mm/pgtable_64.c | 3 ++-
5 files changed, 37 insertions(+), 12 deletions(-)
diff --git a/arch/powerpc/include/asm/book3s/32/pgalloc.h b/arch/powerpc/include/asm/book3s/32/pgalloc.h
index d310546..a120e7f 100644
--- a/arch/powerpc/include/asm/book3s/32/pgalloc.h
+++ b/arch/powerpc/include/asm/book3s/32/pgalloc.h
@@ -31,7 +31,8 @@ extern struct kmem_cache *pgtable_cache[];
static inline pgd_t *pgd_alloc(struct mm_struct *mm)
{
- return kmem_cache_alloc(PGT_CACHE(PGD_INDEX_SIZE), GFP_KERNEL);
+ return kmem_cache_alloc(PGT_CACHE(PGD_INDEX_SIZE),
+ pgtable_gfp_flags(mm, GFP_KERNEL));
}
static inline void pgd_free(struct mm_struct *mm, pgd_t *pgd)
diff --git a/arch/powerpc/include/asm/book3s/64/pgalloc.h b/arch/powerpc/include/asm/book3s/64/pgalloc.h
index cd5e7aa..9aa904f 100644
--- a/arch/powerpc/include/asm/book3s/64/pgalloc.h
+++ b/arch/powerpc/include/asm/book3s/64/pgalloc.h
@@ -53,10 +53,11 @@ extern void __tlb_remove_table(void *_table);
static inline pgd_t *radix__pgd_alloc(struct mm_struct *mm)
{
#ifdef CONFIG_PPC_64K_PAGES
- return (pgd_t *)__get_free_page(PGALLOC_GFP);
+ return (pgd_t *)__get_free_page(pgtable_gfp_flags(mm, PGALLOC_GFP));
#else
struct page *page;
- page = alloc_pages(PGALLOC_GFP | __GFP_REPEAT, 4);
+ page = alloc_pages(pgtable_gfp_flags(mm, PGALLOC_GFP | __GFP_REPEAT),
+ 4);
if (!page)
return NULL;
return (pgd_t *) page_address(page);
@@ -76,7 +77,8 @@ static inline pgd_t *pgd_alloc(struct mm_struct *mm)
{
if (radix_enabled())
return radix__pgd_alloc(mm);
- return kmem_cache_alloc(PGT_CACHE(PGD_INDEX_SIZE), GFP_KERNEL);
+ return kmem_cache_alloc(PGT_CACHE(PGD_INDEX_SIZE),
+ pgtable_gfp_flags(mm, GFP_KERNEL));
}
static inline void pgd_free(struct mm_struct *mm, pgd_t *pgd)
@@ -93,7 +95,8 @@ static inline void pgd_populate(struct mm_struct *mm, pgd_t *pgd, pud_t *pud)
static inline pud_t *pud_alloc_one(struct mm_struct *mm, unsigned long addr)
{
- return kmem_cache_alloc(PGT_CACHE(PUD_INDEX_SIZE), GFP_KERNEL);
+ return kmem_cache_alloc(PGT_CACHE(PUD_INDEX_SIZE),
+ pgtable_gfp_flags(mm, GFP_KERNEL));
}
static inline void pud_free(struct mm_struct *mm, pud_t *pud)
@@ -119,7 +122,8 @@ static inline void __pud_free_tlb(struct mmu_gather *tlb, pud_t *pud,
static inline pmd_t *pmd_alloc_one(struct mm_struct *mm, unsigned long addr)
{
- return kmem_cache_alloc(PGT_CACHE(PMD_CACHE_INDEX), GFP_KERNEL);
+ return kmem_cache_alloc(PGT_CACHE(PMD_CACHE_INDEX),
+ pgtable_gfp_flags(mm, GFP_KERNEL));
}
static inline void pmd_free(struct mm_struct *mm, pmd_t *pmd)
@@ -168,7 +172,8 @@ static inline pgtable_t pte_alloc_one(struct mm_struct *mm,
struct page *page;
pte_t *pte;
- pte = pte_alloc_one_kernel(mm, address);
+ pte = (pte_t *)__get_free_page(pgtable_gfp_flags(mm,
+ GFP_KERNEL | __GFP_ZERO));
if (!pte)
return NULL;
page = virt_to_page(pte);
diff --git a/arch/powerpc/include/asm/nohash/64/pgalloc.h b/arch/powerpc/include/asm/nohash/64/pgalloc.h
index 897d2e1..0d5e37b 100644
--- a/arch/powerpc/include/asm/nohash/64/pgalloc.h
+++ b/arch/powerpc/include/asm/nohash/64/pgalloc.h
@@ -43,7 +43,8 @@ extern struct kmem_cache *pgtable_cache[];
static inline pgd_t *pgd_alloc(struct mm_struct *mm)
{
- return kmem_cache_alloc(PGT_CACHE(PGD_INDEX_SIZE), GFP_KERNEL);
+ return kmem_cache_alloc(PGT_CACHE(PGD_INDEX_SIZE),
+ pgtable_gfp_flags(mm, GFP_KERNEL));
}
static inline void pgd_free(struct mm_struct *mm, pgd_t *pgd)
@@ -57,7 +58,8 @@ static inline void pgd_free(struct mm_struct *mm, pgd_t *pgd)
static inline pud_t *pud_alloc_one(struct mm_struct *mm, unsigned long addr)
{
- return kmem_cache_alloc(PGT_CACHE(PUD_INDEX_SIZE), GFP_KERNEL);
+ return kmem_cache_alloc(PGT_CACHE(PUD_INDEX_SIZE),
+ pgtable_gfp_flags(mm, GFP_KERNEL));
}
static inline void pud_free(struct mm_struct *mm, pud_t *pud)
@@ -96,7 +98,8 @@ static inline pgtable_t pte_alloc_one(struct mm_struct *mm,
struct page *page;
pte_t *pte;
- pte = pte_alloc_one_kernel(mm, address);
+ pte = (pte_t *)__get_free_page(
+ pgtable_gfp_flags(mm, GFP_KERNEL | __GFP_ZERO));
if (!pte)
return NULL;
page = virt_to_page(pte);
@@ -189,7 +192,8 @@ static inline void __pte_free_tlb(struct mmu_gather *tlb, pgtable_t table,
static inline pmd_t *pmd_alloc_one(struct mm_struct *mm, unsigned long addr)
{
- return kmem_cache_alloc(PGT_CACHE(PMD_CACHE_INDEX), GFP_KERNEL);
+ return kmem_cache_alloc(PGT_CACHE(PMD_CACHE_INDEX),
+ pgtable_gfp_flags(mm, GFP_KERNEL));
}
static inline void pmd_free(struct mm_struct *mm, pmd_t *pmd)
diff --git a/arch/powerpc/include/asm/pgalloc.h b/arch/powerpc/include/asm/pgalloc.h
index 0413457..d795c5d 100644
--- a/arch/powerpc/include/asm/pgalloc.h
+++ b/arch/powerpc/include/asm/pgalloc.h
@@ -3,6 +3,20 @@
#include <linux/mm.h>
+#ifndef MODULE
+static inline gfp_t pgtable_gfp_flags(struct mm_struct *mm, gfp_t gfp)
+{
+ if (unlikely(mm == &init_mm))
+ return gfp;
+ return gfp | __GFP_ACCOUNT;
+}
+#else /* !MODULE */
+static inline gfp_t pgtable_gfp_flags(struct mm_struct *mm, gfp_t gfp)
+{
+ return gfp | __GFP_ACCOUNT;
+}
+#endif /* MODULE */
+
#ifdef CONFIG_PPC_BOOK3S
#include <asm/book3s/pgalloc.h>
#else
diff --git a/arch/powerpc/mm/pgtable_64.c b/arch/powerpc/mm/pgtable_64.c
index db93cf7..b322262 100644
--- a/arch/powerpc/mm/pgtable_64.c
+++ b/arch/powerpc/mm/pgtable_64.c
@@ -351,9 +351,10 @@ static pte_t *get_from_cache(struct mm_struct *mm)
static pte_t *__alloc_for_cache(struct mm_struct *mm, int kernel)
{
void *ret = NULL;
- struct page *page = alloc_page(GFP_KERNEL | __GFP_NOTRACK | __GFP_ZERO);
+ struct page *page = alloc_page(pgtable_gfp_flags(mm, PGALLOC_GFP));
if (!page)
return NULL;
+
if (!kernel && !pgtable_page_ctor(page)) {
__free_page(page);
return NULL;
--
2.9.3
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH v2 2/3] powerpc/mm/book(e)(3s)/32: Add page table accounting
2017-05-01 6:34 [PATCH v2 0/3] Implement page table accounting for powerpc Balbir Singh
2017-05-01 6:34 ` [PATCH v2 1/3] powerpc/mm/book(e)(3s)/64: Add page table accounting Balbir Singh
@ 2017-05-01 6:34 ` Balbir Singh
2017-05-01 10:02 ` kbuild test robot
2017-05-01 10:31 ` kbuild test robot
2017-05-01 6:34 ` [PATCH v2 3/3] powerpc/mm/hugetlb: Add support for page accounting Balbir Singh
2 siblings, 2 replies; 7+ messages in thread
From: Balbir Singh @ 2017-05-01 6:34 UTC (permalink / raw)
To: vdavydov, mpe, oss; +Cc: linuxppc-dev, linux-mm, Balbir Singh
Add support in pte_alloc_one() and pgd_alloc() by
passing __GFP_ACCOUNT in the flags
Signed-off-by: Balbir Singh <bsingharora@gmail.com>
---
arch/powerpc/include/asm/nohash/32/pgalloc.h | 3 ++-
arch/powerpc/mm/pgtable_32.c | 2 +-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/arch/powerpc/include/asm/nohash/32/pgalloc.h b/arch/powerpc/include/asm/nohash/32/pgalloc.h
index 6331392..1900d9c 100644
--- a/arch/powerpc/include/asm/nohash/32/pgalloc.h
+++ b/arch/powerpc/include/asm/nohash/32/pgalloc.h
@@ -31,7 +31,8 @@ extern struct kmem_cache *pgtable_cache[];
static inline pgd_t *pgd_alloc(struct mm_struct *mm)
{
- return kmem_cache_alloc(PGT_CACHE(PGD_INDEX_SIZE), GFP_KERNEL);
+ return kmem_cache_alloc(PGT_CACHE(PGD_INDEX_SIZE),
+ pgtable_gfp_flags(GFP_KERNEL));
}
static inline void pgd_free(struct mm_struct *mm, pgd_t *pgd)
diff --git a/arch/powerpc/mm/pgtable_32.c b/arch/powerpc/mm/pgtable_32.c
index a65c0b4..dc1e0c2 100644
--- a/arch/powerpc/mm/pgtable_32.c
+++ b/arch/powerpc/mm/pgtable_32.c
@@ -60,7 +60,7 @@ pgtable_t pte_alloc_one(struct mm_struct *mm, unsigned long address)
{
struct page *ptepage;
- gfp_t flags = GFP_KERNEL | __GFP_ZERO;
+ gfp_t flags = GFP_KERNEL | __GFP_ZERO | __GFP_ACCOUNT;
ptepage = alloc_pages(flags, 0);
if (!ptepage)
--
2.9.3
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH v2 3/3] powerpc/mm/hugetlb: Add support for page accounting
2017-05-01 6:34 [PATCH v2 0/3] Implement page table accounting for powerpc Balbir Singh
2017-05-01 6:34 ` [PATCH v2 1/3] powerpc/mm/book(e)(3s)/64: Add page table accounting Balbir Singh
2017-05-01 6:34 ` [PATCH v2 2/3] powerpc/mm/book(e)(3s)/32: " Balbir Singh
@ 2017-05-01 6:34 ` Balbir Singh
2 siblings, 0 replies; 7+ messages in thread
From: Balbir Singh @ 2017-05-01 6:34 UTC (permalink / raw)
To: vdavydov, mpe, oss; +Cc: linuxppc-dev, linux-mm, Balbir Singh
Add __GFP_ACCOUNT to __hugepte_alloc()
Signed-off-by: Balbir Singh <bsingharora@gmail.com>
---
arch/powerpc/mm/hugetlbpage.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/powerpc/mm/hugetlbpage.c b/arch/powerpc/mm/hugetlbpage.c
index a4f33de..94e56b1 100644
--- a/arch/powerpc/mm/hugetlbpage.c
+++ b/arch/powerpc/mm/hugetlbpage.c
@@ -77,7 +77,7 @@ static int __hugepte_alloc(struct mm_struct *mm, hugepd_t *hpdp,
num_hugepd = 1;
}
- new = kmem_cache_zalloc(cachep, GFP_KERNEL);
+ new = kmem_cache_zalloc(cachep, pgtable_gfp_flags(mm, GFP_KERNEL));
BUG_ON(pshift > HUGEPD_SHIFT_MASK);
BUG_ON((unsigned long)new & HUGEPD_SHIFT_MASK);
--
2.9.3
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH v2 2/3] powerpc/mm/book(e)(3s)/32: Add page table accounting
2017-05-01 6:34 ` [PATCH v2 2/3] powerpc/mm/book(e)(3s)/32: " Balbir Singh
@ 2017-05-01 10:02 ` kbuild test robot
2017-05-01 10:31 ` kbuild test robot
1 sibling, 0 replies; 7+ messages in thread
From: kbuild test robot @ 2017-05-01 10:02 UTC (permalink / raw)
To: Balbir Singh
Cc: kbuild-all, vdavydov, mpe, oss, linuxppc-dev, linux-mm,
Balbir Singh
[-- Attachment #1: Type: text/plain, Size: 3054 bytes --]
Hi Balbir,
[auto build test ERROR on powerpc/next]
[also build test ERROR on v4.11 next-20170428]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Balbir-Singh/powerpc-mm-book-e-3s-64-Add-page-table-accounting/20170501-143900
base: https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next
config: powerpc-virtex5_defconfig (attached as .config)
compiler: powerpc-linux-gnu-gcc (Debian 6.1.1-9) 6.1.1 20160705
reproduce:
wget https://raw.githubusercontent.com/01org/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
make.cross ARCH=powerpc
All error/warnings (new ones prefixed by >>):
In file included from include/linux/mm.h:9:0,
from include/linux/cpuset.h:16,
from kernel//sched/core.c:13:
arch/powerpc/include/asm/nohash/32/pgalloc.h: In function 'pgd_alloc':
>> include/linux/gfp.h:240:20: warning: passing argument 1 of 'pgtable_gfp_flags' makes pointer from integer without a cast [-Wint-conversion]
#define GFP_KERNEL (__GFP_RECLAIM | __GFP_IO | __GFP_FS)
^
>> arch/powerpc/include/asm/nohash/32/pgalloc.h:35:22: note: in expansion of macro 'GFP_KERNEL'
pgtable_gfp_flags(GFP_KERNEL));
^~~~~~~~~~
In file included from arch/powerpc/include/asm/tlb.h:19:0,
from kernel//sched/core.c:30:
arch/powerpc/include/asm/pgalloc.h:7:21: note: expected 'struct mm_struct *' but argument is of type 'unsigned int'
static inline gfp_t pgtable_gfp_flags(struct mm_struct *mm, gfp_t gfp)
^~~~~~~~~~~~~~~~~
In file included from arch/powerpc/include/asm/nohash/pgalloc.h:21:0,
from arch/powerpc/include/asm/pgalloc.h:23,
from arch/powerpc/include/asm/tlb.h:19,
from kernel//sched/core.c:30:
>> arch/powerpc/include/asm/nohash/32/pgalloc.h:35:4: error: too few arguments to function 'pgtable_gfp_flags'
pgtable_gfp_flags(GFP_KERNEL));
^~~~~~~~~~~~~~~~~
In file included from arch/powerpc/include/asm/tlb.h:19:0,
from kernel//sched/core.c:30:
arch/powerpc/include/asm/pgalloc.h:7:21: note: declared here
static inline gfp_t pgtable_gfp_flags(struct mm_struct *mm, gfp_t gfp)
^~~~~~~~~~~~~~~~~
vim +/pgtable_gfp_flags +35 arch/powerpc/include/asm/nohash/32/pgalloc.h
29 pgtable_cache[(shift) - 1]; \
30 })
31
32 static inline pgd_t *pgd_alloc(struct mm_struct *mm)
33 {
34 return kmem_cache_alloc(PGT_CACHE(PGD_INDEX_SIZE),
> 35 pgtable_gfp_flags(GFP_KERNEL));
36 }
37
38 static inline void pgd_free(struct mm_struct *mm, pgd_t *pgd)
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 13899 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v2 2/3] powerpc/mm/book(e)(3s)/32: Add page table accounting
2017-05-01 6:34 ` [PATCH v2 2/3] powerpc/mm/book(e)(3s)/32: " Balbir Singh
2017-05-01 10:02 ` kbuild test robot
@ 2017-05-01 10:31 ` kbuild test robot
2017-05-01 11:09 ` Balbir Singh
1 sibling, 1 reply; 7+ messages in thread
From: kbuild test robot @ 2017-05-01 10:31 UTC (permalink / raw)
To: Balbir Singh
Cc: kbuild-all, vdavydov, mpe, oss, linuxppc-dev, linux-mm,
Balbir Singh
[-- Attachment #1: Type: text/plain, Size: 5531 bytes --]
Hi Balbir,
[auto build test ERROR on powerpc/next]
[also build test ERROR on v4.11 next-20170428]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Balbir-Singh/powerpc-mm-book-e-3s-64-Add-page-table-accounting/20170501-143900
base: https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next
config: powerpc-virtex5_defconfig (attached as .config)
compiler: powerpc-linux-gnu-gcc (Debian 6.1.1-9) 6.1.1 20160705
reproduce:
wget https://raw.githubusercontent.com/01org/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
make.cross ARCH=powerpc
All error/warnings (new ones prefixed by >>):
In file included from arch/powerpc/mm/mem.c:25:0:
arch/powerpc/include/asm/nohash/32/pgalloc.h: In function 'pgd_alloc':
>> include/linux/gfp.h:240:20: error: passing argument 1 of 'pgtable_gfp_flags' makes pointer from integer without a cast [-Werror=int-conversion]
#define GFP_KERNEL (__GFP_RECLAIM | __GFP_IO | __GFP_FS)
^
arch/powerpc/include/asm/nohash/32/pgalloc.h:35:22: note: in expansion of macro 'GFP_KERNEL'
pgtable_gfp_flags(GFP_KERNEL));
^~~~~~~~~~
In file included from arch/powerpc/mm/mem.c:40:0:
arch/powerpc/include/asm/pgalloc.h:7:21: note: expected 'struct mm_struct *' but argument is of type 'unsigned int'
static inline gfp_t pgtable_gfp_flags(struct mm_struct *mm, gfp_t gfp)
^~~~~~~~~~~~~~~~~
In file included from arch/powerpc/include/asm/nohash/pgalloc.h:21:0,
from arch/powerpc/include/asm/pgalloc.h:23,
from arch/powerpc/mm/mem.c:40:
arch/powerpc/include/asm/nohash/32/pgalloc.h:35:4: error: too few arguments to function 'pgtable_gfp_flags'
pgtable_gfp_flags(GFP_KERNEL));
^~~~~~~~~~~~~~~~~
In file included from arch/powerpc/mm/mem.c:40:0:
arch/powerpc/include/asm/pgalloc.h:7:21: note: declared here
static inline gfp_t pgtable_gfp_flags(struct mm_struct *mm, gfp_t gfp)
^~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
--
In file included from include/linux/slab.h:14:0,
from kernel/fork.c:14:
arch/powerpc/include/asm/nohash/32/pgalloc.h: In function 'pgd_alloc':
include/linux/gfp.h:240:20: warning: passing argument 1 of 'pgtable_gfp_flags' makes pointer from integer without a cast [-Wint-conversion]
#define GFP_KERNEL (__GFP_RECLAIM | __GFP_IO | __GFP_FS)
^
arch/powerpc/include/asm/nohash/32/pgalloc.h:35:22: note: in expansion of macro 'GFP_KERNEL'
pgtable_gfp_flags(GFP_KERNEL));
^~~~~~~~~~
In file included from kernel/fork.c:92:0:
arch/powerpc/include/asm/pgalloc.h:7:21: note: expected 'struct mm_struct *' but argument is of type 'unsigned int'
static inline gfp_t pgtable_gfp_flags(struct mm_struct *mm, gfp_t gfp)
^~~~~~~~~~~~~~~~~
In file included from arch/powerpc/include/asm/nohash/pgalloc.h:21:0,
from arch/powerpc/include/asm/pgalloc.h:23,
from kernel/fork.c:92:
arch/powerpc/include/asm/nohash/32/pgalloc.h:35:4: error: too few arguments to function 'pgtable_gfp_flags'
pgtable_gfp_flags(GFP_KERNEL));
^~~~~~~~~~~~~~~~~
In file included from kernel/fork.c:92:0:
arch/powerpc/include/asm/pgalloc.h:7:21: note: declared here
static inline gfp_t pgtable_gfp_flags(struct mm_struct *mm, gfp_t gfp)
^~~~~~~~~~~~~~~~~
In file included from arch/powerpc/include/asm/nohash/pgalloc.h:21:0,
from arch/powerpc/include/asm/pgalloc.h:23,
from kernel/fork.c:92:
>> arch/powerpc/include/asm/nohash/32/pgalloc.h:36:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
vim +/pgtable_gfp_flags +240 include/linux/gfp.h
251603549 Vlastimil Babka 2016-07-28 234 * compound allocations that will generally fail quickly if memory is not
251603549 Vlastimil Babka 2016-07-28 235 * available and will not wake kswapd/kcompactd on failure. The _LIGHT
251603549 Vlastimil Babka 2016-07-28 236 * version does not attempt reclaim/compaction at all and is by default used
251603549 Vlastimil Babka 2016-07-28 237 * in page fault path, while the non-light is used by khugepaged.
d0164adc8 Mel Gorman 2015-11-06 238 */
d0164adc8 Mel Gorman 2015-11-06 239 #define GFP_ATOMIC (__GFP_HIGH|__GFP_ATOMIC|__GFP_KSWAPD_RECLAIM)
dd56b0464 Mel Gorman 2015-11-06 @240 #define GFP_KERNEL (__GFP_RECLAIM | __GFP_IO | __GFP_FS)
a9bb7e620 Vladimir Davydov 2016-01-14 241 #define GFP_KERNEL_ACCOUNT (GFP_KERNEL | __GFP_ACCOUNT)
d0164adc8 Mel Gorman 2015-11-06 242 #define GFP_NOWAIT (__GFP_KSWAPD_RECLAIM)
71baba4b9 Mel Gorman 2015-11-06 243 #define GFP_NOIO (__GFP_RECLAIM)
:::::: The code at line 240 was first introduced by commit
:::::: dd56b046426760aa0c852ad6e4b6b07891222d65 mm: page_alloc: hide some GFP internals and document the bits and flag combinations
:::::: TO: Mel Gorman <mgorman@techsingularity.net>
:::::: CC: Linus Torvalds <torvalds@linux-foundation.org>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 13899 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v2 2/3] powerpc/mm/book(e)(3s)/32: Add page table accounting
2017-05-01 10:31 ` kbuild test robot
@ 2017-05-01 11:09 ` Balbir Singh
0 siblings, 0 replies; 7+ messages in thread
From: Balbir Singh @ 2017-05-01 11:09 UTC (permalink / raw)
To: kbuild test robot
Cc: kbuild-all, Vladimir Davydov, Michael Ellerman, Scott Wood,
open list:LINUX FOR POWERPC (32-BIT AND 64-BIT), linux-mm
On Mon, May 1, 2017 at 8:31 PM, kbuild test robot <lkp@intel.com> wrote:
> Hi Balbir,
>
> [auto build test ERROR on powerpc/next]
> [also build test ERROR on v4.11 next-20170428]
> [if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
>
> url: https://github.com/0day-ci/linux/commits/Balbir-Singh/powerpc-mm-book-e-3s-64-Add-page-table-accounting/20170501-143900
> base: https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next
> config: powerpc-virtex5_defconfig (attached as .config)
> compiler: powerpc-linux-gnu-gcc (Debian 6.1.1-9) 6.1.1 20160705
> reproduce:
> wget https://raw.githubusercontent.com/01org/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
> chmod +x ~/bin/make.cross
> # save the attached .config to linux build tree
> make.cross ARCH=powerpc
>
> All error/warnings (new ones prefixed by >>):
>
> In file included from arch/powerpc/mm/mem.c:25:0:
> arch/powerpc/include/asm/nohash/32/pgalloc.h: In function 'pgd_alloc':
>>> include/linux/gfp.h:240:20: error: passing argument 1 of 'pgtable_gfp_flags' makes pointer from integer without a cast [-Werror=int-conversion]
> #define GFP_KERNEL (__GFP_RECLAIM | __GFP_IO | __GFP_FS)
> ^
> arch/powerpc/include/asm/nohash/32/pgalloc.h:35:22: note: in expansion of macro 'GFP_KERNEL'
> pgtable_gfp_flags(GFP_KERNEL));
That's a silly build error that escaped my build scripts, I'll send
out a better v3 with 32 bits fixed.
Balbir
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2017-05-01 11:09 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-05-01 6:34 [PATCH v2 0/3] Implement page table accounting for powerpc Balbir Singh
2017-05-01 6:34 ` [PATCH v2 1/3] powerpc/mm/book(e)(3s)/64: Add page table accounting Balbir Singh
2017-05-01 6:34 ` [PATCH v2 2/3] powerpc/mm/book(e)(3s)/32: " Balbir Singh
2017-05-01 10:02 ` kbuild test robot
2017-05-01 10:31 ` kbuild test robot
2017-05-01 11:09 ` Balbir Singh
2017-05-01 6:34 ` [PATCH v2 3/3] powerpc/mm/hugetlb: Add support for page accounting Balbir Singh
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).