Linux-mm Archive on lore.kernel.org
 help / color / Atom feed
From: kbuild test robot <lkp@intel.com>
To: Toshiki Fukasawa <t-fukasawa@vx.jp.nec.com>
Cc: kbuild-all@lists.01.org,
	"linux-mm@kvack.org" <linux-mm@kvack.org>,
	"dan.j.williams@intel.com" <dan.j.williams@intel.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"akpm@linux-foundation.org" <akpm@linux-foundation.org>,
	"mhocko@kernel.org" <mhocko@kernel.org>,
	"adobriyan@gmail.com" <adobriyan@gmail.com>,
	"hch@lst.de" <hch@lst.de>,
	"longman@redhat.com" <longman@redhat.com>,
	"sfr@canb.auug.org.au" <sfr@canb.auug.org.au>,
	"mst@redhat.com" <mst@redhat.com>, "cai@lca.pw" <cai@lca.pw>,
	Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>,
	Junichi Nomura <j-nomura@ce.jp.nec.com>
Subject: Re: [PATCH 3/3] mm: make pfn walker support ZONE_DEVICE
Date: Sun, 10 Nov 2019 01:08:34 +0800
Message-ID: <201911100120.5O5KBdRJ%lkp@intel.com> (raw)
In-Reply-To: <20191108000855.25209-4-t-fukasawa@vx.jp.nec.com>

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

Hi Toshiki,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on linus/master]
[also build test ERROR on v5.4-rc6]
[cannot apply to next-20191108]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url:    https://github.com/0day-ci/linux/commits/Toshiki-Fukasawa/make-pfn-walker-support-ZONE_DEVICE/20191110-000508
base:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 0058b0a506e40d9a2c62015fe92eb64a44d78cd9
config: i386-defconfig (attached as .config)
compiler: gcc-7 (Debian 7.4.0-14) 7.4.0
reproduce:
        # save the attached .config to linux build tree
        make ARCH=i386 

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

All errors (new ones prefixed by >>):

   fs/proc/page.c: In function 'kpage_common_read':
>> fs/proc/page.c:46:17: error: implicit declaration of function 'pfn_zone_device'; did you mean 'bus_find_device'? [-Werror=implicit-function-declaration]
      if (!ppage && pfn_zone_device(pfn)) {
                    ^~~~~~~~~~~~~~~
                    bus_find_device
   cc1: some warnings being treated as errors

vim +46 fs/proc/page.c

    25	
    26	/*
    27	 * This is general function to read various data on pages.
    28	 */
    29	static ssize_t kpage_common_read(struct file *file, char __user *buf,
    30			size_t count, loff_t *ppos, read_page_data_fn_t read_fn)
    31	{
    32		u64 __user *out = (u64 __user *)buf;
    33		struct page *ppage;
    34		unsigned long src = *ppos;
    35		unsigned long pfn;
    36		unsigned long valid_pages = 0;
    37		ssize_t ret = 0;
    38	
    39		pfn = src / KPMSIZE;
    40		count = min_t(size_t, count, (max_pfn * KPMSIZE) - src);
    41		if (src & KPMMASK || count & KPMMASK)
    42			return -EINVAL;
    43	
    44		while (count > 0) {
    45			ppage = pfn_to_online_page(pfn);
  > 46			if (!ppage && pfn_zone_device(pfn)) {
    47				/*
    48				 * Skip to read first few uninitialized pages on
    49				 * ZONE_DEVICE. And count valid pages starting
    50				 * with the pfn so that minimize the number of
    51				 * calls to nr_valid_pages_zone_device().
    52				 */
    53				if (!valid_pages)
    54					valid_pages = nr_valid_pages_zone_device(pfn);
    55				if (valid_pages) {
    56					ppage = pfn_to_page(pfn);
    57					valid_pages--;
    58				}
    59			} else if (valid_pages) {
    60				/* ZONE_DEVICE has been hot removed */
    61				valid_pages = 0;
    62			}
    63	
    64			if (put_user(read_fn(ppage), out)) {
    65				ret = -EFAULT;
    66				break;
    67			}
    68	
    69			pfn++;
    70			out++;
    71			count -= KPMSIZE;
    72	
    73			cond_resched();
    74		}
    75	
    76		*ppos += (char __user *)out - buf;
    77		if (!ret)
    78			ret = (char __user *)out - buf;
    79		return ret;
    80	}
    81	

---
0-DAY kernel test infrastructure                 Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 28148 bytes --]

  reply index

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-08  0:08 [PATCH 0/3] " Toshiki Fukasawa
2019-11-08  0:08 ` [PATCH 1/3] procfs: refactor kpage_*_read() in fs/proc/page.c Toshiki Fukasawa
2019-11-08  0:08 ` [PATCH 2/3] mm: Introduce subsection_dev_map Toshiki Fukasawa
2019-11-08 19:13   ` Dan Williams
2019-11-13 18:51     ` David Hildenbrand
2019-11-13 19:06       ` Dan Williams
2019-11-13 19:53         ` David Hildenbrand
2019-11-13 20:10           ` Dan Williams
2019-11-13 20:23             ` David Hildenbrand
2019-11-13 20:40               ` David Hildenbrand
2019-11-13 21:11                 ` Dan Williams
2019-11-13 21:22                   ` David Hildenbrand
2019-11-13 21:26                     ` Dan Williams
2019-11-14 23:36                       ` Toshiki Fukasawa
2019-11-15  0:46                         ` David Hildenbrand
2019-11-15  2:57                           ` Toshiki Fukasawa
2019-11-08  0:08 ` [PATCH 3/3] mm: make pfn walker support ZONE_DEVICE Toshiki Fukasawa
2019-11-09 17:08   ` kbuild test robot [this message]
2019-11-09 19:14   ` kbuild test robot
2019-11-08  9:18 ` [PATCH 0/3] " Michal Hocko
2019-11-11  8:00   ` Toshiki Fukasawa
2019-11-11 16:23     ` Dan Williams

Reply instructions:

You may reply publically 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=201911100120.5O5KBdRJ%lkp@intel.com \
    --to=lkp@intel.com \
    --cc=adobriyan@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=cai@lca.pw \
    --cc=dan.j.williams@intel.com \
    --cc=hch@lst.de \
    --cc=j-nomura@ce.jp.nec.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=longman@redhat.com \
    --cc=mhocko@kernel.org \
    --cc=mst@redhat.com \
    --cc=n-horiguchi@ah.jp.nec.com \
    --cc=sfr@canb.auug.org.au \
    --cc=t-fukasawa@vx.jp.nec.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

Linux-mm Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-mm/0 linux-mm/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-mm linux-mm/ https://lore.kernel.org/linux-mm \
		linux-mm@kvack.org
	public-inbox-index linux-mm

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kvack.linux-mm


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git