* [mmotm:master 203/305] mm/memcontrol.c:5629:52: error: 'THP_FAULT_ALLOC' undeclared; did you mean 'THP_FILE_ALLOC'?
@ 2019-01-31 18:57 kbuild test robot
2019-01-31 19:07 ` Chris Down
2019-01-31 19:07 ` Andrew Morton
0 siblings, 2 replies; 4+ messages in thread
From: kbuild test robot @ 2019-01-31 18:57 UTC (permalink / raw)
To: Chris Down
Cc: kbuild-all, Johannes Weiner, Andrew Morton,
Linux Memory Management List
[-- Attachment #1: Type: text/plain, Size: 5398 bytes --]
tree: git://git.cmpxchg.org/linux-mmotm.git master
head: a4186de8d65ec2ca6c39070ef1d6795a0b4ffe04
commit: 471431309f7656128a65d6df0c5c47ed112635a0 [203/305] mm: memcontrol: expose THP events on a per-memcg basis
config: ia64-allmodconfig (attached as .config)
compiler: ia64-linux-gcc (GCC) 8.2.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout 471431309f7656128a65d6df0c5c47ed112635a0
# save the attached .config to linux build tree
GCC_VERSION=8.2.0 make.cross ARCH=ia64
All errors (new ones prefixed by >>):
mm/memcontrol.c: In function 'memory_stat_show':
>> mm/memcontrol.c:5629:52: error: 'THP_FAULT_ALLOC' undeclared (first use in this function); did you mean 'THP_FILE_ALLOC'?
seq_printf(m, "thp_fault_alloc %lu\n", acc.events[THP_FAULT_ALLOC]);
^~~~~~~~~~~~~~~
THP_FILE_ALLOC
mm/memcontrol.c:5629:52: note: each undeclared identifier is reported only once for each function it appears in
>> mm/memcontrol.c:5631:17: error: 'THP_COLLAPSE_ALLOC' undeclared (first use in this function); did you mean 'THP_FILE_ALLOC'?
acc.events[THP_COLLAPSE_ALLOC]);
^~~~~~~~~~~~~~~~~~
THP_FILE_ALLOC
vim +5629 mm/memcontrol.c
5545
5546 static int memory_stat_show(struct seq_file *m, void *v)
5547 {
5548 struct mem_cgroup *memcg = mem_cgroup_from_seq(m);
5549 struct accumulated_stats acc;
5550 int i;
5551
5552 /*
5553 * Provide statistics on the state of the memory subsystem as
5554 * well as cumulative event counters that show past behavior.
5555 *
5556 * This list is ordered following a combination of these gradients:
5557 * 1) generic big picture -> specifics and details
5558 * 2) reflecting userspace activity -> reflecting kernel heuristics
5559 *
5560 * Current memory state:
5561 */
5562
5563 memset(&acc, 0, sizeof(acc));
5564 acc.stats_size = MEMCG_NR_STAT;
5565 acc.events_size = NR_VM_EVENT_ITEMS;
5566 accumulate_memcg_tree(memcg, &acc);
5567
5568 seq_printf(m, "anon %llu\n",
5569 (u64)acc.stat[MEMCG_RSS] * PAGE_SIZE);
5570 seq_printf(m, "file %llu\n",
5571 (u64)acc.stat[MEMCG_CACHE] * PAGE_SIZE);
5572 seq_printf(m, "kernel_stack %llu\n",
5573 (u64)acc.stat[MEMCG_KERNEL_STACK_KB] * 1024);
5574 seq_printf(m, "slab %llu\n",
5575 (u64)(acc.stat[NR_SLAB_RECLAIMABLE] +
5576 acc.stat[NR_SLAB_UNRECLAIMABLE]) * PAGE_SIZE);
5577 seq_printf(m, "sock %llu\n",
5578 (u64)acc.stat[MEMCG_SOCK] * PAGE_SIZE);
5579
5580 seq_printf(m, "shmem %llu\n",
5581 (u64)acc.stat[NR_SHMEM] * PAGE_SIZE);
5582 seq_printf(m, "file_mapped %llu\n",
5583 (u64)acc.stat[NR_FILE_MAPPED] * PAGE_SIZE);
5584 seq_printf(m, "file_dirty %llu\n",
5585 (u64)acc.stat[NR_FILE_DIRTY] * PAGE_SIZE);
5586 seq_printf(m, "file_writeback %llu\n",
5587 (u64)acc.stat[NR_WRITEBACK] * PAGE_SIZE);
5588
5589 /*
5590 * TODO: We should eventually replace our own MEMCG_RSS_HUGE counter
5591 * with the NR_ANON_THP vm counter, but right now it's a pain in the
5592 * arse because it requires migrating the work out of rmap to a place
5593 * where the page->mem_cgroup is set up and stable.
5594 */
5595 seq_printf(m, "anon_thp %llu\n",
5596 (u64)acc.stat[MEMCG_RSS_HUGE] * PAGE_SIZE);
5597
5598 for (i = 0; i < NR_LRU_LISTS; i++)
5599 seq_printf(m, "%s %llu\n", mem_cgroup_lru_names[i],
5600 (u64)acc.lru_pages[i] * PAGE_SIZE);
5601
5602 seq_printf(m, "slab_reclaimable %llu\n",
5603 (u64)acc.stat[NR_SLAB_RECLAIMABLE] * PAGE_SIZE);
5604 seq_printf(m, "slab_unreclaimable %llu\n",
5605 (u64)acc.stat[NR_SLAB_UNRECLAIMABLE] * PAGE_SIZE);
5606
5607 /* Accumulated memory events */
5608
5609 seq_printf(m, "pgfault %lu\n", acc.events[PGFAULT]);
5610 seq_printf(m, "pgmajfault %lu\n", acc.events[PGMAJFAULT]);
5611
5612 seq_printf(m, "workingset_refault %lu\n",
5613 acc.stat[WORKINGSET_REFAULT]);
5614 seq_printf(m, "workingset_activate %lu\n",
5615 acc.stat[WORKINGSET_ACTIVATE]);
5616 seq_printf(m, "workingset_nodereclaim %lu\n",
5617 acc.stat[WORKINGSET_NODERECLAIM]);
5618
5619 seq_printf(m, "pgrefill %lu\n", acc.events[PGREFILL]);
5620 seq_printf(m, "pgscan %lu\n", acc.events[PGSCAN_KSWAPD] +
5621 acc.events[PGSCAN_DIRECT]);
5622 seq_printf(m, "pgsteal %lu\n", acc.events[PGSTEAL_KSWAPD] +
5623 acc.events[PGSTEAL_DIRECT]);
5624 seq_printf(m, "pgactivate %lu\n", acc.events[PGACTIVATE]);
5625 seq_printf(m, "pgdeactivate %lu\n", acc.events[PGDEACTIVATE]);
5626 seq_printf(m, "pglazyfree %lu\n", acc.events[PGLAZYFREE]);
5627 seq_printf(m, "pglazyfreed %lu\n", acc.events[PGLAZYFREED]);
5628
> 5629 seq_printf(m, "thp_fault_alloc %lu\n", acc.events[THP_FAULT_ALLOC]);
5630 seq_printf(m, "thp_collapse_alloc %lu\n",
> 5631 acc.events[THP_COLLAPSE_ALLOC]);
5632
5633 return 0;
5634 }
5635
---
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: 52845 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [mmotm:master 203/305] mm/memcontrol.c:5629:52: error: 'THP_FAULT_ALLOC' undeclared; did you mean 'THP_FILE_ALLOC'?
2019-01-31 18:57 [mmotm:master 203/305] mm/memcontrol.c:5629:52: error: 'THP_FAULT_ALLOC' undeclared; did you mean 'THP_FILE_ALLOC'? kbuild test robot
@ 2019-01-31 19:07 ` Chris Down
2019-01-31 19:07 ` Andrew Morton
1 sibling, 0 replies; 4+ messages in thread
From: Chris Down @ 2019-01-31 19:07 UTC (permalink / raw)
To: kbuild test robot
Cc: kbuild-all, Johannes Weiner, Andrew Morton,
Linux Memory Management List
Patch already available: https://lore.kernel.org/patchwork/patch/1037502/
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [mmotm:master 203/305] mm/memcontrol.c:5629:52: error: 'THP_FAULT_ALLOC' undeclared; did you mean 'THP_FILE_ALLOC'?
2019-01-31 18:57 [mmotm:master 203/305] mm/memcontrol.c:5629:52: error: 'THP_FAULT_ALLOC' undeclared; did you mean 'THP_FILE_ALLOC'? kbuild test robot
2019-01-31 19:07 ` Chris Down
@ 2019-01-31 19:07 ` Andrew Morton
2019-01-31 19:09 ` Chris Down
1 sibling, 1 reply; 4+ messages in thread
From: Andrew Morton @ 2019-01-31 19:07 UTC (permalink / raw)
To: kbuild test robot
Cc: Chris Down, kbuild-all, Johannes Weiner,
Linux Memory Management List
On Fri, 1 Feb 2019 02:57:08 +0800 kbuild test robot <lkp@intel.com> wrote:
> tree: git://git.cmpxchg.org/linux-mmotm.git master
> head: a4186de8d65ec2ca6c39070ef1d6795a0b4ffe04
> commit: 471431309f7656128a65d6df0c5c47ed112635a0 [203/305] mm: memcontrol: expose THP events on a per-memcg basis
> config: ia64-allmodconfig (attached as .config)
> compiler: ia64-linux-gcc (GCC) 8.2.0
> reproduce:
> wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
> chmod +x ~/bin/make.cross
> git checkout 471431309f7656128a65d6df0c5c47ed112635a0
> # save the attached .config to linux build tree
> GCC_VERSION=8.2.0 make.cross ARCH=ia64
>
> All errors (new ones prefixed by >>):
>
> mm/memcontrol.c: In function 'memory_stat_show':
> >> mm/memcontrol.c:5629:52: error: 'THP_FAULT_ALLOC' undeclared (first use in this function); did you mean 'THP_FILE_ALLOC'?
> seq_printf(m, "thp_fault_alloc %lu\n", acc.events[THP_FAULT_ALLOC]);
> ^~~~~~~~~~~~~~~
> THP_FILE_ALLOC
> mm/memcontrol.c:5629:52: note: each undeclared identifier is reported only once for each function it appears in
> >> mm/memcontrol.c:5631:17: error: 'THP_COLLAPSE_ALLOC' undeclared (first use in this function); did you mean 'THP_FILE_ALLOC'?
> acc.events[THP_COLLAPSE_ALLOC]);
> ^~~~~~~~~~~~~~~~~~
> THP_FILE_ALLOC
Thanks. This, I assume:
--- a/mm/memcontrol.c~mm-memcontrol-expose-thp-events-on-a-per-memcg-basis-fix
+++ a/mm/memcontrol.c
@@ -39,6 +39,7 @@
#include <linux/shmem_fs.h>
#include <linux/hugetlb.h>
#include <linux/pagemap.h>
+#include <linux/vm_event_item.h>
#include <linux/smp.h>
#include <linux/page-flags.h>
#include <linux/backing-dev.h>
_
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [mmotm:master 203/305] mm/memcontrol.c:5629:52: error: 'THP_FAULT_ALLOC' undeclared; did you mean 'THP_FILE_ALLOC'?
2019-01-31 19:07 ` Andrew Morton
@ 2019-01-31 19:09 ` Chris Down
0 siblings, 0 replies; 4+ messages in thread
From: Chris Down @ 2019-01-31 19:09 UTC (permalink / raw)
To: Andrew Morton
Cc: kbuild test robot, kbuild-all, Johannes Weiner,
Linux Memory Management List
Andrew Morton writes:
>Thanks. This, I assume:
That might be desirable as well, but it's mostly because of lack of guard on
CONFIG_TRANSPARENT_HUGEPAGES :-)
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-01-31 19:09 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-01-31 18:57 [mmotm:master 203/305] mm/memcontrol.c:5629:52: error: 'THP_FAULT_ALLOC' undeclared; did you mean 'THP_FILE_ALLOC'? kbuild test robot
2019-01-31 19:07 ` Chris Down
2019-01-31 19:07 ` Andrew Morton
2019-01-31 19:09 ` Chris Down
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).