2022-08-16 10:57:47

by Alexander Atanasov

[permalink] [raw]
Subject: [PATCH v2 4/4] drivers: virtio: balloon - update inflated memory

Update the inflated memory when it changes.

Signed-off-by: Alexander Atanasov <[email protected]>
---
drivers/virtio/virtio_balloon.c | 5 +++++
1 file changed, 5 insertions(+)

diff --git a/drivers/virtio/virtio_balloon.c b/drivers/virtio/virtio_balloon.c
index 6f69e483d98a..c8093c704c2f 100644
--- a/drivers/virtio/virtio_balloon.c
+++ b/drivers/virtio/virtio_balloon.c
@@ -450,10 +450,15 @@ static void virtballoon_changed(struct virtio_device *vdev)
static void update_balloon_size(struct virtio_balloon *vb)
{
u32 actual = vb->num_pages;
+ long inflated_kb = actual << (VIRTIO_BALLOON_PFN_SHIFT - 10);

/* Legacy balloon config space is LE, unlike all other devices. */
virtio_cwrite_le(vb->vdev, struct virtio_balloon_config, actual,
&actual);
+ if (virtio_has_feature(vb->vdev, VIRTIO_BALLOON_F_DEFLATE_ON_OOM))
+ balloon_set_inflated_free(inflated_kb);
+ else
+ balloon_set_inflated_total(inflated_kb);
}

static void update_balloon_stats_func(struct work_struct *work)
--
2.31.1


2022-08-16 22:44:55

by kernel test robot

[permalink] [raw]
Subject: Re: [PATCH v2 4/4] drivers: virtio: balloon - update inflated memory

Hi Alexander,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on powerpc/next]
[also build test ERROR on char-misc/char-misc-testing linus/master v6.0-rc1 next-20220816]
[cannot apply to soc/for-next]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url: https://github.com/intel-lab-lkp/linux/commits/Alexander-Atanasov/Make-place-for-common-balloon-code/20220816-184943
base: https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next
config: i386-buildonly-randconfig-r004-20220815 (https://download.01.org/0day-ci/archive/20220817/[email protected]/config)
compiler: gcc-11 (Debian 11.3.0-5) 11.3.0
reproduce (this is a W=1 build):
# https://github.com/intel-lab-lkp/linux/commit/d37f8ca37c57eb9e68b55ef33ecfce719f98bfe7
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Alexander-Atanasov/Make-place-for-common-balloon-code/20220816-184943
git checkout d37f8ca37c57eb9e68b55ef33ecfce719f98bfe7
# save the config file
mkdir build_dir && cp config build_dir/.config
make W=1 O=build_dir ARCH=i386 SHELL=/bin/bash

If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <[email protected]>

All errors (new ones prefixed by >>, old ones prefixed by <<):

>> ERROR: modpost: "balloon_set_inflated_free" [drivers/virtio/virtio_balloon.ko] undefined!
>> ERROR: modpost: "balloon_set_inflated_total" [drivers/virtio/virtio_balloon.ko] undefined!

--
0-DAY CI Kernel Test Service
https://01.org/lkp

2022-08-17 05:12:46

by kernel test robot

[permalink] [raw]
Subject: Re: [PATCH v2 4/4] drivers: virtio: balloon - update inflated memory

Hi Alexander,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on powerpc/next]
[also build test ERROR on char-misc/char-misc-testing linus/master v6.0-rc1 next-20220816]
[cannot apply to soc/for-next]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url: https://github.com/intel-lab-lkp/linux/commits/Alexander-Atanasov/Make-place-for-common-balloon-code/20220816-184943
base: https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next
config: x86_64-randconfig-a001 (https://download.01.org/0day-ci/archive/20220817/[email protected]/config)
compiler: clang version 16.0.0 (https://github.com/llvm/llvm-project aed5e3bea138ce581d682158eb61c27b3cfdd6ec)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/intel-lab-lkp/linux/commit/d37f8ca37c57eb9e68b55ef33ecfce719f98bfe7
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Alexander-Atanasov/Make-place-for-common-balloon-code/20220816-184943
git checkout d37f8ca37c57eb9e68b55ef33ecfce719f98bfe7
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash

If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <[email protected]>

All errors (new ones prefixed by >>, old ones prefixed by <<):

>> ERROR: modpost: "balloon_set_inflated_total" [drivers/virtio/virtio_balloon.ko] undefined!
>> ERROR: modpost: "balloon_set_inflated_free" [drivers/virtio/virtio_balloon.ko] undefined!

--
0-DAY CI Kernel Test Service
https://01.org/lkp