From: kernel test robot <lkp@intel.com>
To: Joshua Hahn <joshua.hahnjy@gmail.com>,
Minchan Kim <minchan@kernel.org>,
Sergey Senozhatsky <senozhatsky@chromium.org>
Cc: oe-kbuild-all@lists.linux.dev,
Johannes Weiner <hannes@cmpxchg.org>,
Yosry Ahmed <yosry.ahmed@linux.dev>,
Nhat Pham <hoangnhat.pham@linux.dev>,
Harry Yoo <harry.yoo@oracle.com>,
Andrew Morton <akpm@linux-foundation.org>,
Linux Memory Management List <linux-mm@kvack.org>,
linux-kernel@vger.kernel.org, kernel-team@meta.com
Subject: Re: [PATCH 10/11] mm/zsmalloc: Handle single object charge migration in migrate_zspage
Date: Thu, 12 Mar 2026 11:51:58 +0800 [thread overview]
Message-ID: <202603121115.dm3Z6KvA-lkp@intel.com> (raw)
In-Reply-To: <20260311195153.4013476-11-joshua.hahnjy@gmail.com>
Hi Joshua,
kernel test robot noticed the following build warnings:
[auto build test WARNING on axboe/for-next]
[also build test WARNING on linus/master v7.0-rc3]
[cannot apply to akpm-mm/mm-everything next-20260311]
[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/Joshua-Hahn/mm-zsmalloc-Rename-zs_object_copy-to-zs_obj_copy/20260312-035531
base: https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux.git for-next
patch link: https://lore.kernel.org/r/20260311195153.4013476-11-joshua.hahnjy%40gmail.com
patch subject: [PATCH 10/11] mm/zsmalloc: Handle single object charge migration in migrate_zspage
config: arc-randconfig-001-20260312 (https://download.01.org/0day-ci/archive/20260312/202603121115.dm3Z6KvA-lkp@intel.com/config)
compiler: arc-linux-gcc (GCC) 8.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260312/202603121115.dm3Z6KvA-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202603121115.dm3Z6KvA-lkp@intel.com/
All warnings (new ones prefixed by >>):
mm/zsmalloc.c: In function 'zs_compact.part.28':
>> mm/zsmalloc.c:1696:15: warning: 's_idx' is used uninitialized in this function [-Wuninitialized]
unsigned int s_idx, d_idx;
^~~~~
vim +/s_idx +1696 mm/zsmalloc.c
1686
1687 #ifdef CONFIG_MEMCG
1688 static void zs_migrate_objcg(struct zspage *s_zspage, struct zspage *d_zspage,
1689 unsigned long used_obj, unsigned long free_obj,
1690 struct zs_pool *pool, int size)
1691 {
1692 struct zpdesc *s_zpdesc, *d_zpdesc;
1693 struct obj_cgroup *objcg;
1694 struct mem_cgroup *memcg;
1695 struct lruvec *l;
> 1696 unsigned int s_idx, d_idx;
1697 unsigned int s_off, d_off;
1698 int charges[4], nids[4], partial;
1699 int s_bytes_in_page, d_bytes_in_page;
1700 int i;
1701
1702 if (!cgroup_subsys_on_dfl(memory_cgrp_subsys))
1703 goto out;
1704
1705 obj_to_location(used_obj, &s_zpdesc, &s_idx);
1706 obj_to_location(free_obj, &d_zpdesc, &d_idx);
1707
1708 objcg = s_zspage->objcgs[s_idx];
1709 if (!objcg)
1710 goto out;
1711
1712 /*
1713 * The object migration here can touch up to 4 nodes.
1714 * Instead of breaking down all possible combinations of node changes,
1715 * just uncharge entirely from the source and charge entirely to the
1716 * destination, even if there is are node overlaps between src and dst.
1717 */
1718 s_off = (s_idx * size) % PAGE_SIZE;
1719 d_off = (d_idx * size) % PAGE_SIZE;
1720 s_bytes_in_page = min_t(int, size, PAGE_SIZE - s_off);
1721 d_bytes_in_page = min_t(int, size, PAGE_SIZE - d_off);
1722
1723 charges[0] = -s_bytes_in_page;
1724 nids[0] = page_to_nid(zpdesc_page(s_zpdesc));
1725 charges[1] = -(size - s_bytes_in_page); /* 0 if object doesn't span */
1726 if (charges[1])
1727 nids[1] = page_to_nid(zpdesc_page(get_next_zpdesc(s_zpdesc)));
1728
1729 charges[2] = d_bytes_in_page;
1730 nids[2] = page_to_nid(zpdesc_page(d_zpdesc));
1731 charges[3] = size - d_bytes_in_page; /* 0 if object doesn't span */
1732 if (charges[3])
1733 nids[3] = page_to_nid(zpdesc_page(get_next_zpdesc(d_zpdesc)));
1734
1735 rcu_read_lock();
1736 memcg = obj_cgroup_memcg(objcg);
1737 for (i = 0; i < 4; i++) {
1738 if (!charges[i])
1739 continue;
1740
1741 l = mem_cgroup_lruvec(memcg, NODE_DATA(nids[i]));
1742 partial = (PAGE_SIZE * charges[i]) / size;
1743 mod_memcg_lruvec_state(l, pool->compressed_stat, charges[i]);
1744 mod_memcg_lruvec_state(l, pool->uncompressed_stat, partial);
1745 }
1746 rcu_read_unlock();
1747
1748 dec_node_page_state(zpdesc_page(s_zpdesc), pool->uncompressed_stat);
1749 inc_node_page_state(zpdesc_page(d_zpdesc), pool->uncompressed_stat);
1750
1751 out:
1752 d_zspage->objcgs[d_idx] = s_zspage->objcgs[s_idx];
1753 s_zspage->objcgs[s_idx] = NULL;
1754 }
1755 #else
1756 static void zs_migrate_objcg(struct zspage *s_zspage, struct zspage *d_zspage,
1757 unsigned long used_obj, unsigned long free_obj,
1758 struct zs_pool *pool, int size)
1759 {
1760 }
1761 #endif
1762
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next prev parent reply other threads:[~2026-03-12 3:52 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-11 19:51 [PATCH 00/11] mm/zswap, zsmalloc: Per-memcg-lruvec zswap accounting Joshua Hahn
2026-03-11 19:51 ` [PATCH 01/11] mm/zsmalloc: Rename zs_object_copy to zs_obj_copy Joshua Hahn
2026-03-11 19:56 ` Yosry Ahmed
2026-03-11 20:00 ` Nhat Pham
2026-03-11 19:51 ` [PATCH 02/11] mm/zsmalloc: Make all obj_idx unsigned ints Joshua Hahn
2026-03-11 19:58 ` Yosry Ahmed
2026-03-11 20:01 ` Nhat Pham
2026-03-11 19:51 ` [PATCH 03/11] mm/zsmalloc: Introduce conditional memcg awareness to zs_pool Joshua Hahn
2026-03-11 20:12 ` Nhat Pham
2026-03-11 20:16 ` Johannes Weiner
2026-03-11 20:19 ` Yosry Ahmed
2026-03-11 20:20 ` Joshua Hahn
2026-03-11 19:51 ` [PATCH 04/11] mm/zsmalloc: Introduce objcgs pointer in struct zspage Joshua Hahn
2026-03-11 20:17 ` Nhat Pham
2026-03-11 20:22 ` Joshua Hahn
2026-03-11 19:51 ` [PATCH 05/11] mm/zsmalloc: Store obj_cgroup pointer in zspage Joshua Hahn
2026-03-11 20:17 ` Yosry Ahmed
2026-03-11 20:24 ` Joshua Hahn
2026-03-11 19:51 ` [PATCH 06/11] mm/zsmalloc, zswap: Redirect zswap_entry->objcg to zspage Joshua Hahn
2026-03-11 19:51 ` [PATCH 07/11] mm/zsmalloc, zswap: Handle objcg charging and lifetime in zsmalloc Joshua Hahn
2026-03-12 21:42 ` Johannes Weiner
2026-03-13 15:34 ` Joshua Hahn
2026-03-13 16:49 ` Johannes Weiner
2026-03-11 19:51 ` [PATCH 08/11] mm/memcontrol: Track MEMCG_ZSWAPPED in bytes Joshua Hahn
2026-03-11 20:33 ` Nhat Pham
2026-03-17 19:13 ` Joshua Hahn
2026-03-11 19:51 ` [PATCH 09/11] mm/vmstat, memcontrol: Track ZSWAP_B, ZSWAPPED_B per-memcg-lruvec Joshua Hahn
2026-03-11 19:51 ` [PATCH 10/11] mm/zsmalloc: Handle single object charge migration in migrate_zspage Joshua Hahn
2026-03-12 3:51 ` kernel test robot [this message]
2026-03-12 3:51 ` kernel test robot
2026-03-12 16:56 ` Joshua Hahn
2026-03-11 19:51 ` [PATCH 11/11] mm/zsmalloc: Handle charge migration in zpdesc substitution Joshua Hahn
2026-03-11 19:54 ` [PATCH 00/11] mm/zswap, zsmalloc: Per-memcg-lruvec zswap accounting Joshua Hahn
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=202603121115.dm3Z6KvA-lkp@intel.com \
--to=lkp@intel.com \
--cc=akpm@linux-foundation.org \
--cc=hannes@cmpxchg.org \
--cc=harry.yoo@oracle.com \
--cc=hoangnhat.pham@linux.dev \
--cc=joshua.hahnjy@gmail.com \
--cc=kernel-team@meta.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=minchan@kernel.org \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=senozhatsky@chromium.org \
--cc=yosry.ahmed@linux.dev \
/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