linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: Vinayak Menon <vinmenon@codeaurora.org>
Cc: kbuild-all@01.org, hannes@cmpxchg.org,
	mgorman@techsingularity.net, linux-mm@kvack.org,
	akpm@linux-foundation.org, mhocko@suse.com, vbabka@suse.cz,
	sfr@canb.auug.org.au, pasha.tatashin@oracle.com,
	penguin-kernel@I-love.SAKURA.ne.jp
Subject: Re: [PATCH] mm: fix low-high watermark distance on small systems
Date: Sat, 17 Mar 2018 09:40:38 +0800	[thread overview]
Message-ID: <201803170945.CUYc2FQv%fengguang.wu@intel.com> (raw)
In-Reply-To: <1521110079-26870-1-git-send-email-vinmenon@codeaurora.org>

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

Hi Vinayak,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on v4.16-rc4]
[also build test ERROR on next-20180316]
[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/Vinayak-Menon/mm-fix-low-high-watermark-distance-on-small-systems/20180317-073051
config: i386-randconfig-a0-201810 (attached as .config)
compiler: gcc-4.9 (Debian 4.9.4-2) 4.9.4
reproduce:
        # save the attached .config to linux build tree
        make ARCH=i386 

All errors (new ones prefixed by >>):

   mm/page_alloc.o: In function `__setup_per_zone_wmarks':
>> mm/page_alloc.c:7061: undefined reference to `__udivdi3'
>> mm/page_alloc.c:7061: undefined reference to `__umoddi3'
>> mm/page_alloc.c:7061: undefined reference to `__udivdi3'

vim +7061 mm/page_alloc.c

  6999	
  7000	static void __setup_per_zone_wmarks(void)
  7001	{
  7002		unsigned long pages_min = min_free_kbytes >> (PAGE_SHIFT - 10);
  7003		unsigned long lowmem_pages = 0;
  7004		struct zone *zone;
  7005		unsigned long flags;
  7006	
  7007		/* Calculate total number of !ZONE_HIGHMEM pages */
  7008		for_each_zone(zone) {
  7009			if (!is_highmem(zone))
  7010				lowmem_pages += zone->managed_pages;
  7011		}
  7012	
  7013		for_each_zone(zone) {
  7014			u64 tmp;
  7015	
  7016			spin_lock_irqsave(&zone->lock, flags);
  7017			tmp = (u64)pages_min * zone->managed_pages;
  7018			do_div(tmp, lowmem_pages);
  7019			if (is_highmem(zone)) {
  7020				/*
  7021				 * __GFP_HIGH and PF_MEMALLOC allocations usually don't
  7022				 * need highmem pages, so cap pages_min to a small
  7023				 * value here.
  7024				 *
  7025				 * The WMARK_HIGH-WMARK_LOW and (WMARK_LOW-WMARK_MIN)
  7026				 * deltas control asynch page reclaim, and so should
  7027				 * not be capped for highmem.
  7028				 */
  7029				unsigned long min_pages;
  7030	
  7031				min_pages = zone->managed_pages / 1024;
  7032				min_pages = clamp(min_pages, SWAP_CLUSTER_MAX, 128UL);
  7033				zone->watermark[WMARK_MIN] = min_pages;
  7034			} else {
  7035				/*
  7036				 * If it's a lowmem zone, reserve a number of pages
  7037				 * proportionate to the zone's size.
  7038				 */
  7039				zone->watermark[WMARK_MIN] = tmp;
  7040			}
  7041	
  7042			/*
  7043			 * Set the kswapd watermarks distance according to the
  7044			 * scale factor in proportion to available memory, but
  7045			 * ensure a minimum size on small systems.
  7046			 */
  7047			tmp = max_t(u64, tmp >> 2,
  7048				    mult_frac(zone->managed_pages,
  7049					      watermark_scale_factor, 10000));
  7050	
  7051			zone->watermark[WMARK_LOW]  = min_wmark_pages(zone) + tmp;
  7052	
  7053			/*
  7054			 * Set the kswapd low-high distance as a percentage of
  7055			 * min-low distance in such a way that the distance
  7056			 * increases non-linearly with available memory. This
  7057			 * ensures enough free memory without causing thrashing
  7058			 * on small machines due to excessive reclaim by kswapd.
  7059			 * Ensure a minimum distance on very small machines.
  7060			 */
> 7061			tmp = clamp_t(u64, mult_frac(tmp,
  7062					int_sqrt(4 * zone->managed_pages), 10000),
  7063						min_wmark_pages(zone) >> 2, tmp);
  7064	
  7065			zone->watermark[WMARK_HIGH] = low_wmark_pages(zone) + tmp;
  7066	
  7067			spin_unlock_irqrestore(&zone->lock, flags);
  7068		}
  7069	
  7070		/* update totalreserve_pages */
  7071		calculate_totalreserve_pages();
  7072	}
  7073	

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

      parent reply	other threads:[~2018-03-17  1:41 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-15 10:34 Vinayak Menon
2018-03-15 14:34 ` Minchan Kim
2018-03-16 11:03   ` Vinayak Menon
2018-03-20 10:16     ` Minchan Kim
2018-03-20 10:52       ` Vinayak Menon
2018-03-20 11:29         ` Minchan Kim
2018-03-22 13:43           ` Vinayak Menon
2018-03-17  0:42 ` kbuild test robot
2018-03-17  1:40 ` kbuild test robot [this message]

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=201803170945.CUYc2FQv%fengguang.wu@intel.com \
    --to=lkp@intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=hannes@cmpxchg.org \
    --cc=kbuild-all@01.org \
    --cc=linux-mm@kvack.org \
    --cc=mgorman@techsingularity.net \
    --cc=mhocko@suse.com \
    --cc=pasha.tatashin@oracle.com \
    --cc=penguin-kernel@I-love.SAKURA.ne.jp \
    --cc=sfr@canb.auug.org.au \
    --cc=vbabka@suse.cz \
    --cc=vinmenon@codeaurora.org \
    /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