All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH -V11 2/3] NUMA balancing: optimize page placement for memory tiering system
@ 2022-01-28 15:24 kernel test robot
  0 siblings, 0 replies; 6+ messages in thread
From: kernel test robot @ 2022-01-28 15:24 UTC (permalink / raw)
  To: kbuild

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

CC: kbuild-all(a)lists.01.org
In-Reply-To: <20220128082751.593478-3-ying.huang@intel.com>
References: <20220128082751.593478-3-ying.huang@intel.com>
TO: Huang Ying <ying.huang@intel.com>

Hi Huang,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on linux/master]
[also build test WARNING on linus/master v5.17-rc1 next-20220128]
[cannot apply to tip/sched/core hnaz-mm/master]
[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]

url:    https://github.com/0day-ci/linux/commits/Huang-Ying/NUMA-balancing-optimize-memory-placement-for-memory-tiering-system/20220128-162856
base:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 2c271fe77d52a0555161926c232cd5bc07178b39
:::::: branch date: 7 hours ago
:::::: commit date: 7 hours ago
config: x86_64-randconfig-m001 (https://download.01.org/0day-ci/archive/20220128/202201282334.HfXqLBa5-lkp(a)intel.com/config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>

smatch warnings:
mm/vmscan.c:3987 pgdat_balanced() warn: bitwise AND condition is false here

vim +3987 mm/vmscan.c

904d2532d3f5bf3 Huang Ying      2022-01-28  3965  
e716f2eb24defb3 Mel Gorman      2017-05-03  3966  /*
e716f2eb24defb3 Mel Gorman      2017-05-03  3967   * Returns true if there is an eligible zone balanced for the request order
97a225e69a1f880 Joonsoo Kim     2020-06-03  3968   * and highest_zoneidx
e716f2eb24defb3 Mel Gorman      2017-05-03  3969   */
97a225e69a1f880 Joonsoo Kim     2020-06-03  3970  static bool pgdat_balanced(pg_data_t *pgdat, int order, int highest_zoneidx)
60cefed485a02bd Johannes Weiner 2012-11-29  3971  {
e716f2eb24defb3 Mel Gorman      2017-05-03  3972  	int i;
e716f2eb24defb3 Mel Gorman      2017-05-03  3973  	unsigned long mark = -1;
e716f2eb24defb3 Mel Gorman      2017-05-03  3974  	struct zone *zone;
60cefed485a02bd Johannes Weiner 2012-11-29  3975  
1c30844d2dfe272 Mel Gorman      2018-12-28  3976  	/*
1c30844d2dfe272 Mel Gorman      2018-12-28  3977  	 * Check watermarks bottom-up as lower zones are more likely to
1c30844d2dfe272 Mel Gorman      2018-12-28  3978  	 * meet watermarks.
1c30844d2dfe272 Mel Gorman      2018-12-28  3979  	 */
97a225e69a1f880 Joonsoo Kim     2020-06-03  3980  	for (i = 0; i <= highest_zoneidx; i++) {
e716f2eb24defb3 Mel Gorman      2017-05-03  3981  		zone = pgdat->node_zones + i;
e716f2eb24defb3 Mel Gorman      2017-05-03  3982  
e716f2eb24defb3 Mel Gorman      2017-05-03  3983  		if (!managed_zone(zone))
e716f2eb24defb3 Mel Gorman      2017-05-03  3984  			continue;
e716f2eb24defb3 Mel Gorman      2017-05-03  3985  
e716f2eb24defb3 Mel Gorman      2017-05-03  3986  		mark = high_wmark_pages(zone);
904d2532d3f5bf3 Huang Ying      2022-01-28 @3987  		if (sysctl_numa_balancing_mode & NUMA_BALANCING_MEMORY_TIERING &&
904d2532d3f5bf3 Huang Ying      2022-01-28  3988  		    numa_demotion_enabled &&
904d2532d3f5bf3 Huang Ying      2022-01-28  3989  		    next_demotion_node(pgdat->node_id) != NUMA_NO_NODE) {
904d2532d3f5bf3 Huang Ying      2022-01-28  3990  			unsigned long promote_mark;
904d2532d3f5bf3 Huang Ying      2022-01-28  3991  
904d2532d3f5bf3 Huang Ying      2022-01-28  3992  			promote_mark = max(NUMA_BALANCING_PROMOTE_WATERMARK_MIN,
904d2532d3f5bf3 Huang Ying      2022-01-28  3993  				mark / NUMA_BALANCING_PROMOTE_WATERMARK_DIV);
904d2532d3f5bf3 Huang Ying      2022-01-28  3994  			mark += promote_mark;
904d2532d3f5bf3 Huang Ying      2022-01-28  3995  		}
97a225e69a1f880 Joonsoo Kim     2020-06-03  3996  		if (zone_watermark_ok_safe(zone, order, mark, highest_zoneidx))
e716f2eb24defb3 Mel Gorman      2017-05-03  3997  			return true;
e716f2eb24defb3 Mel Gorman      2017-05-03  3998  	}
6256c6b499a1689 Mel Gorman      2016-07-28  3999  
e716f2eb24defb3 Mel Gorman      2017-05-03  4000  	/*
97a225e69a1f880 Joonsoo Kim     2020-06-03  4001  	 * If a node has no populated zone within highest_zoneidx, it does not
e716f2eb24defb3 Mel Gorman      2017-05-03  4002  	 * need balancing by definition. This can happen if a zone-restricted
e716f2eb24defb3 Mel Gorman      2017-05-03  4003  	 * allocation tries to wake a remote kswapd.
e716f2eb24defb3 Mel Gorman      2017-05-03  4004  	 */
e716f2eb24defb3 Mel Gorman      2017-05-03  4005  	if (mark == -1)
6256c6b499a1689 Mel Gorman      2016-07-28  4006  		return true;
e716f2eb24defb3 Mel Gorman      2017-05-03  4007  
e716f2eb24defb3 Mel Gorman      2017-05-03  4008  	return false;
60cefed485a02bd Johannes Weiner 2012-11-29  4009  }
60cefed485a02bd Johannes Weiner 2012-11-29  4010  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

^ permalink raw reply	[flat|nested] 6+ messages in thread
* [PATCH -V11 0/3] NUMA balancing: optimize memory placement for memory tiering system
@ 2022-01-28  8:27 Huang Ying
  2022-01-28  8:27 ` [PATCH -V11 2/3] NUMA balancing: optimize page " Huang Ying
  0 siblings, 1 reply; 6+ messages in thread
From: Huang Ying @ 2022-01-28  8:27 UTC (permalink / raw)
  To: Peter Zijlstra, Mel Gorman
  Cc: linux-mm, linux-kernel, Feng Tang, Huang Ying, Andrew Morton,
	Michal Hocko, Rik van Riel, Mel Gorman, Dave Hansen, Yang Shi,
	Zi Yan, Wei Xu, osalvador, Shakeel Butt, Hasan Al Maruf

The changes since the last post are as follows,

- Rebased on v5.17-rc1

- Remove [4-6] from the original patchset to make it easier to be
  reviewed.

- Change the additional promotion watermark to be the high watermark / 4.

--

With the advent of various new memory types, some machines will have
multiple types of memory, e.g. DRAM and PMEM (persistent memory).  The
memory subsystem of these machines can be called memory tiering
system, because the performance of the different types of memory are
different.

After commit c221c0b0308f ("device-dax: "Hotplug" persistent memory
for use like normal RAM"), the PMEM could be used as the
cost-effective volatile memory in separate NUMA nodes.  In a typical
memory tiering system, there are CPUs, DRAM and PMEM in each physical
NUMA node.  The CPUs and the DRAM will be put in one logical node,
while the PMEM will be put in another (faked) logical node.

To optimize the system overall performance, the hot pages should be
placed in DRAM node.  To do that, we need to identify the hot pages in
the PMEM node and migrate them to DRAM node via NUMA migration.

In the original NUMA balancing, there are already a set of existing
mechanisms to identify the pages recently accessed by the CPUs in a
node and migrate the pages to the node.  So we can reuse these
mechanisms to build the mechanisms to optimize the page placement in
the memory tiering system.  This is implemented in this patchset.

At the other hand, the cold pages should be placed in PMEM node.  So,
we also need to identify the cold pages in the DRAM node and migrate
them to PMEM node.

In commit 26aa2d199d6f ("mm/migrate: demote pages during reclaim"), a
mechanism to demote the cold DRAM pages to PMEM node under memory
pressure is implemented.  Based on that, the cold DRAM pages can be
demoted to PMEM node proactively to free some memory space on DRAM
node to accommodate the promoted hot PMEM pages.  This is implemented
in this patchset too.

We have tested the solution with the pmbench memory accessing
benchmark with the 80:20 read/write ratio and the Gauss access address
distribution on a 2 socket Intel server with Optane DC Persistent
Memory Model.  The test results shows that the pmbench score can
improve up to 95.9%.

Changelog:

v11:

- Rebased on v5.17-rc1

- Remove [4-6] from the original patchset to make it easier to be
  reviewed.

- Change the additional promotion watermark to be the high watermark / 4.

v10:

- Rebased on v5.16-rc1

- Revise error processing for [1/6] (promotion counter) per Yang's comments

- Add sysctl document for [2/6] (optimize page placement)

- Reset threshold adjustment state when disable/enable tiering mode

- Reset threshold when workload transition is detected.

v9:

- Rebased on v5.15-rc4

- Make "add promotion counter" the first patch per Yang's comments

v8:

- Rebased on v5.15-rc1

- Make user-specified threshold take effect sooner

v7:

- Rebased on the mmots tree of 2021-07-15.

- Some minor fixes.

v6:

- Rebased on the latest page demotion patchset. (which bases on v5.11)

v5:

- Rebased on the latest page demotion patchset. (which bases on v5.10)

v4:

- Rebased on the latest page demotion patchset. (which bases on v5.9-rc6)

- Add page promotion counter.

v3:

- Move the rate limit control as late as possible per Mel Gorman's
  comments.

- Revise the hot page selection implementation to store page scan time
  in struct page.

- Code cleanup.

- Rebased on the latest page demotion patchset.

v2:

- Addressed comments for V1.

- Rebased on v5.5.

Best Regards,
Huang, Ying


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-02-18  2:15 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-01-28 15:24 [PATCH -V11 2/3] NUMA balancing: optimize page placement for memory tiering system kernel test robot
  -- strict thread matches above, loose matches on Subject: below --
2022-01-28  8:27 [PATCH -V11 0/3] NUMA balancing: optimize memory " Huang Ying
2022-01-28  8:27 ` [PATCH -V11 2/3] NUMA balancing: optimize page " Huang Ying
2022-02-07 17:47   ` Johannes Weiner
2022-02-09  5:24     ` Huang, Ying
2022-02-17 16:26       ` Johannes Weiner
2022-02-18  2:15         ` Huang, Ying

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.