linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: Nadav Amit <namit@vmware.com>
Cc: kbuild-all@01.org, Arnd Bergmann <arnd@arndb.de>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-kernel@vger.kernel.org, Nadav Amit <namit@vmware.com>
Subject: Re: [PATCH 11/19] vmw_balloon: rework the inflate and deflate loops
Date: Tue, 18 Sep 2018 17:55:33 +0800	[thread overview]
Message-ID: <201809181721.ZRwIoy4P%fengguang.wu@intel.com> (raw)
In-Reply-To: <20180918063853.198332-12-namit@vmware.com>

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

Hi Nadav,

I love your patch! Yet something to improve:

[auto build test ERROR on char-misc/char-misc-testing]
[also build test ERROR on v4.19-rc4 next-20180913]
[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/Nadav-Amit/vmw_balloon-compaction-shrinker-64-bit-etc/20180918-152302
config: i386-randconfig-s2-09171149 (attached as .config)
compiler: gcc-6 (Debian 6.4.0-9) 6.4.0 20171026
reproduce:
        # save the attached .config to linux build tree
        make ARCH=i386 

All errors (new ones prefixed by >>):

   drivers/misc/vmw_balloon.o: In function `vmballoon_deflate':
>> drivers/misc/vmw_balloon.c:1073: undefined reference to `__divdi3'
   drivers/misc/vmw_balloon.o: In function `vmballoon_inflate':
   drivers/misc/vmw_balloon.c:966: undefined reference to `__divdi3'

vim +1073 drivers/misc/vmw_balloon.c

  1018	
  1019	/**
  1020	 * vmballoon_deflate() - Decrease the size of the balloon.
  1021	 *
  1022	 * @b: pointer to the balloon
  1023	 * @n_frames: the number of frames to deflate. If zero, automatically
  1024	 * calculated according to the target size.
  1025	 * @coordinated: whether to coordinate with the host
  1026	 *
  1027	 * Decrease the size of the balloon allowing guest to use more memory.
  1028	 *
  1029	 * Return: The number of deflated frames (i.e., basic page size units)
  1030	 */
  1031	static unsigned long vmballoon_deflate(struct vmballoon *b, uint64_t n_frames,
  1032					       bool coordinated)
  1033	{
  1034		unsigned long deflated_frames = 0;
  1035		unsigned long tried_frames = 0;
  1036		struct vmballoon_ctl ctl = {
  1037			.pages = LIST_HEAD_INIT(ctl.pages),
  1038			.refused_pages = LIST_HEAD_INIT(ctl.refused_pages),
  1039			.page_size = VMW_BALLOON_4K_PAGE,
  1040			.op = VMW_BALLOON_DEFLATE
  1041		};
  1042	
  1043		/* free pages to reach target */
  1044		while (true) {
  1045			unsigned int to_deflate_pages, n_unlocked_frames;
  1046			unsigned int page_in_frames;
  1047			int64_t to_deflate_frames;
  1048			bool deflated_all;
  1049	
  1050			page_in_frames = vmballoon_page_in_frames(ctl.page_size);
  1051	
  1052			VM_BUG_ON(!list_empty(&ctl.pages));
  1053			VM_BUG_ON(ctl.n_pages);
  1054			VM_BUG_ON(!list_empty(&ctl.refused_pages));
  1055			VM_BUG_ON(ctl.n_refused_pages);
  1056	
  1057			/*
  1058			 * If we were requested a specific number of frames, we try to
  1059			 * deflate this number of frames. Otherwise, deflation is
  1060			 * performed according to the target and balloon size.
  1061			 */
  1062			to_deflate_frames = n_frames ? n_frames - tried_frames :
  1063						       -vmballoon_change(b);
  1064	
  1065			/* break if no work to do */
  1066			if (to_deflate_frames <= 0)
  1067				break;
  1068	
  1069			/*
  1070			 * Calculate the number of frames based on current page size,
  1071			 * but limit the deflated frames to a single chunk
  1072			 */
> 1073			to_deflate_pages = min_t(unsigned long, b->batch_max_pages,
  1074						 DIV_ROUND_UP(to_deflate_frames,
  1075							      page_in_frames));
  1076	
  1077			/* First take the pages from the balloon pages. */
  1078			vmballoon_dequeue_page_list(b, &ctl.pages, &ctl.n_pages,
  1079						    ctl.page_size, to_deflate_pages);
  1080	
  1081			/*
  1082			 * Before pages are moving to the refused list, count their
  1083			 * frames as frames that we tried to deflate.
  1084			 */
  1085			tried_frames += ctl.n_pages * page_in_frames;
  1086	
  1087			/*
  1088			 * Unlock the pages by communicating with the hypervisor if the
  1089			 * communication is coordinated (i.e., not pop). We ignore the
  1090			 * return code. Instead we check if all the pages we manage to
  1091			 * unlock all the pages. If we failed, we will move to the next
  1092			 * page size, and would eventually try again later.
  1093			 */
  1094			if (coordinated)
  1095				vmballoon_lock(b, &ctl);
  1096	
  1097			/*
  1098			 * Check if we deflated enough. We will move to the next page
  1099			 * size if we did not manage to do so. This calculation takes
  1100			 * place now, as once the pages are released, the number of
  1101			 * pages is zeroed.
  1102			 */
  1103			deflated_all = (ctl.n_pages == to_deflate_pages);
  1104	
  1105			/* Update local and global counters */
  1106			n_unlocked_frames = ctl.n_pages * page_in_frames;
  1107			atomic64_sub(n_unlocked_frames, &b->size);
  1108			deflated_frames += n_unlocked_frames;
  1109	
  1110			vmballoon_stats_page_add(b, VMW_BALLOON_PAGE_STAT_FREE,
  1111						 ctl.page_size, ctl.n_pages);
  1112	
  1113			/* free the ballooned pages */
  1114			vmballoon_release_page_list(&ctl.pages, &ctl.n_pages,
  1115						    ctl.page_size);
  1116	
  1117			/* Return the refused pages to the ballooned list. */
  1118			vmballoon_enqueue_page_list(b, &ctl.refused_pages,
  1119						    &ctl.n_refused_pages,
  1120						    ctl.page_size);
  1121	
  1122			/* If we failed to unlock all the pages, move to next size. */
  1123			if (!deflated_all) {
  1124				if (ctl.page_size == b->max_page_size)
  1125					break;
  1126				ctl.page_size++;
  1127			}
  1128	
  1129			cond_resched();
  1130		}
  1131	
  1132		return deflated_frames;
  1133	}
  1134	

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

  reply	other threads:[~2018-09-18  9:56 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-18  6:38 [PATCH 00/19] vmw_balloon: compaction, shrinker, 64-bit, etc Nadav Amit
2018-09-18  6:38 ` [PATCH 01/19] vmw_balloon: handle commands in a single function Nadav Amit
2018-09-18  6:38 ` [PATCH 02/19] vmw_balloon: unify commands tracing and stats Nadav Amit
2018-09-18  6:38 ` [PATCH 03/19] vmw_balloon: merge send_lock and send_unlock path Nadav Amit
2018-09-18  6:38 ` [PATCH 04/19] vmw_balloon: simplifying batch access Nadav Amit
2018-09-18  6:38 ` [PATCH 05/19] vmw_balloon: remove sleeping allocations Nadav Amit
2018-09-18 10:01   ` kbuild test robot
2018-09-18  6:38 ` [PATCH 06/19] vmw_balloon: change batch/single lock abstractions Nadav Amit
2018-09-18  6:38 ` [PATCH 07/19] vmw_balloon: treat all refused pages equally Nadav Amit
2018-09-18  6:38 ` [PATCH 08/19] vmw_balloon: refactor change size from vmballoon_work Nadav Amit
2018-09-18  8:09   ` kbuild test robot
2018-09-18 12:19   ` kbuild test robot
2018-09-18  6:38 ` [PATCH 09/19] vmw_balloon: simplify vmballoon_send_get_target() Nadav Amit
2018-09-18  6:38 ` [PATCH 10/19] vmw_balloon: stats rework Nadav Amit
2018-09-18  6:38 ` [PATCH 11/19] vmw_balloon: rework the inflate and deflate loops Nadav Amit
2018-09-18  9:55   ` kbuild test robot [this message]
2018-09-18 15:46   ` kbuild test robot
2018-09-18  6:38 ` [PATCH 12/19] vmw_balloon: general style cleanup Nadav Amit
2018-09-18  6:38 ` [PATCH 13/19] vmw_balloon: add reset stat Nadav Amit
2018-09-18  6:38 ` [PATCH 14/19] mm/balloon_compaction: suppress allocation warnings Nadav Amit
2018-09-18  6:38 ` [PATCH 15/19] mm/balloon_compaction: list interfaces Nadav Amit
2018-09-18  6:38 ` [PATCH 16/19] vmw_balloon: compaction support Nadav Amit
2018-09-18  6:38 ` [PATCH 17/19] vmw_balloon: support 64-bit memory limit Nadav Amit
2018-09-18  6:38 ` [PATCH 18/19] vmw_balloon: memory shrinker Nadav Amit
2018-09-18  6:38 ` [PATCH 19/19] vmw_balloon: split refused pages Nadav Amit
2018-09-18 12:27 ` [PATCH 00/19] vmw_balloon: compaction, shrinker, 64-bit, etc Greg Kroah-Hartman
2018-09-18 16:42   ` Nadav Amit

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=201809181721.ZRwIoy4P%fengguang.wu@intel.com \
    --to=lkp@intel.com \
    --cc=arnd@arndb.de \
    --cc=gregkh@linuxfoundation.org \
    --cc=kbuild-all@01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=namit@vmware.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 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).