All of lore.kernel.org
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: Edward Chron <echron@arista.com>
Cc: kbuild-all@01.org, Andrew Morton <akpm@linux-foundation.org>,
	Michal Hocko <mhocko@suse.com>, Roman Gushchin <guro@fb.com>,
	Johannes Weiner <hannes@cmpxchg.org>,
	David Rientjes <rientjes@google.com>,
	Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>,
	Shakeel Butt <shakeelb@google.com>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	colona@arista.com, Edward Chron <echron@arista.com>
Subject: Re: [PATCH 01/10] mm/oom_debug: Add Debug base code
Date: Tue, 27 Aug 2019 21:28:29 +0800	[thread overview]
Message-ID: <201908272103.1HwKZnuB%lkp@intel.com> (raw)
In-Reply-To: <20190826193638.6638-2-echron@arista.com>

[-- Attachment #1: Type: text/plain, Size: 6046 bytes --]

Hi Edward,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on linus/master]
[cannot apply to v5.3-rc6 next-20190827]
[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/Edward-Chron/mm-oom_debug-Add-Debug-base-code/20190827-183210
config: sh-allmodconfig (attached as .config)
compiler: sh4-linux-gcc (GCC) 7.4.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        GCC_VERSION=7.4.0 make.cross ARCH=sh 

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>

All error/warnings (new ones prefixed by >>):

   In file included from include/linux/printk.h:6:0,
                    from include/linux/kernel.h:15,
                    from include/linux/list.h:9,
                    from include/linux/wait.h:7,
                    from include/linux/wait_bit.h:8,
                    from include/linux/fs.h:6,
                    from include/linux/debugfs.h:15,
                    from mm/oom_kill_debug.c:135:
>> mm/oom_kill_debug.c:261:17: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
    subsys_initcall(oom_debug_init)
                    ^
   include/linux/init.h:197:50: note: in definition of macro '___define_initcall'
      __attribute__((__section__(#__sec ".init"))) = fn;
                                                     ^~
   include/linux/init.h:224:30: note: in expansion of macro '__define_initcall'
    #define subsys_initcall(fn)  __define_initcall(fn, 4)
                                 ^~~~~~~~~~~~~~~~~
>> mm/oom_kill_debug.c:261:1: note: in expansion of macro 'subsys_initcall'
    subsys_initcall(oom_debug_init)
    ^~~~~~~~~~~~~~~
   cc1: some warnings being treated as errors

vim +261 mm/oom_kill_debug.c

 > 135	#include <linux/debugfs.h>
   136	#include <linux/fs.h>
   137	#include <linux/init.h>
   138	#include <linux/kernel.h>
   139	#include <linux/kobject.h>
   140	#include <linux/oom.h>
   141	#include <linux/printk.h>
   142	#include <linux/slab.h>
   143	#include <linux/string.h>
   144	#include <linux/sysfs.h>
   145	#include "oom_kill_debug.h"
   146	
   147	#define OOMD_MAX_FNAME 48
   148	#define OOMD_MAX_OPTNAME 32
   149	
   150	#define K(x) ((x) << (PAGE_SHIFT-10))
   151	
   152	static const char oom_debug_path[] = "/sys/kernel/debug/oom";
   153	
   154	static const char od_root_name[] = "oom";
   155	static struct dentry *od_root_dir;
   156	static u32 oom_kill_debug_oom_events;
   157	
   158	/* One oom_debug_option entry per debug option */
   159	struct oom_debug_option {
   160		const char *option_name;
   161		umode_t mode;
   162		struct dentry *dir_dentry;
   163		struct dentry *enabled_dentry;
   164		struct dentry *tenthpercent_dentry;
   165		bool enabled;
   166		u16 tenthpercent;
   167		bool support_tpercent;
   168	};
   169	
   170	/* Table of oom debug options, new options need to be added here */
   171	static struct oom_debug_option oom_debug_options_table[] = {
   172		{}
   173	};
   174	
   175	/* Option index by name for order one-lookup, add new options entry here */
   176	enum oom_debug_options_index {
   177		OUT_OF_BOUNDS
   178	};
   179	
   180	bool oom_kill_debug_enabled(u16 index)
   181	{
   182		return oom_debug_options_table[index].enabled;
   183	}
   184	
   185	u16 oom_kill_debug_tenthpercent(u16 index)
   186	{
   187		return oom_debug_options_table[index].tenthpercent;
   188	}
   189	
   190	static void filename_gen(char *pdest, const char *optname, const char *fname)
   191	{
   192		size_t len;
   193		char *pmsg;
   194	
   195		sprintf(pdest, "%s", optname);
   196		len = strnlen(pdest, OOMD_MAX_OPTNAME);
   197		pmsg = pdest + len;
   198		sprintf(pmsg, "%s", fname);
   199	}
   200	
   201	static void enabled_file_gen(struct oom_debug_option *entry)
   202	{
   203		char filename[OOMD_MAX_FNAME];
   204	
   205		filename_gen(filename, entry->option_name, "enabled");
   206		debugfs_create_bool(filename, 0644, entry->dir_dentry,
   207				    &entry->enabled);
   208		entry->enabled = OOM_KILL_DEBUG_DEFAULT_ENABLED;
   209	}
   210	
   211	static void tpercent_file_gen(struct oom_debug_option *entry)
   212	{
   213		char filename[OOMD_MAX_FNAME];
   214	
   215		filename_gen(filename, entry->option_name, "tenthpercent");
   216		debugfs_create_u16(filename, 0644, entry->dir_dentry,
   217				   &entry->tenthpercent);
   218		entry->tenthpercent = OOM_KILL_DEBUG_DEFAULT_TENTHPERCENT;
   219	}
   220	
   221	static void oom_debugfs_init(void)
   222	{
   223		struct oom_debug_option *table, *entry;
   224	
   225		od_root_dir = debugfs_create_dir(od_root_name, NULL);
   226	
   227		table = oom_debug_options_table;
   228		for (entry = table; entry->option_name; entry++) {
   229			entry->dir_dentry = od_root_dir;
   230			enabled_file_gen(entry);
   231			if (entry->support_tpercent)
   232				tpercent_file_gen(entry);
   233		}
   234	}
   235	
   236	static void oom_debug_common_cleanup(void)
   237	{
   238		/* Cleanup for oom root directory */
   239		debugfs_remove(od_root_dir);
   240	}
   241	
   242	u32 oom_kill_debug_oom_event(void)
   243	{
   244		return oom_kill_debug_oom_events;
   245	}
   246	
   247	u32 oom_kill_debug_oom_event_is(void)
   248	{
   249		++oom_kill_debug_oom_events;
   250	
   251		return oom_kill_debug_oom_events;
   252	}
   253	
   254	static void __init oom_debug_init(void)
   255	{
   256		/* Ensure we have a debugfs oom root directory */
   257		od_root_dir = debugfs_lookup(od_root_name, NULL);
   258		if (!od_root_dir)
   259			oom_debugfs_init();
   260	}
 > 261	subsys_initcall(oom_debug_init)
   262	

---
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: 51791 bytes --]

  reply	other threads:[~2019-08-27 13:29 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-26 19:36 [PATCH 00/10] OOM Debug print selection and additional information Edward Chron
2019-08-26 19:36 ` [PATCH 01/10] mm/oom_debug: Add Debug base code Edward Chron
2019-08-27 13:28   ` kbuild test robot [this message]
2019-08-26 19:36 ` [PATCH 02/10] mm/oom_debug: Add System State Summary Edward Chron
2019-08-26 19:36 ` [PATCH 03/10] mm/oom_debug: Add Tasks Summary Edward Chron
2019-08-26 19:36 ` [PATCH 04/10] mm/oom_debug: Add ARP and ND Table Summary usage Edward Chron
2019-08-26 19:36 ` [PATCH 05/10] mm/oom_debug: Add Select Slabs Print Edward Chron
2019-08-26 19:36 ` [PATCH 06/10] mm/oom_debug: Add Select Vmalloc Entries Print Edward Chron
2019-08-26 19:36 ` [PATCH 07/10] mm/oom_debug: Add Select Process " Edward Chron
2019-08-26 19:36 ` [PATCH 08/10] mm/oom_debug: Add Slab Select Always Print Enable Edward Chron
2019-08-26 19:36 ` [PATCH 09/10] mm/oom_debug: Add Enhanced Slab Print Information Edward Chron
2019-08-26 19:36 ` [PATCH 10/10] mm/oom_debug: Add Enhanced Process " Edward Chron
2019-08-28  0:21   ` kbuild test robot
2019-08-27  7:15 ` [PATCH 00/10] OOM Debug print selection and additional information Michal Hocko
2019-08-27 10:10   ` Tetsuo Handa
2019-08-27 10:38     ` Michal Hocko
2019-08-28  1:07   ` Edward Chron
2019-08-28  6:59     ` Michal Hocko
2019-08-28 19:46       ` Edward Chron
2019-08-28 20:18         ` Qian Cai
2019-08-28 21:17           ` Edward Chron
2019-08-28 21:34             ` Qian Cai
2019-08-29  7:11         ` Michal Hocko
2019-08-29 10:14           ` Tetsuo Handa
2019-08-29 11:56             ` Michal Hocko
2019-08-29 14:09               ` Tetsuo Handa
2019-08-29 15:48                 ` Edward Chron
2019-08-29 15:03               ` Edward Chron
2019-08-29 15:42                 ` Qian Cai
2019-08-29 16:09                   ` Edward Chron
2019-08-29 18:44                     ` Qian Cai
2019-08-29 22:41                       ` Edward Chron
2019-08-29 16:17                 ` Michal Hocko
2019-08-29 16:35                   ` Edward Chron
2019-08-29 15:20           ` Edward Chron
2019-08-27 12:40 ` Qian Cai
2019-08-28  0:23   ` Edward Chron
2019-08-28  0:50     ` Qian Cai
2019-08-28  1:13       ` Edward Chron
2019-08-28  1:32         ` Qian Cai
2019-08-28  2:47           ` Edward Chron
2019-08-28  7:08             ` Michal Hocko
2019-08-28 10:12               ` Tetsuo Handa
2019-08-28 10:32                 ` Michal Hocko
2019-08-28 10:56                   ` Tetsuo Handa
2019-08-28 11:12                     ` Michal Hocko
2019-08-28 20:04                 ` Edward Chron
2019-08-29  3:31                   ` Edward Chron

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201908272103.1HwKZnuB%lkp@intel.com \
    --to=lkp@intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=colona@arista.com \
    --cc=echron@arista.com \
    --cc=guro@fb.com \
    --cc=hannes@cmpxchg.org \
    --cc=kbuild-all@01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@suse.com \
    --cc=penguin-kernel@I-love.SAKURA.ne.jp \
    --cc=rientjes@google.com \
    --cc=shakeelb@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.